-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Fix multi-reader observable counter double-counting bug #4742
Merged
Conversation
This file contains 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
dashpole
changed the title
Reproduce #4741 in a unit test
Fix multi-reader observable counter double-counting bug
Dec 6, 2023
dashpole
force-pushed
the
fix_multireader
branch
from
December 6, 2023 21:11
6923e80
to
c7f763d
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #4742 +/- ##
=====================================
Coverage 82.0% 82.0%
=====================================
Files 225 225
Lines 18239 18242 +3
=====================================
+ Hits 14961 14976 +15
+ Misses 2989 2981 -8
+ Partials 289 285 -4
|
dashpole
force-pushed
the
fix_multireader
branch
2 times, most recently
from
December 6, 2023 21:29
d582bf2
to
6c4286a
Compare
dashpole
commented
Dec 6, 2023
dashpole
requested review from
MrAlias,
Aneurysm9,
evantorrie,
XSAM,
MadVikingGod,
pellared,
hanyuancheung and
dmathieu
as code owners
December 6, 2023 21:34
StarpTech
suggested changes
Dec 7, 2023
StarpTech
approved these changes
Dec 7, 2023
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.
LGTM
…chronous counter values
dashpole
force-pushed
the
fix_multireader
branch
from
December 8, 2023 15:06
a918b25
to
101f906
Compare
dashpole
added
pkg:SDK
Related to an SDK package
area:metrics
Part of OpenTelemetry Metrics
labels
Dec 8, 2023
MrAlias
approved these changes
Dec 8, 2023
MadVikingGod
approved these changes
Dec 8, 2023
@MrAlias when can we expect a release? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area:metrics
Part of OpenTelemetry Metrics
bug
Something isn't working
pkg:SDK
Related to an SDK package
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.
Fixes #4741
Using multiple readers causes TestObservableExample/Cumulative and TestObservableExample/Delta to fail without this fix.
The issue is that the "observable" added to the callback for all pipelines includes instruments from all readers. So when callbacks are invoked during collect for one reader, it "observes" all of the instruments for all readers.
For observable instruments, instead of using
lookup
to fetch all instruments (for all readers), and then usingregisterCallbacks
to register them will all pipelines, it now iterates through each pipeline and fetches only instruments for that pipeline (inserter), and registers callbacks on those instruments with the pipeline.