Consider trace context support for probability sampling
@dyladan is already working on this.
Since Nov 9, 2021.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.