Skip to content

Conversation

anuraaga
Copy link
Contributor

@anuraaga anuraaga commented Jul 31, 2025

I am helping with probability samping and one topic is the newly proposed random trace flag. I couldn't find any related issue but let me know if I missed it.

https://www.w3.org/TR/trace-context-2/#trace-flags

There is an OTel issue fishing for implementations

open-telemetry/opentelemetry-specification#3411

So I thought I would see what it could look like, extending the IdGenerator interface. I suspect it would look something like this - so I am happy to close this for now and discuss on an issue instead if that will be easier as I suspect this is a relatively nuanced topic. One of the bigger ones is if this behavior gets automatically applied to all current users as this PR proposes.

Personally, I think it's a reasonable option for the OTel community to band together to reject this draft. I doubt anyone working in observability has ever seen a trace ID that doesn't match the randomness requirement, and I suspect almost all apps to treat both values of 1 and 0 as random to support older SDKs, so the value add of this flag seems mostly zero.

@anuraaga anuraaga requested a review from a team as a code owner July 31, 2025 04:34
@anuraaga
Copy link
Contributor Author

Going to go ahead and close this for now as there is still not clear spec guidance on this. Can resurrect it if that changes, but hopefully it doesn't :-)

@anuraaga anuraaga closed this Aug 25, 2025
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.

1 participant