Skip to content

In the latest version Prometheus Exporter func (*Exporter) ServeHTTP was removed , how can i to expoter my metric use http server ? #5974

Answered by dmathieu
Lucareful asked this question in Q&A
Discussion options

You must be logged in to vote

See the prometheus example:
https://github.com/open-telemetry/opentelemetry-go-contrib/blob/main/examples/prometheus/main.go#L88

You should be using promhttp as the handler to make metrics available. The prometheus exporter will pass data to it.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@pellared
Comment options

@Lucareful
Comment options

Answer selected by Lucareful
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants