trace-context icon indicating copy to clipboard operation
trace-context copied to clipboard

Random part of trace ID should be uniformly distributed

Open oertl opened this issue 2 years ago • 3 comments

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

oertl avatar Jun 30 '23 08:06 oertl