Skip to content

Commit

Permalink
Do not set port, as opentracing treats it as a short.
Browse files Browse the repository at this point in the history
Java Shorts are signed, thus they can only contain half of all available
ports. Entirely possible I'm missing something, but it seems like any port
above 32767 causes an error. I will open an issue with the opentracing
folks to discuss.
  • Loading branch information
James Judd committed Feb 17, 2017
1 parent 012e4c5 commit a8c505b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class StandardSpanTagger(name: Option[String] = None) extends SpanTagger {
Tags.HTTP_STATUS.set(span, result.header.status)
Tags.HTTP_URL.set(span, s"${if (request.secure) "http" else "https"}://${request.host}${request.uri}")
Tags.PEER_HOSTNAME.set(span, request.domain)
Tags.PEER_PORT.set(span, request.host.split(":").lift(1).fold(if (request.secure) 443.toShort else 80.toShort)(_.toShort))
//Tags.PEER_PORT.set(span, request.host.split(":").lift(1).fold(if (request.secure) 443.toShort else 80.toShort)(_.toShort))
Tags.SPAN_KIND.set(span, Tags.SPAN_KIND_SERVER)
}
}

0 comments on commit a8c505b

Please sign in to comment.