-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Store sampling.probability
in sampled span attributes
#2215
Conversation
Since the linked PR is currently neither |
Codecov Report
@@ Coverage Diff @@
## master #2215 +/- ##
==========================================
- Coverage 91.95% 91.92% -0.03%
==========================================
Files 271 271
Lines 15664 15658 -6
==========================================
- Hits 14404 14394 -10
- Misses 857 860 +3
- Partials 403 404 +1
Continue to review full report at Codecov.
|
samplingProbability := tsp.samplingProbability | ||
attr, found := sampledSpanAttributes.Get(conventions.AttributeSamplingProbability) | ||
if found && attr.Type() == pdata.AttributeValueDOUBLE { | ||
samplingProbability *= attr.DoubleVal() |
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 this really a multiplication here? I think it depends on the algorithm used, may be a min or multiplication.
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 think this problem should be somewhat mitigated by this: https://github.com/open-telemetry/opentelemetry-collector/blob/master/processor/samplingprocessor/probabilisticsamplerprocessor/probabilisticsampler.go#L110-L115
This PR was marked stale due to lack of activity. It will be closed in 7 days. |
Closed as inactive. Feel free to reopen if this PR is still being worked on. |
@jkwatson I guess the probability attribute should be removed from Java for now, as it seems there is no agreement on adding it. |
@Oberon00 I think both this PR and the Spec PR were closed due to lack of recent activity rather than lack of agreement. Also, I think the discussion under the Spec PR mostly touches "how" of doing probability sampling rather than the need for |
I didn't mean to imply that people are against it, I don't think that's the case. The missing agreement (in form of approving reviews and a merge) seems to be due to lack of interest relative to other things currently in progress. And I actually wanted to comment on the related spec PR which was also closed due to inactivity open-telemetry/opentelemetry-specification#570, but it kinda fits here too I guess 😃 |
@Oberon00 yeah, it's all towards getting the GA out and I agree that this might not be above the cutoff line of what's really important and what's not 😀 |
Description:
Adds
sampling.probability
attribute to all spans sampled byprobabilisticsamplerprocessor
.This makes it consistent with Java probabilisitic sampler design and the ongoing specification update
Probably, if this is going to be merged then after the specification PR gets accepted
Link to tracking Issue: Related specification change open-telemetry/opentelemetry-specification#570
Testing: Unit tests added
Documentation: README.md updated with description of attribute added
cc @Oberon00