Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 OpenTelemetry sampling conventions #793
Add OpenTelemetry sampling conventions #793
Changes from 19 commits
e767013
0126c1d
8646a41
157e07b
f3c5da1
1f1ca45
b5a65c4
a4c2068
b1574bd
42e47f9
9badfa4
7e56498
e466de8
c50081e
73b0571
4e8870d
4a1b1df
21d9b99
e317e02
e451ed2
e114c50
a28f48e
a55667f
79275a3
c3650d2
9a7c46b
c1d6c78
9304f29
1cb4153
8db652a
9ccd8d7
157fdca
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
It could be just me, but I think that
max
-something suggests inclusiveness, so this can be confusing. How aboutAdjustedCountLimit
?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.
I am fine with
MaxAdjustedCount
. It is inclusive with respect to the adjusted count. However, I understand that it can be a little confusing as it is also used as an exclusive upper limit for the threshold and the random value.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.
Is the idea that even if an original sampling decision was to drop, you can override it by setting this attribute? If so, IMHO, the name "priority" doesn't directly convey the override aspect. Hence, depending on what use cases we want to allow (change decision from drop -> keep, or change decision from keep -> drop, or both), I wonder if this should be a simple bool attribute such as "sampling.keep" or "sampling.include" or "sampling.override".
In the future, if we expect pipelines to prioritize between multiple levels (e.g., if I could keep only X%, prefer the ones with the higher priority), then we could still add a new attribute to convey that relative priority.
To put it a different way, it looks like there are two abstractions we want to introduce:
Right now, it looks like we are using 2) to solve both of the above, however it is hiding 1). Hence, my question is could we do only 1) above and defer 2) (given that anyway the current spec advises against using those relative priorities & it can be added in the future if really needed).
Thoughts?
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.
There is no existing mechanism to keep a span that was already dropped, so I assume it can only increase or decrease the chances for span that was already sampled in to be exported, correct?
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.
@kalyanaj I tried to address your concern in #793 (comment).
@lmolkova Yes. Another way of saying this (which OTEP 235 explains) is that Thresholds cannot decrease as a result of sampling, but they can increase. OTEP 235 writes
The trace SDK specification confines what we can do for SDKs, in the sense that there is not Sampler decision corresponding with not sampling, but recording the span and possibly changing the decision to export the unsampled span anyway. See e.g.,
open-telemetry/opentelemetry-specification#2918
open-telemetry/opentelemetry-specification#2986
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.