w3c / w3c/trace-context

Consider trace context support for probability sampling

Open
#463 2 comments 1 reaction 1 assignee View on GitHub

@dyladan is already working on this.

Since Nov 9, 2021.

trace-context-level-3
Dominant language
Python
Stars
510
Forks
80
PR merge metrics
No merged PRs in 30d

Description

The OpenTelemetry project has been working to specify how it propagates information about probability sampling through a couple of OTEP drafts:

OTEP 168: Specify how to propagate consistent head sampling probability
OTEP 170: Probability sampling: Sampler Name and Adjusted Count attributes

The first of these discusses how to propagate head probability so that each Span recorded in a Trace Context that has the sampled flag set knows its "adjusted count", which is the inverse of probability. We have proposed to use power-of-two sampling rates, following research by Otmar Ertl, and have come to see the use of a dedicated tracestate field as potentially too costly to have on-by-default.

Using tracestate means passing around 30 bytes per context, and considering this overhead we would like to see a Version-1 W3C traceparent with the addition of a couple of bytes of information. We can do this with 6 or 7 bits of information, ideally, but it will require specifying a lot more about traceparent and which bits of the TraceID are truly random.

This issue is a placeholder for raising this discussion in the W3C group.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.