Adding PrometheusHistograms support to VictoriaMetrics/metrics

TL;DR: I added support for PrometheusHistograms (those with le buckets) to the VictoriaMetrics/metrics package (a lightweight alternative to prometheus/client_golang), which allows me to: Switch to the more lightweight VictoriaMetrics/metrics library in my open-source projects, which I find simpler to use Make it possible to choose between classical Prometheus histograms or VictoriaMetrics histograms (much more precise) with a flag Maintain compatibility with existing Prometheus-based monitoring setups Problem While working on kubenurse, I wanted to switch from the heavier prometheus/client_golang library to the more lightweight VictoriaMetrics/metrics package. However, there was one significant blocker: the VictoriaMetrics library only supported their own log-based histogram format, not the traditional Prometheus histograms with static le buckets. ...

12 July 2025 · 4 min · 745 words · Clément Nussbaumer