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 33 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 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
@jmacd jmacd dismissed tsloughter’s stale review October 4, 2024 21:11

Please take another look, this should be fixed :-)

specification/trace/tracestate-handling.md Outdated Show resolved Hide resolved
specification/trace/sdk.md Outdated Show resolved Hide resolved
specification/trace/sdk.md Outdated Show resolved Hide resolved
specification/trace/sdk.md Show resolved Hide resolved
@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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.