sdk/trace: More trace id tests#7155
Merged
MrAlias merged 7 commits intoopen-telemetry:mainfrom Aug 21, 2025
Merged
Conversation
Check that IDs round-trip between binary and hex string formats. Check that bad values give the expected errors. Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
Previously, nearly all the bits were zero so a mistake in encoding/decoding higher bits could be missed. Start with arbitrary values with more bits set. (Span ID still has top half as zero due to taking an int) Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
This lets us do richer tests on 32-bit platforms. Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
MrAlias
reviewed
Aug 8, 2025
MrAlias
reviewed
Aug 8, 2025
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7155 +/- ##
=======================================
- Coverage 83.0% 83.0% -0.1%
=======================================
Files 265 265
Lines 24661 24661
=======================================
- Hits 20474 20473 -1
- Misses 3810 3811 +1
Partials 377 377 🚀 New features to boost your workflow:
|
XSAM
approved these changes
Aug 10, 2025
pellared
reviewed
Aug 11, 2025
pellared
reviewed
Aug 11, 2025
dashpole
approved these changes
Aug 11, 2025
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
MrAlias
approved these changes
Aug 21, 2025
dmathieu
added a commit
that referenced
this pull request
Oct 6, 2025
Fixes #7160 - Modified `testIDGenerator` to have both low and high bits (in uint64 form) since we can't store 128 bits integer - start with high seed values (taken from #7155) - validate both high and low 64 bits of trace id Does not need a CHANGELOG entry - test only. --------- Co-authored-by: Damien Mathieu <42@dmathieu.com> Co-authored-by: Robert Pająk <pellared@hotmail.com> Co-authored-by: dmathieu <damien.mathieu@elastic.co>
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.
TestIDsRoundTripis patterned afterTestNewIDs.TestWithIDGenerator. Previously, nearly all the bits were zero so a mistake in encoding/decoding higher bits could be missed.Start with arbitrary values with more bits set.
(Span ID still has top half as zero due to taking an uint64)
testIDGeneratorso this ^^ change runs on 32-bit platforms.The idea for more tests arose while considering #6791.
Does not need a CHANGELOG entry - test only.