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

Propagate 8 bits of W3C trace context flags #5030

Closed
jmacd opened this issue Mar 6, 2024 · 2 comments
Closed

Propagate 8 bits of W3C trace context flags #5030

jmacd opened this issue Mar 6, 2024 · 2 comments
Assignees
Labels
blocked:specification Waiting on clarification of the OpenTelemetry specification before progress can be made bug Something isn't working
Milestone

Comments

@jmacd
Copy link
Contributor

jmacd commented Mar 6, 2024

Description

The W3C trace context propagator currently masks unknown trace flags bits, here:

flags := sc.TraceFlags() & trace.FlagsSampled

Expected behavior

Nothing in the specification explicitly says what the SDKs are meant to do here, but I believe the expectation for W3C trace context propagation is that all flags are propagated, even the unrecognized ones. The W3C specification says there are 8 flags, and I think they should all propagate.

When SDKs do not propagate unknown flags, it makes it difficult for new flags to be deployed in a timely manner. In particular, the Sampling SIG is advising OpenTelemetry not to strictly enforce the new W3C Trace Context Level 2 Random flag until this fix is widely deployed.

See open-telemetry/opentelemetry-specification#3924, https://github.com/open-telemetry/oteps/blob/main/text/trace/0235-sampling-threshold-in-trace-state.md, open-telemetry/opentelemetry-specification#3910 where I am drafting proposed sampler changes, hence I discovered this issue. I have a draft with changes that would address the proposed-clarified specification here: main...jmacd:opentelemetry-go:jmacd/randomness but I want to make sure the spec change is generally agreed to before submitting.

@MrAlias
Copy link
Contributor

MrAlias commented Mar 14, 2024

Won't this violate this:

... [t]he vendor will only parse the trace-flags values supported by this version of this specification and ignore all other values. [...] Vendors will set all unparsed / unknown trace-flags to 0 on outgoing requests.

@XSAM XSAM added the blocked:specification Waiting on clarification of the OpenTelemetry specification before progress can be made label Mar 15, 2024
@jmacd
Copy link
Contributor Author

jmacd commented Mar 20, 2024

Yes, my apologies. For what it's worth, there is a thread on this here.

@jmacd jmacd closed this as completed Mar 20, 2024
@github-project-automation github-project-automation bot moved this from Needs triage to Closed in Go: Triage Mar 20, 2024
@XSAM XSAM added this to the untracked milestone Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked:specification Waiting on clarification of the OpenTelemetry specification before progress can be made bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants