-
Notifications
You must be signed in to change notification settings - Fork 164
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
Specify how to propagate consistent head sampling probability #168
Conversation
Yes, if the trace ID is specified to be truly random, it would be possible to use it without hashing.
Yes, the given pseudocode generates a geometrically distributed random number with p=0.5 and takes just 2 random bits on average. What I was trying to say is that all samplers ( To better reflect that in the interface, I would even redefine the sampler interface which is currently a function mapping to a boolean indicating the sampling decision. If it is defined as a function that maps each individual span to the corresponding sampling rate, the sampler implementations would be very simple. For example, The proposed redefined sampler interface would have following benefits:
|
@oertl Thank you. I definitely understand your proposal. You've described a simplification in the Sampler interface, which is an SDK specification topic that I was hoping to avoid. I agree with your summary, the overall Sampler outcome would be easier to reason about with the change you suggest, but I am not sure that legacy users of the API will agree. The amount of energy it will take to make this happen may exceed the benefit produced. I am trying to keep these OTEPs separate: #170 is about the data model for Span (formerly known as #148) Changing the Sampler API would be another issue entirely. I will revise this PR based on the discussion in #168 (comment), which means combining the two pieces of additional information that go into the |
Personally I would prefer to separate the propagation proposal from the W3C format discussion. Whatever happens with this OTEP is not going to have any (formal) impact on changing the W3C spec, the discussion would need to happen there. On the other hand, the actual functionality is not dependent on changing the W3C format because it can be achieved by using |
@oertl and @yurishkuro
In my proposal, in the text of #170 (now), the |
@yurishkuro Thank you for your guidance. I have revised this proposal only to use @oertl I have revised this to include your proposal with a syntax like:
where PP is the base16 probability value and RR is the base16 randomness value. Please take another look. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One big question that I don't get the answer from this OTEP is if this is a required feature. I feel that you need this to be required to work (especially when the trace travers multiple customers), but I also feel this is an extra overhead and complicated logic for cases when the customer does not care about this.
@jmacd please fix the check-errors. |
Discussed in "Default behavior". I'd prefer this were on-by-default, but with the present |
@jmacd where should we discuss/agree if this is or not the default behavior? |
@bogdandrutu Just FYI there's a SIG call on 8 minutes, although don't know who package are you today ;) |
…o default-on discussion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unblocking, since @jmacd promised that the default behaviors will be discussed in specs.
Yes. FWIW, I've already changed this OTEP to state that the default will be opt-in. We're just going to debate the name and form of the option. |
This OTEP specifies how to propagate head trace sampling probability, so that child spans can be counted on the fly. This specification would allow
ParentBased
samplers to output sampling probabilities in a way that supports span-to-metrics pipelines, for example.This OTEP is paired with #170 which discusses additions to the span data model.