-
Notifications
You must be signed in to change notification settings - Fork 896
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
Composite Head Samplers #4321
base: main
Are you sure you want to change the base?
Composite Head Samplers #4321
Conversation
This PR was marked stale due to lack of activity. It will be closed in 7 days. |
Added |
### ConsistentParentBased | ||
|
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.
Notes: In the prototype I worked on, I decomposed the logic described below, for the parent-sampled case(s). My goal was to preserve the existing ParentBased sampler's ability to distinguish local from remote parents, by registering more delegates. The way I was thinking, there would be 3 delegates: one root, one local-parent, and one remote-parent case. The two parent cases would default to a type named ConsistentParentThreshold
case which is the behavior described in lines 250-270.
This lets us advise users who formerly wrote something like
ParentBased(root, localSampled=AlwaysOn, remoteSampled=AlwaysOn, localUnsampled=AlwaysOff, remoteUnsampled=AlwaysOff)
with
ConsistentParentBased(root, localParent=ConsistentParentThreshold, remoteParent=ConsistentParentThresohld)
then, in case the user has remote and/or local-specific attributes they want to add, it'll be clear how they do that.
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.
Yes, adding attributes for spans with remote parent is an important use case. I had hoped that this could be achieved using ConsistentRuleBased
(where we can test for remote parent) and attribute adding wrappers.
What would ConsistentParentThreshold
do for root spans (if misused this way)?
|
||
The returned `SamplingIntent` is constructed as follows. | ||
|
||
- If using the obtained threshold value as the final threshold would entail sampling more spans than the declared target rate, the sampler SHOULD set the threshold to a value that would meet the target rate. Several algorithms can be used for threshold adjustment, no particular behavior is prescribed by the specification though. |
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.
👍
59612f8
to
db169b3
Compare
Changes
Migrating from open-telemetry/oteps#250.
This is another approach for introducing Composite (Head) Samplers. The previous one (open-telemetry/oteps#240) proved too large, with some controversial elements.
This OTEP is a split-off from that one, focusing just on one area - new Composite Samplers.