open-telemetry / open-telemetry/opentelemetry-java
[JavaAgent] Autoconfigure customizer for metric exporter in pull-based model, E.g., Prometheus, for all (custom and autogenerated) metrics.
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 2.5k
- Forks
- 1k
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 58
Description
Discussed in https://github.com/open-telemetry/opentelemetry-java/discussions/5163
Originally posted by lokeshmavale February 1, 2023
Hi Team,
I have requirement to send metrics in OTLP & Prometheus format. While sending metric I want to enrich the attributes for all the metrics (custom and autogenerated).
With Auto Configure SPI, I was able to override metrics using autoConfiguration.addMetricExporterCustomizer(this::configureSdkMetricExporterProvider);
I have observed that, this exporter only has access to OTLP (push based) exporter.
How can I override Prometheus exporter without creating all new Prometheus server and registering it with auto agent using autoConfiguration.addMeterProviderCustomizer(). ?
Do we support pull based model exporter override via auto configuration?
Thanks,
Lokesh
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the JavaAgent auto-configuration SPI paths using addMetricExporterCustomizer and addMeterProviderCustomizer, then compare the existing OTLP exporter customization with the Prometheus pull-based exporter. Review the linked discussion and determine the supported customization point for custom and autogenerated metrics; done means the intended behavior and scope are implemented or clearly documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, prometheus
- Domain
- observability
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100