go-http-metrics icon indicating copy to clipboard operation
go-http-metrics copied to clipboard

Support native histogram exposition for Prometheus

Open jaredjenkins opened this issue 1 year ago • 2 comments

This patch adds optional native histogram support for the two histograms currently offered in this library.

jaredjenkins avatar Apr 17 '24 14:04 jaredjenkins

This is an awesome feature! many thanks, however I'm not sure about adding this directly to the Prometheus metrics backend currently used, what do you think if we make a new prometheus native histograms backend and once native histograms are stable, we think how to merge/promote to the prometheus default backend? This package could be called something like prometheus_native_histograms or similar.

slok avatar Apr 19 '24 08:04 slok

This is an awesome feature! many thanks, however I'm not sure about adding this directly to the Prometheus metrics backend currently used, what do you think if we make a new prometheus native histograms backend and once native histograms are stable, we think how to merge/promote to the prometheus default backend? This package could be called something like prometheus_native_histograms or similar.

@slok I'm not sure the extra implementation is worth it given that Native Histograms will GA this year and the schema is pretty well established at this point. Prometheus needs to maintain compatibility with the Exponential Histograms in OpenTelemetry and the protos are fairly similar in terms of what they cover. This change is a no-op unless folks decide to use native histograms, too. If you set a bucket factor of < 1, it won't be exposed as a native histogram. And, Prometheus will be offering the ability to scrape both classic and native so that people can migrate over time.

jaredjenkins avatar Apr 19 '24 10:04 jaredjenkins