Skip to main content
High cardinality from unbounded labels is a well-known problem — but classic Prometheus histograms introduce a second, often hidden, source of cardinality growth. This page explains why classic histograms can explode your time-series count, how Prometheus native histograms address the problem, and how to enable them. Why this matters
  • Excessive time series increases storage, indexing, and scrape pressure.
  • Classic histograms multiply time series by the number of buckets for every unique label combination.
  • Native histograms store distributions more efficiently, reducing cardinality and improving resolution where it matters.
Example: combinatorial labels Consider instrumentation that produces many label combinations:
Combinatorial explosion is easy to reach in practice. For example:
  • 5 HTTP methods × 10 status codes × 50 endpoints = 2,500 distinct label combinations
  • If your histogram uses 13 buckets, that becomes:
    • 2,500 label combinations × 13 buckets = 32,500 time series for a single histogram metric
That growth happens even when labels are well designed — it’s the nature of classic histograms.
A slide titled "Hidden Cardinality in Histograms" showing orange histogram bars with most counts at short intervals (50–500 ms) and a large outlined blue bin that aggregates values from about 1s to 5s. The vertical axis is labeled "Frequency" and the x-axis shows bin labels like 50ms, 100ms, 250ms, 500ms, 1s, 2.5s, 5s.
What’s wrong with classic histograms?
  • One time series per le bucket (plus sum and count) for each label combination.
  • Bucket boundaries are fixed at instrumentation time. If the distribution changes, buckets can be either:
    • Mostly empty (wasted series/storage), or
    • Too coarse where precision is needed (poor resolution).
  • Increasing the number of buckets improves precision but multiplies cardinality and costs.
How native histograms solve this
  • Classic histograms: one series per bucket per label set.
  • Native histograms: encode the entire distribution (buckets, sum, count) into a single sparse time series.
  • Empty or unused buckets cost essentially nothing, so cardinality remains tied to the labels, not the bucket count.
Practical impact:
  • The earlier example with 2,500 label combinations stays at roughly 2,500 series with native histograms instead of ~32,500 — at least a 13× reduction.
  • Teams that use 20–30 buckets for better resolution can realize even larger savings.
A slide titled "Native Histograms" showing a side-by-side comparison of Classic vs Native histograms. It lists differences across Definition, Storage, Precision, Cardinality and Best-for use cases.
Native histograms also adapt resolution automatically. Instead of choosing fixed boundaries at instrumentation time, they typically use an exponential-like bucketing strategy and an encoding that concentrates resolution where data actually falls. This reduces the need to guess good bucket boundaries in advance. Classic histogram example (Prometheus exposition format)
With native histograms, the same distribution is kept in a single encoded series rather than separate _bucket series for each le value. This reduces scrape overhead, storage, and indexing pressure. Configuration and support
  • Prometheus added experimental support for scraping native histograms around 2022; support has matured in later releases.
  • Exact availability and stability depend on your Prometheus version — check the Prometheus release notes and documentation for your version.
  • Enable native histograms in Prometheus scrape configuration (globally or per scrape job) using:
References and related links
Native histograms are supported end-to-end: Prometheus can scrape and store them, and tools like Grafana and Mimir, along with PromQL functions such as histogram_count, histogram_sum, and histogram_quantile, operate natively on the encoded distribution.
Quick comparison (high level) Takeaway
  • Classic histograms are among the largest real-world drivers of cardinality in metrics systems.
  • Prometheus native histograms offer a production-ready alternative that reduces cardinality and adapts resolution automatically.
  • If your metrics pipeline and tooling support them, native histograms are a practical tool to control cost and improve precision.
A presentation slide with a turquoise sidebar labeled "Takeaway." The main text reads that "Classic Histograms are one of the biggest cardinality drivers in real-world deployments."
Native histograms reduce cardinality and improve resolution where it matters, making them an important option to consider when designing your instrumentation and observability pipeline.

Watch Video