client_golang icon indicating copy to clipboard operation
client_golang copied to clipboard

Consider supporting constant native histograms

Open dashpole opened this issue 1 year ago • 2 comments

For OpenTelemetry's prometheus exporters, we would like to be able to export OTel exponential histograms: https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/33703, https://github.com/open-telemetry/opentelemetry-go/issues/5777.

It would be helpful to have a NewConstNativeHistogram constructor, which mirrors the NewConstHistogram constructor. Unclear if we need all of the variants (Vec, with CT, etc).

Alternatively, we could directly implement the prometheus.Metric interface. I don't think it would be that hard to do, but I haven't tried. Feel free to close this issue if we should go that route instead.

dashpole avatar Sep 04 '24 15:09 dashpole

I'm supportive :)

ArthurSens avatar Sep 14 '24 17:09 ArthurSens

I can give this a shot if thats okay

Maniktherana avatar Sep 22 '24 16:09 Maniktherana

As we still need to support exemplars on the const native histogram, I re-open this.

See https://github.com/prometheus/client_golang/pull/1654#issuecomment-2476486384 for details how to implement that.

beorn7 avatar Nov 14 '24 14:11 beorn7

#1686 fixed this.

beorn7 avatar May 06 '25 21:05 beorn7