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

Randomness requirements following W3C Trace Context level 2 #4162

Draft
wants to merge 35 commits into
base: main
Choose a base branch
from

Conversation

jmacd
Copy link
Contributor

@jmacd jmacd commented Jul 25, 2024

Changes

Updates Trace SDK and Propagator specifications with

  • List W3C propagator requirements (e.g., should propagate tracestate)
  • Introduce W3C Trace Context Level 2 w/ the Random flag
  • Define explicit randomness feature from OTEP 235, OTEP 261
  • Trace SDK default ID generator should include 56 bits of randomness in the correct location
  • Trace SDK for root spans: either set the random flag to confirm the above, or use an explicit randomness value.

Part of #1413.
Part of #3602.

Product of the Sampling SIG members @kentquirk @kalyanaj @oertl @PeterF778 and myself.

@jmacd jmacd changed the title Draft rules for span context in Trace Context level 2 Randomness requirements for W3C Trace Context level 2 Jul 26, 2024
@jmacd jmacd changed the title Randomness requirements for W3C Trace Context level 2 Randomness requirements following W3C Trace Context level 2 Jul 26, 2024
@jmacd jmacd force-pushed the jmacd/sampling_new branch from fa9ec4c to 71750cd Compare July 29, 2024 23:22
@jmacd jmacd marked this pull request as ready for review July 29, 2024 23:24
@jmacd jmacd requested review from a team July 29, 2024 23:24
Copy link
Member

@marcalff marcalff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See nit comment about text formatting, for diff

specification/trace/sdk.md Outdated Show resolved Hide resolved
Copy link
Member

@marcalff marcalff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

specification/trace/sdk.md Outdated Show resolved Hide resolved
specification/context/api-propagators.md Outdated Show resolved Hide resolved
specification/trace/tracestate-handling.md Outdated Show resolved Hide resolved
specification/trace/tracestate-handling.md Show resolved Hide resolved
Copy link

This PR was marked stale due to lack of activity. It will be closed in 7 days.

@github-actions github-actions bot added the Stale label Aug 15, 2024
@jmacd jmacd removed the Stale label Aug 15, 2024
@carlosalberto
Copy link
Contributor

Overall LGTM (once some of the latest feedback comments have been addressed).

meet the [W3C Trace Context Level 2 randomness requirements][W3CCONTEXTTRACEID],
and when the the [`rv` sub-key of the OpenTelemetry TraceState][OTELRVALUE] is
not already set, the SDK SHOULD insert an explicit trace randomness value
into the OpenTelemetry TraceState value containing 56 random bits.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This requirement seems to conflict with the use case where we want to have the same rv shared by a number of related traces. Also, it makes the random flag in trace-flags quite meaningless.
We may want to allow samplers to change the rv for the ROOT spans explicitly, or delegate the responsibility for setting rv for non-random trace-id and ROOT spans to the samplers.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@PeterF778 See if b75113c addresses your concern. I'm trying to avoid a large diff, and I think this is sufficient.

Copy link

This PR was marked stale due to lack of activity. It will be closed in 7 days.

@github-actions github-actions bot added the Stale label Oct 30, 2024
@jmacd jmacd removed the Stale label Oct 30, 2024
@jmacd jmacd marked this pull request as draft November 4, 2024 16:53
Copy link

This PR was marked stale due to lack of activity. It will be closed in 7 days.

@github-actions github-actions bot added the Stale label Nov 12, 2024
Copy link

Closed as inactive. Feel free to reopen if this PR is still being worked on.

@github-actions github-actions bot closed this Nov 21, 2024
@jmacd jmacd reopened this Dec 3, 2024
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.