-
I can not seem to figure out how to use the prometheus exporter to send telemetry data to Grafana. I don't know how to set the endpoint URL, or how to get a trace.SpanExporter out of a prometheus *Exporter as I seem to need to (to get a TracerProvider). |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
You seem to be mixing traces and metrics. Prometheus is a metrics system, it can only expose that factor, not traces. However, with prometheus, you won't "send" data, as it's a pull-based system. The prometheus exporter will allow you to expose a |
Beta Was this translation helpful? Give feedback.
-
Yes, I confused metrics and traces. I see now that the Jaeger exporter will be more appropriate for me. |
Beta Was this translation helpful? Give feedback.
You seem to be mixing traces and metrics. Prometheus is a metrics system, it can only expose that factor, not traces.
Did you look at the prometheus example? It shows how to configure it in a sample app, and exposes a few metrics: https://github.com/open-telemetry/opentelemetry-go/blob/main/example/prometheus/main.go
However, with prometheus, you won't "send" data, as it's a pull-based system. The prometheus exporter will allow you to expose a
/metrics
endpoint that prometheus can parse. Then, grafana can hook into your prometheus instance and use the data from there.