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

Backport #558 uniform distribution #559

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion spec/20-http_request_header_format.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ There are two additional options that vendors MAY follow:
The second least significant bit of the trace-flags field denotes the `random-trace-id` flag.

When starting or restarting a trace (that is, when the participant generates a new `trace-id`), the following rules apply:
* If that flag is set, at least the right-most 7 bytes of the `trace-id` MUST be random (or pseudo-random).
* If that flag is set, at least the right-most 7 bytes of the `trace-id` MUST be selected randomly (or pseudo-randomly) with uniform distribution over the interval [0..2^56-1].
* If the flag is not set, the `trace-id` MAY still be randomly (or pseudo-randomly) generated.
* When unset, the `trace-id` MAY be generated in any way that satisfies the requirements of the [trace ID format](#trace-id).
* When at least the right-most 7 bytes of the `trace-id` are randomly (or pseudo-randomly) generated, the `random-trace-id` flag SHOULD be set to `1`.
Expand Down
3 changes: 2 additions & 1 deletion spec/60-trace-id-format.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ also allows tracing vendors to base sampling decisions on `trace-id` field value
and avoid propagating an additional sampling context.

If the `random-trace-id` flag is set, at least the right-most 7 bytes of the
`trace-id` MUST be randomly (or pseudo-randomly) generated.
`trace-id` MUST be selected randomly (or pseudo-randomly) with uniform distribution
over the interval [0..2^56-1].

As shown in the next section, if part of the `trace-id` is nonrandom,
it is important for the random part of the `trace-id` to be as far right in the
Expand Down
Loading