Skip to content
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

Merged
merged 2 commits into from
Oct 12, 2016
Merged

Correct http tags in tracing spans #375

merged 2 commits into from
Oct 12, 2016

Conversation

danielfurman
Copy link
Contributor

Set correct value of HTTP URL tag that is added to client span in ToHTTPRequest() function.
Add new opentracing tags in tracing request functions.

Set correct value of HTTP URL tag that is added to client span in ToHTTPRequest() function.
Add new opentracing tags in tracing request functions.
@danielfurman
Copy link
Contributor Author

danielfurman commented Oct 11, 2016

#376 Reference to PR

Copy link
Member

@peterbourgon peterbourgon left a 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"
Copy link
Member

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())
Copy link
Contributor Author

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.

Copy link
Member

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.

@peterbourgon peterbourgon merged commit acf75de into go-kit:master Oct 12, 2016
@danielfurman danielfurman deleted the tracing-tags branch October 12, 2016 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants