Prometheus 2.40 Released: Experimental Native Histograms
Prometheus 2.40 introduced an experimental, native way of representing and storing histograms, a high-resolution successor to classic histograms enabled via a feature flag and the protobuf exposition format.
Historical Archive. This article documents an event from 2022 and is preserved with its original date for reference. It is not current news, and details may have changed since publication.
What happened
Prometheus 2.40.0 was released on November 8, 2022, according to the official GitHub release notes. Its defining feature was the introduction of an experimental, native way of representing and storing histograms, one of the most significant additions to Prometheus's data model in years.
Native histograms
Native histograms are a higher-resolution, more efficient alternative to Prometheus's classic histograms, which relied on a fixed set of predefined buckets. They can be enabled in Prometheus with the --enable-feature=native-histograms flag, which also switches the preferred exposition format to protobuf. To instrument an application, developers use a recent client_golang and set a NativeHistogramBucketFactor in their histogram options, with 1.1 suggested as a good starting point.
How they work
Unlike classic histograms, where an operator must choose bucket boundaries in advance and trade resolution against cardinality, native histograms use exponentially sized buckets defined by a bucket factor, giving high resolution across a wide range of values with much lower storage cost. Existing histograms would not switch to native representation until the bucket factor was set, allowing a gradual migration.
Other additions
Beyond native histograms, Prometheus 2.40 added service discovery for OVHcloud, switched Kubernetes service discovery to protobuf encoding, improved time-series-database sorting speed, and added support for Consul enterprise admin partitions. It also fixed API error codes for the labels and series endpoints.
Why it mattered
Prometheus 2.40 began a multi-year effort to modernise one of the most fundamental metric types. Native histograms addressed the long-standing tension between resolution and cost in classic histograms, and the feature would continue to mature across later releases toward the stabilised Prometheus 3.0.
Related on Skillo
See also: Prometheus 2.53's lower memory usage.
Sources
Published date reflects the original event date (2022-11-08). This article is original Skillo editorial written from the sources above; facts were verified in September 2026.
Written by
Skillo Staff
0 Comments
Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.