-
Notifications
You must be signed in to change notification settings - Fork 76
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
Consider trace context support for probability sampling #463
Comments
Since the existing parts of a
for T, S and F being half bytes of the TraceID, SpanID, and Flag parts. The variation discussed by OpenTelemetry would be:
where R represents a half byte of true random TraceID (the most significant half), and P represents new information related to the head probability. The 64 available values for PP are recognized as negative base2 logarithm of the sampling probability: 0: an adjusted count of 1 (i.e., probability == 2^0) In order to recognize unknown head sampling probability, we would propose a new trace context flag to indicate two things: (a) the most significant 64 bits of the TraceID are true random, (b) the head probability is known. This proposal follows from research by Otmar Ertl, see https://arxiv.org/pdf/2107.07703.pdf. |
Summary of discussion from working group meeting:
|
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 dedicatedtracestate
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 W3Ctraceparent
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 abouttraceparent
and which bits of the TraceID are truly random.This issue is a placeholder for raising this discussion in the W3C group.
The text was updated successfully, but these errors were encountered: