-
Notifications
You must be signed in to change notification settings - Fork 905
Allow Otlp*MetricExporter's to publish export stats #7255
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
Allow Otlp*MetricExporter's to publish export stats #7255
Conversation
a079a8a
to
ce5770a
Compare
Previously there was no way to report stats for otlp metric exporters. Now we can supply a MeterProvider lazily. When export is invoked if the previously provided meter is a noop implementation it will try again, allowing for delayed/lazy initialization.
2bafd3a
to
d630c00
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #7255 +/- ##
=========================================
Coverage 89.60% 89.61%
- Complexity 6859 6868 +9
=========================================
Files 780 780
Lines 20728 20739 +11
Branches 2018 2018
=========================================
+ Hits 18574 18585 +11
Misses 1514 1514
Partials 640 640 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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!
You'll also want to make sure OtlpMetricExporterProvider
implementation follows the pattern of setting the meter provider using the AutoConfigureListener
callback, following the example of logs and spans. e.g.: https://github.com/open-telemetry/opentelemetry-java/blob/main/exporters/otlp/all/src/main/java/io/opentelemetry/exporter/otlp/internal/OtlpLogRecordExporterProvider.java#L32-L99
exporters/common/src/main/java/io/opentelemetry/exporter/internal/ExporterMetrics.java
Show resolved
Hide resolved
exporters/common/src/main/java/io/opentelemetry/exporter/internal/ExporterMetrics.java
Show resolved
Hide resolved
exporters/common/src/test/java/io/opentelemetry/exporter/internal/ExporterMetricsTest.java
Outdated
Show resolved
Hide resolved
Thanks! Will merge after the conflict is resolved |
# Conflicts: # exporters/otlp/all/src/test/java/io/opentelemetry/exporter/otlp/http/metrics/OtlpHttpMetricExporterBuilderTest.java
555806f
to
8673ef2
Compare
Previously there was no way to report stats for otlp metric exporters.
Now we can supply a MeterProvider lazily. When export is invoked if the previously provided meter is a noop implementation it will try again, allowing for delayed/lazy initialization.