Skip to content

Conversation

tylerbenson
Copy link
Member

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.

@tylerbenson tylerbenson requested a review from a team as a code owner April 7, 2025 18:20
@tylerbenson tylerbenson force-pushed the tyler/metric-exporter-stats branch from a079a8a to ce5770a Compare April 7, 2025 18:22
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.
@tylerbenson tylerbenson force-pushed the tyler/metric-exporter-stats branch from 2bafd3a to d630c00 Compare April 7, 2025 22:30
Copy link

codecov bot commented Apr 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.61%. Comparing base (04677f9) to head (8673ef2).
Report is 6 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@jack-berg jack-berg left a 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

@jack-berg
Copy link
Member

Thanks! Will merge after the conflict is resolved

# Conflicts:
#	exporters/otlp/all/src/test/java/io/opentelemetry/exporter/otlp/http/metrics/OtlpHttpMetricExporterBuilderTest.java
@tylerbenson tylerbenson force-pushed the tyler/metric-exporter-stats branch from 555806f to 8673ef2 Compare April 18, 2025 14:47
@jack-berg jack-berg merged commit b468a2e into open-telemetry:main Apr 21, 2025
47 of 49 checks passed
@tylerbenson tylerbenson deleted the tyler/metric-exporter-stats branch April 24, 2025 01:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants