-
Notifications
You must be signed in to change notification settings - Fork 834
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
Implement prometheus exporter provider #5053
Conversation
@@ -14,8 +14,6 @@ dependencies { | |||
|
|||
implementation(project(":semconv")) | |||
|
|||
compileOnly(project(":exporters:prometheus")) |
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.
Last exporter compile dependency is gone! Woot!
Codecov ReportBase: 91.17% // Head: 91.21% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #5053 +/- ##
============================================
+ Coverage 91.17% 91.21% +0.04%
- Complexity 4871 4877 +6
============================================
Files 553 553
Lines 14396 14402 +6
Branches 1374 1375 +1
============================================
+ Hits 13125 13137 +12
+ Misses 883 878 -5
+ Partials 388 387 -1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
...oconfigure/src/main/java/io/opentelemetry/sdk/autoconfigure/MetricExporterConfiguration.java
Outdated
Show resolved
Hide resolved
...extensions/autoconfigure/src/main/java/io/opentelemetry/sdk/autoconfigure/ClasspathUtil.java
Outdated
Show resolved
Hide resolved
* Implement prometheus exporter provider * Remove stray comment * Adjust method visibility * Delete ClasspathUtil
Related to #4949.
Prometheus is implemented as a
MetricReader
rather thanMetricExporter
so implementingConfigurableMetricExporterProvider
isn't an option. This PR takes a different approach and implements theAutoConfigurationCustomizerProvider
, which allowsPrometheusCustomizerProvider
to customize theSdkMeterProviderBuilder
withPrometheusHttpServer
whenotel.metrics.exporter=prometheus
.We could also add a new SPI for providing named
MetricReader
s, but we don't actually support custom implementations ofMetricReader
right now so I don't think that's a good idea.