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

Random part of trace ID should be uniformly distributed #544

Open
oertl opened this issue Jun 30, 2023 · 3 comments
Open

Random part of trace ID should be uniformly distributed #544

oertl opened this issue Jun 30, 2023 · 3 comments
Assignees
Labels
backport-to-level-2-required This is a PR against main that is meant to be backported to level 2.

Comments

@oertl
Copy link

oertl commented Jun 30, 2023

Currently, it is not mentioned that the random part of the trace ID (when the random flag is set) should be uniformly distributed. Compare https://w3c.github.io/trace-context/#trace-id, https://w3c.github.io/trace-context/#random-trace-id-flag, and https://w3c.github.io/trace-context/#randomness-of-trace-id. To be useful for sampling, it should be explicitly stated that the random part should follow a uniform distribution, meaning that all possible 2^56 values are equally likely. Otherwise, if we cannot rely on the uniform distribution, we would again need to hash the trace ID, which is exactly what we want to avoid with the random part.

FYI @PeterF778 @jmacd

@yurishkuro
Copy link
Member

+1. I think it is implied, but not stated explicitly.

@dyladan dyladan self-assigned this Aug 10, 2023
@dyladan
Copy link
Member

dyladan commented Aug 10, 2023

+1 from me as well. i'll make a PR

@kalyanaj kalyanaj added the backport-to-level-2-required This is a PR against main that is meant to be backported to level 2. label Aug 29, 2023
@dyladan
Copy link
Member

dyladan commented Jan 30, 2024

Created #558 and #559 for this. Please review at your convenience

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-to-level-2-required This is a PR against main that is meant to be backported to level 2.
Projects
None yet
Development

No branches or pull requests

4 participants