beyla
beyla copied to clipboard
Migrate Prometheus metrics to use the OTel SDK
At the time we added the Prometheus support the Otel SDK didn't have direct Prometheus support, but now they do. We can simplify the code by declaring the metrics once, by leveraging the OTel SDK directly for Prometheus.
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/prometheus/main.go
I've been looking a this I found the following issues:
- It doesn't support native/exponential histograms. So using the exporter would block the progress of #566
- We might encounter other issues like this: https://github.com/open-telemetry/opentelemetry-go/issues/4032
- Using the exporter it will produce
target_info
metric per target (more info here), which will make harder for users when doing queries in PromQL.