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
feat: support w3c trace context #4170
Conversation
435a323
to
78758e3
Compare
ef496d7
to
ff2d76e
Compare
This reverts commit 84993c9.
releasenotes/notes/add-w3c-traceparent-propagation-789324b2e1326f0e.yaml
Outdated
Show resolved
Hide resolved
Co-authored-by: Tahir H. Butt <tahir.butt@datadoghq.com>
…26f0e.yaml Co-authored-by: Tahir H. Butt <tahir.butt@datadoghq.com>
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.
A few things, but overall good with the approach and testing 👍
releasenotes/notes/add-w3c-traceparent-propagation-789324b2e1326f0e.yaml
Outdated
Show resolved
Hide resolved
…26f0e.yaml Co-authored-by: Kyle Verhoog <kyle@verhoog.ca>
Codecov Report
@@ Coverage Diff @@
## 1.x #4170 +/- ##
=======================================
Coverage 78.08% 78.09%
=======================================
Files 734 734
Lines 58874 58923 +49
=======================================
+ Hits 45974 46016 +42
- Misses 12900 12907 +7
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
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.
just one thought, otherwise lgtm!
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.
Doc changes otherwise lgtm
releasenotes/notes/add-w3c-traceparent-propagation-789324b2e1326f0e.yaml
Outdated
Show resolved
Hide resolved
Co-authored-by: Tahir H. Butt <tahir.butt@datadoghq.com>
…26f0e.yaml Co-authored-by: Tahir H. Butt <tahir.butt@datadoghq.com>
Co-authored-by: Tahir H. Butt <tahir.butt@datadoghq.com>
releasenotes/notes/add-w3c-traceparent-propagation-789324b2e1326f0e.yaml
Outdated
Show resolved
Hide resolved
…26f0e.yaml Co-authored-by: Tahir H. Butt <tahir.butt@datadoghq.com>
This reverts commit e652b99.
Reverts #4170 The RFC for this feature is not yet approved and future changes are likely.
trace_flags = 1 if sampling_priority and sampling_priority >= AUTO_KEEP else 0 | ||
|
||
# There is currently only a single version so we always start with 00 | ||
traceparent = "00-{:032x}-{:016x}-{:02x}".format(trace_id, span_id, trace_flags) |
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.
Description
We want to support W3C propagation headers which is what Otel uses. w3c standard.
Currently we're only adding support for traceparent to propagate the trace context. We are not yet adding support for tracestate but are planning to in future work.
Motivation
We want to support otel users and possibly other future tracers that use this format for distributed tracing
Design
Overview:
Testing strategy
I've added tests similar to those for b3, making sure that we're converting the W3C header correctly into a context via
_extract()
and that we're converting the context correctly into the traceparent W3C header via `_inject().Checklist
feat
andfix
pull requests.Reviewer Checklist
changelog/no-changelog
label added.