Skip to content

Exemplar for +Inf bucket adds bucket with wrong value #1147

@balintzs

Description

@balintzs

When writing histogram metrics, and there is an exemplar for the +Inf bucket, then the +Inf bucket is added with the value of the previous bucket:
https://github.com/prometheus/client_golang/blob/main/prometheus/metric.go#L188

This is incorrect, as the cumulative count of the +Inf bucket should instead be added with the total count of the histogram datapoint.

The above behaviour results in invalid values being reported for the +Inf bucket.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions