You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
a4dd93b enforced counters ending in _total, but the unit= parameter doesn't seem to interact well with that. If I pass unit="total" to a Counter, I get a _total_total suffix (but only in some places?).
$ python3.6
Python 3.6.8 (default, Aug 7 2019, 17:28:10)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-39)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from prometheus_client import Counter
>>> c = Counter('my_failures', 'Description of counter', unit="total")
>>> c.inc(6.6)
>>> from prometheus_client import start_http_server, Summary
>>> start_http_server(8000)
$ curl localhost:8000/metrics
...
# HELP my_failures_total_total Description of counter
# TYPE my_failures_total_total counter
my_failures_total 6.6
my_failures_created 1.5888939194938827e+09
This is with version 0.7.1.
The text was updated successfully, but these errors were encountered:
nritsche
changed the title
Setting metric unit to "_total"
Setting metric unit to "total"
May 7, 2020
Oh, I see. I didn't read this careful enough: https://prometheus.io/docs/practices/naming/. The _total goes behind the unit. Anyways, note that the exposed metric doesn't match it's "HELP" and "TYPE".
a4dd93b enforced counters ending in
_total
, but theunit=
parameter doesn't seem to interact well with that. If I passunit="total"
to aCounter
, I get a_total_total
suffix (but only in some places?).This is with version
0.7.1
.The text was updated successfully, but these errors were encountered: