Skip to content

Counters have a suffix "_total" #105

@fvaleri

Description

@fvaleri

The Prometheus library appends the _total type suffix to all counter metrics, which you should remove when adding these metrics to the allowlist. If you forget or don't know that you have to remove this suffix from the endpoint output, you can easily make a mistake when filtering by the exact metric name (see strimzi/strimzi-kafka-operator#12142).

Prometheus also appends unit suffix (_bytes, _ratio and _milliseconds), so the issue is not limited to the type suffix (_total). As a minimum we should document this behavior in the README, but it would be good to export the original metrics name without any change as OTel collector does (open-telemetry/opentelemetry-collector#6403).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions