fix(sdk-trace): sample ratio 1 upper-bound trace IDs - #6890
Merged
pichlermarc merged 2 commits intoJul 8, 2026
Conversation
|
|
Contributor
Author
|
I have signed that CLA |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6890 +/- ##
=======================================
Coverage 95.08% 95.08%
=======================================
Files 394 394
Lines 13992 13993 +1
Branches 3223 3224 +1
=======================================
+ Hits 13304 13305 +1
Misses 688 688
🚀 New features to boost your workflow:
|
Contributor
|
Thank you for your contribution @LarryHu0217! 🎉 We would like to hear from you about your experience contributing to OpenTelemetry by taking a few minutes to fill out this survey. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
TraceIdRatioBasedSampler(1)so trace IDs whose accumulated value is0xffffffffare sampled.<comparison by using an exclusive upper bound of0x100000000when the normalized ratio is1.ffffffffboundary trace ID.Fixes #6879.
Testing
npm run compile --workspace @opentelemetry/sdk-tracenpm run test --workspace @opentelemetry/sdk-trace -- --grep TraceIdRatioBasedSamplernpm run lint --workspace @opentelemetry/sdk-trace(passes with existing no-console warnings in benchmark files)