diff --git a/lib/trace.js b/lib/trace.js
index <HASH>..<HASH> 100644
--- a/lib/trace.js
+++ b/lib/trace.js
@@ -250,7 +250,7 @@
    */
   Endpoint = function(ipv4, port, serviceName) {
     this.ipv4 = ipv4;
-    this.port = port;
+    this.port = parseInt(port, 10);
     this.serviceName = serviceName;
   };
Make sure port on the endpoint is a number. Strings get rejected by the api.