-
Notifications
You must be signed in to change notification settings - Fork 502
[SDK] Update MetricProducer interface to match spec #3044
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
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3044 +/- ##
==========================================
+ Coverage 87.12% 87.78% +0.66%
==========================================
Files 200 195 -5
Lines 6109 5954 -155
==========================================
- Hits 5322 5226 -96
+ Misses 787 728 -59
|
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.
Thanks for the fix.
Not a full review, just some preliminary comments.
✅ Deploy Preview for opentelemetry-cpp-api-docs canceled.
|
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, thanks for the fix.
Following https://github.com/open-telemetry/opentelemetry-specification/blob/v1.36.0/specification/metrics/sdk.md#metricproducer.
Updates #1831
Changes
Updates
MetricProducerto return a batch of metric points instead of receiving a callback.According to the spec,
ProduceSHOULD also take a Resource parameter, but I have chosen not to do that (because existing implementations pull the resource from the metric context). I'm not familiar with this area so I'd appreciate any advice.MetricFiltersupport isn't stable yet so I've kept it out of this initial PR.For significant contributions please make sure you have completed the following items:
CHANGELOG.mdupdated for non-trivial changes