-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add AlwaysParentSample sampler #455
Add AlwaysParentSample sampler #455
Conversation
Co-Authored-By: Krzesimir Nowak <[email protected]>
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.
What should be the behavior if this is a root span? It is more of an issue in the spec since it doesn't define this. If the desired behavior for root is
- always sample then it is same as probabilitySampler with probability of 1.
- if do not sample then it is same as probabilitySampler with probability of 0.
- if sample as certain probability x then it is same as probabilitySampler with x.
Essentially it is same as probabilitySampler.
The other thing is that AlwaysParentSampler is same as ProbabilitySampler with probability of 1. If there is a parent and then simply follow the decision on the parent. That is same as AlwaysParentSample (if we clarify what should be the behavior for root span for AlwaysParentSampler).
This is a good point. I believe it should be equivalent to ProbabilitySampler with 0. And then we can just wrap the ProbabilitySampler with 0 inside the AlwaysParentSampler and clarify it in the docs. |
I agree on ProbabilitySampler with 0. |
Per the
ALWAYS_PARENT
sampler from the spec https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/sdk-tracing.md#built-in-samplers