metrics icon indicating copy to clipboard operation
metrics copied to clipboard

Histograms compatible with Prometheus

Open vearutop opened this issue 3 years ago • 2 comments

Documentation makes a statement on Prometheus histograms support.

Why Histogram buckets contain vmrange labels instead of le labels like in Prometheus histograms?

Buckets with vmrange labels occupy less disk space compared to Promethes-style buckets with le labels, because vmrange buckets don't include counters for the previous ranges. VictoriaMetrics provides prometheus_buckets function, which converts vmrange buckets to Prometheus-style buckets with le labels. This is useful for building heatmaps in Grafana. Additionally, its' histogram_quantile function transparently handles histogram buckets with vmrange labels.

While I appreciate the new way of exposing and storing histogram data with vmrange, the lack of of support for le histograms reduces applicability of this library.

As a developer I'm not entirely happy with standard prometheus client (for a variety of reasons from clumsy API to protobuf dependencies) and I would like to use metrics instead, but as a developer I don't have control of what kind of technology is provided by infrastructure (Prometheus, VictoriaMetrics, etc..).

Unfortunately lack of support for le histograms makes this client incompatible with Prometheus scraper/db.

Hopefully the decision about additionally supporting le histograms can be reconsidered, so that metrics works nicely with a variety of scrapers/db.

Maybe that would also help for better adoption of VictoriaMetrics as applications may have a smoother transition by integrating metrics client first and switching scraper/db technology later.

vearutop avatar Aug 10 '21 12:08 vearutop

+1

greyireland avatar Feb 05 '23 15:02 greyireland

#45 support le label

greyireland avatar Feb 07 '23 08:02 greyireland