-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Correct http tags in tracing spans #375
Conversation
Set correct value of HTTP URL tag that is added to client span in ToHTTPRequest() function. Add new opentracing tags in tracing request functions.
#376 Reference to PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I can see what you've done, but I don't quite understand why the previous version was incorrect. Can you spell it out for me? :) Thanks! /cc @bensigelman does this parse for you?
"github.com/opentracing/opentracing-go/mocktracer" | ||
"github.com/stretchr/testify/assert" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove this dependency :)
@@ -21,7 +21,8 @@ func ToHTTPRequest(tracer opentracing.Tracer, logger log.Logger) kithttp.Request | |||
// Try to find a Span in the Context. | |||
if span := opentracing.SpanFromContext(ctx); span != nil { | |||
// Add standard OpenTracing tags. | |||
ext.HTTPMethod.Set(span, req.URL.RequestURI()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@peterbourgon This is the place I was talking about.
Docs says that url.RequestURI()
returns encoded path?query or opaque?querystring.
This value was assigned to a ext.HTTPMethod tag which i think is a bug.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. Yes, great! Thank you.
Set correct value of HTTP URL tag that is added to client span in ToHTTPRequest() function.
Add new opentracing tags in tracing request functions.