-
Notifications
You must be signed in to change notification settings - Fork 148
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
Add support for tracing via OpenTelemetry #254
Add support for tracing via OpenTelemetry #254
Conversation
Signed-off-by: Joseph Woodward <[email protected]>
e219b88
to
bac160e
Compare
Signed-off-by: Joseph Woodward <[email protected]>
Signed-off-by: Joseph Woodward <[email protected]>
Signed-off-by: Joseph Woodward <[email protected]>
e5f0273
to
e390757
Compare
client/opentelemetry.go
Outdated
attribute.String(string(semconv.HTTPMethodKey), op.Method), | ||
attribute.String("span.kind", trace.SpanKindClient.String()), | ||
//TODO: Figure out the best way to get the scheme? | ||
attribute.String("http.scheme", op.Schemes[0]), |
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.
Hi @casualjim, can you offer any pointers on the best way to get the scheme? I don't appear to have access to the underlying http.Request
object to check the existence of the TLS
field (which is one common way to work out the scheme)
9a080fa
to
4edfa2a
Compare
Signed-off-by: Joseph Woodward <[email protected]>
Signed-off-by: Joseph Woodward <[email protected]>
Signed-off-by: Joseph Woodward <[email protected]>
Signed-off-by: Joseph Woodward <[email protected]>
4edfa2a
to
d09ae3b
Compare
Signed-off-by: Joseph Woodward <[email protected]>
Signed-off-by: Joseph Woodward <[email protected]>
Signed-off-by: Joseph Woodward <[email protected]>
Thanks for all your work on this. |
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.
This looks good.
I'll see if I can figure out how to get the actual scheme that's being used for the request into here too.
can you bump the go version in the .github/ folder to be at least 1.18 or higher? Otel seems to require it |
Signed-off-by: Joseph Woodward <[email protected]>
@casualjim That's been bumped, do you want me to bump the version in |
yeah that would be good |
Signed-off-by: Joseph Woodward <[email protected]>
@casualjim Could you please merge this pr if It’s ok with you. |
Codecov Report
@@ Coverage Diff @@
## master #254 +/- ##
==========================================
+ Coverage 80.13% 80.20% +0.07%
==========================================
Files 42 44 +2
Lines 3191 3350 +159
==========================================
+ Hits 2557 2687 +130
- Misses 521 548 +27
- Partials 113 115 +2
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
As OpenTracing (the predecessor to OpenTelemetry) has been deprecated, this change adds support for OpenTelemetry via the
WithOpenTelemetry
functional option.A lot of the API and options align with the
otelhttp
transport that can be used on the net/http clientAddresses issue #249