Add support for tracing via OpenTelemetry#254
Conversation
Signed-off-by: Joseph Woodward <joseph.woodward@xeuse.com>
e219b88 to
bac160e
Compare
Signed-off-by: Joseph Woodward <joseph.woodward@xeuse.com>
Signed-off-by: Joseph Woodward <joseph.woodward@xeuse.com>
Signed-off-by: Joseph Woodward <joseph.woodward@xeuse.com>
e5f0273 to
e390757
Compare
| 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.
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 <joseph.woodward@xeuse.com>
Signed-off-by: Joseph Woodward <joseph.woodward@xeuse.com>
Signed-off-by: Joseph Woodward <joseph.woodward@xeuse.com>
Signed-off-by: Joseph Woodward <joseph.woodward@xeuse.com>
4edfa2a to
d09ae3b
Compare
Signed-off-by: Joseph Woodward <joseph.woodward@xeuse.com>
Signed-off-by: Joseph Woodward <joseph.woodward@xeuse.com>
Signed-off-by: Joseph Woodward <joseph.woodward@xeuse.com>
|
Thanks for all your work on this. |
casualjim
left a comment
There was a problem hiding this comment.
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 <joseph.woodward@xeuse.com>
|
@casualjim That's been bumped, do you want me to bump the version in |
|
yeah that would be good |
Signed-off-by: Joseph Woodward <joseph.woodward@xeuse.com>
|
@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
WithOpenTelemetryfunctional option.A lot of the API and options align with the
otelhttptransport that can be used on the net/http clientAddresses issue #249