Skip to content

Prometheus 3 Native Histogram and OpenTelemetry Exponential Histogram #7356

@sunng87

Description

@sunng87

What type of enhancement is this?

API improvement

What does the enhancement do?

Prometheus Native Histogram

Native histogram becomes a stable feature of Prometheus since 3.8

General structure

Similar to a classic histogram, a native histogram has a field for the count of observations and a field for the sum of observations. While the count of observation is generally non-negative (with the only exception being intermediate results in PromQL), the sum of observations might have any float64 value.

In addition, a native histogram contains the following components, which are described in detail in dedicated sections below:

  • A schema to identify the method of determining the boundaries of any given bucket with an index i.
  • A sparse representation of indexed buckets, mirrored for positive and negative observations.
  • A zero bucket to count observations close to zero.
  • A (possibly empty) list of custom values.
    Exemplars.

More context: https://prometheus.io/docs/specs/native_histograms/

Not sure if it's required to support Remote Write 2.0 first. #4765

OpenTelemetry Exponential Histogram

OpenTelemetry Exponential Histogram is the OpenTelemetry equivalent to Prometheus Native Histogram. We can use the data structure of Prometheus to support this Otel data type.

https://opentelemetry.io/docs/specs/otel/metrics/data-model/#exponentialhistogram

Implementation challenges

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-writeInvolves code in write pathC-enhancementCategory Enhancements

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions