Improve aggregation concurrent safe tests#8021
Merged
dashpole merged 8 commits intoopen-telemetry:mainfrom Mar 13, 2026
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8021 +/- ##
=====================================
Coverage 81.6% 81.6%
=====================================
Files 304 304
Lines 23452 23452
=====================================
Hits 19141 19141
- Misses 3928 3929 +1
+ Partials 383 382 -1 🚀 New features to boost your workflow:
|
9e8e22c to
8b05173
Compare
062dc8b to
d9a18a0
Compare
dmathieu
approved these changes
Mar 12, 2026
MrAlias
reviewed
Mar 12, 2026
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
MrAlias
approved these changes
Mar 12, 2026
dashpole
added a commit
that referenced
this pull request
Mar 16, 2026
This initializes the value of the gauge with the correct value before it is stored in the map. We end up storing the same thing twice on the first call, but that isn't a big deal performance-wise. Discovered during #8021
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.
I'm taking a stab at improving the ConcurrentSafe tests for aggregations before taking on the lockless exponential histogram implementation again.
Part of #7796
This PR includes a few improvements:
This uncovered an apparent race condition where the lastvalue aggregation can collect a value of zero even when no zero-value is recorded. I added a TODO, and will fix this in a follow-up.
I used AI to help me design and implement tests, but requested each of the changes, and reviewed the output.