Skip to content

Clarify implications of negative observations for Sum #193

Description

@beorn7

The RFC is very clear about the Sum of a Histogram being a counter: "Semantically, Sum, and buckets values are counters…".

It later states: "Negative threshold buckets MAY be used, but then the Histogram MetricPoint MUST NOT contain a sum value as it would no longer be a counter semantically."

However, the absence of negative buckets is not sufficient to guarantee that Sum has counter semantics. You could still put a negative measurement into a Histogram with only positive bucket boundaries. I believe the relation is stricter, more like: "A Histogram MAY receive negative measurements, but any such Histogram MUST NOT contain a Sum value as it would no longer be a counter semantically."

The Sum of a Summary is a counter, too: "Semantically, Count and Sum values are counters…" However, the issue of negative measurements is not even mentioned for Summaries. I suggest a similar wording as above, i.e. you MUST get rid of the Sum to receive negative measurements.

(I think I mentioned the above in my comments when reviewing the RFC in an earlier stage. Perhaps it got lost. Or perhaps I'm missing something. My apologies in advance if the latter is the case.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions