Skip to content

Add validation for exponential native histogram schema #6745

@yeya24

Description

@yeya24
Contributor

Is your feature request related to a problem? Please describe.
There is a TODO in distributor receiving native histogram samples.

// TODO(yeya24): add max schema validation for native histogram if needed.

We need to make sure that the Native Histogram samples' schema is valid ( >= -4 && <= 8). This is important because certain functionalities of native histogram in Prometheus require the schema to be exponential schema (>=-4 && <=8).

Note that all native histogram samples collected from Prometheus should have valid schema except NHCB today. However, exponential histogram from OTEL might have invalid schema outside the range if the collector doesn't convert the schema to be Prometheus compatible in certain versions.

Describe the solution you'd like
Add validation in Distributor and maybe Ingester to make sure the ingested Native Histogram sample has valid schema. If invalid, either reject or reduce resolution for the sample and the strategy can be configurable.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @yeya24

      Issue actions

        Add validation for exponential native histogram schema · Issue #6745 · cortexproject/cortex