Skip to content

Native histograms: testutil to provide ways to verify native histograms #1824

@krajorama

Description

@krajorama

Proposal

Related to grafana/mimir#11573 where someone is adding a pure native histogram.

Currently (June 2025) there's no text representation implemented for native histograms so one cannot use the GatherAndCompare from the testutil package to assert on: existence and value of native histograms.

The text format for native histograms - as proposed currently - isn't straightforward for developers to assert on. Doesn't have buckets, rather it has spans and deltas and such.

A solution is needed to be able to:

  • check that a native histogram was gathered
  • check the count
  • check the sum
  • check that it has expected number of observations in an interval

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions