-
Notifications
You must be signed in to change notification settings - Fork 835
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
feat(sdk-metrics-base): hoist async instrument callback invocations #2822
feat(sdk-metrics-base): hoist async instrument callback invocations #2822
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2822 +/- ##
==========================================
+ Coverage 92.88% 93.01% +0.12%
==========================================
Files 182 183 +1
Lines 5906 5909 +3
Branches 1253 1254 +1
==========================================
+ Hits 5486 5496 +10
+ Misses 420 413 -7
|
89c0ecd
to
0cc471f
Compare
Does this depend on another PR? |
It depends on one statement in open-telemetry/opentelemetry-specification#2363:
|
# Conflicts: # experimental/packages/opentelemetry-sdk-metrics-base/src/state/MeterSharedState.ts
However, I think the depended statement in open-telemetry/opentelemetry-specification#2363 is unlikely to change (as the spec PR is mainly focused on multi-instrument callbacks). To get async instruments to work correctly with views, the problem that callbacks associated with one instrument are invoked multiple times during a single collection is outstanding and needs to be fixed by this PR. Maybe we should proceed with this PR? |
I would proceed with it. I agree the statement is unlikely to change. Even if it does change, it is unlikely to become a complete contradiction and they would likely only tweak wording. |
@open-telemetry/javascript-approvers this is ready for review, PTAL, thank you :D |
# Conflicts: # experimental/packages/opentelemetry-sdk-metrics-base/test/state/MetricStorageRegistry.test.ts
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, do you expect to tackle the timeout part afterwards ? Since its not a hard requirement on the spec part
@vmarchaud I'm not sure which timeout you are referring to. #2742 is expected to provide async observer timeout support properly. |
I didn't see this PR sorry |
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
experimental/packages/opentelemetry-api-metrics/src/types/Meter.ts
Outdated
Show resolved
Hide resolved
4e8c364
to
482a74f
Compare
Which problem is this PR solving?
This PR add support for the spe changes introduced in open-telemetry/opentelemetry-specification#2361.
Blocked on:Fixes #2782
Short description of the changes
Type of change
How Has This Been Tested?
Checklist: