Skip to content

nhcb: implement on scrape conversion of classic histograms to custom histograms  #13529

@krajorama

Description

@krajorama

Proposal

Depends on #13486 , #13487 . We should be able to get some tests going without the second one.

Add new options to scrapeLoopOptions called convertClassicHistograms, enableNativeHistograms.

Only do the conversion from classic to custom (native) histograms if both are true.

Note: enableNativehistograms will come in handy when we have prometheus/proposals#32 implemented.

From the rules of Prometheus text exposition format and OpenMetrics text format and the OpenMetrics ProtoBuf spec and Prometheus ProtoBuf spec it follows that the buckets, count, sum are grouped together per metric, thus a global state is not required to keep track of metrics. However an accumulator is need to trigger writing custom histograms when switching metrics and all series are accounted for .

Important the scrape should still produce the classic histogram series if scrapeClassicHistograms is true.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions