Skip to content

Conversation

@krantideep95
Copy link
Contributor

@krantideep95 krantideep95 commented Dec 17, 2020

while creating spans for outbound requests,
http.url tag is set In RoundTripper here:

ext.HTTPUrl.Set(tracer.sp, tracer.opts.urlTagFunc(req.URL))

but, if clientTrace is enabled, this http.url is overriden in getConn() with host:port. This leaves span with poorer data with just host:port instead of complete (sanitised, if URLTagFunc was passed) url.
Some tools like https://www.hypertrace.org/ depend on http.url tag to determine backends of a service, for which they require a complete url.

Edit: based on conversation in #3 (comment), made changes to set peer.address tag & log hostPort in getConn()

krantideep95 added 3 commits December 17, 2020 22:45
@krantideep95 krantideep95 changed the title Update client.go: removes overriding of ext.HTTPUrl in getConn() Dec 17, 2020
Copy link
Collaborator

@yurishkuro yurishkuro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thanks

@yurishkuro yurishkuro merged commit 08d136d into opentracing-contrib:master Dec 17, 2020
@krantideep95 krantideep95 deleted the patch-1 branch December 17, 2020 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

3 participants