-
Notifications
You must be signed in to change notification settings - Fork 38
Closed
Description
https://prometheus.io/docs/instrumenting/writing_exporters/
"
Don’t do this:
my_metric{label="a"} 1
my_metric{label="b"} 6
my_metric{label="total"} 7
or this:
my_metric{label="a"} 1
my_metric{label="b"} 6
my_metric{} 7
The former breaks for people who do a sum() over your metric, and the latter breaks sum and is quite difficult to work with. Some client libraries, for example Go, will actively try to stop you doing the latter in a custom collector, and all client libraries should stop you from doing the latter with direct instrumentation. Never do either of these, rely on Prometheus aggregation instead.
"
Amendment to #125 fixes. See new fixes in #135.
TODO:
- Prevent using reserved label names such as
le
Metadata
Metadata
Assignees
Labels
No labels