Improve concurrent performance of exponential histogram measurements#7535
Closed
dashpole wants to merge 1 commit intoopen-telemetry:mainfrom
Closed
Improve concurrent performance of exponential histogram measurements#7535dashpole wants to merge 1 commit intoopen-telemetry:mainfrom
dashpole wants to merge 1 commit intoopen-telemetry:mainfrom
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7535 +/- ##
=======================================
- Coverage 86.2% 86.1% -0.1%
=======================================
Files 298 298
Lines 21829 22003 +174
=======================================
+ Hits 18817 18957 +140
- Misses 2635 2664 +29
- Partials 377 382 +5
🚀 New features to boost your workflow:
|
a7ee0ea to
ee6cf66
Compare
ee6cf66 to
8871f03
Compare
Contributor
Author
|
I'm going to try to split this into smaller PRs:
|
This was referenced Dec 12, 2025
dashpole
added a commit
that referenced
this pull request
Dec 16, 2025
Tiny part of #7535 It doesn't make much of a difference now, since we are bound by lock contention, but it matters once we move to atomics. ``` │ main.txt │ defercount.txt │ │ sec/op │ sec/op vs base │ SyncMeasure/NoView/ExemplarsDisabled/ExponentialInt64Histogram/Attributes/0-24 300.9n ± 7% 282.8n ± 10% ~ (p=0.394 n=6) SyncMeasure/NoView/ExemplarsDisabled/ExponentialInt64Histogram/Attributes/1-24 300.0n ± 8% 307.5n ± 3% ~ (p=0.394 n=6) SyncMeasure/NoView/ExemplarsDisabled/ExponentialInt64Histogram/Attributes/10-24 301.4n ± 5% 300.7n ± 5% ~ (p=0.485 n=6) SyncMeasure/NoView/ExemplarsDisabled/ExponentialFloat64Histogram/Attributes/0-24 286.4n ± 4% 284.8n ± 3% ~ (p=0.420 n=6) SyncMeasure/NoView/ExemplarsDisabled/ExponentialFloat64Histogram/Attributes/1-24 303.8n ± 3% 294.3n ± 2% -3.11% (p=0.006 n=6) SyncMeasure/NoView/ExemplarsDisabled/ExponentialFloat64Histogram/Attributes/10-24 297.9n ± 4% 291.6n ± 3% -2.10% (p=0.024 n=6) geomean 298.3n 293.5n -1.62% ```
dashpole
added a commit
that referenced
this pull request
Mar 13, 2026
This is the first PR towards a lockless fast-path for the exponential histogram aggregation. It just replaces use of min, max, sum and counts with atomic types. You can see the full set of planned changes in main...dashpole:opentelemetry-go:lockless_exphist_ai. The implementation is largely based on #7535 (which I implemented by hand), but with help from an AI to break it down into smaller PRs, and simplify aspects of the design. Part of #7796
dashpole
added a commit
that referenced
this pull request
Mar 17, 2026
Follows #8025 This is the second PR towards a lockless fast-path for the exponential histogram aggregation. It replaces use of uint64 with atomic.Uint64. It does not make buckets concurrent-safe. That will come in future PRs. This is a refactor to make future PRs easier to review since it has a large diff, but is relatively simple. The record and measure calls are still guarded by a lock at this point. You can see the full set of planned changes in main...dashpole:opentelemetry-go:lockless_exphist_ai. The implementation is largely based on #7535 (which I implemented by hand), but with help from an AI to break it down into smaller PRs, and simplify aspects of the design. Part of #7796
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.
This builds on #7474 and #7478. It is similar to the histogram implementation, but uses an additional hotColdWaitGroup for downscaling without blocking the hot path, and a "circular" slice for buckets to avoid shifts.
This is not ready for review, and still needs a significant amount of polish. I will return to this after the previous PRs are merged.