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.

Open
#7,723 6 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.