-
Notifications
You must be signed in to change notification settings - Fork 177
Inconsistent requirements for suffixes #284
Copy link
Copy link
Open
Description
The spec says
The name of a MetricFamily MUST NOT result in a potential clash for sample metric names as per the ABNF with another MetricFamily in the Text Format within a MetricSet. An example would be a gauge called "foo_created" as a counter called "foo" could create a "foo_created" in the text format.
I read this as a counter name MUST NOT end in _created, because this results in a potential clash.
However, the spec also says
Exposers SHOULD avoid names that could be confused with the suffixes that text format sample metric names use.
Suffixes for the respective types are:
- Counter: '_total', '_created'
- Summary: '_count', '_sum', '_created', '' (empty)
- Histogram: '_count', '_sum', '_bucket', '_created'
- GaugeHistogram: '_gcount', '_gsum', '_bucket'
- Info: '_info'
- Gauge: '' (empty)
- StateSet: '' (empty)
- Unknown: '' (empty)
Here it says SHOULD NOT.
It would be good to have more clarity whether a suffix like _created is allowed in a metric name or not.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels