On 04.11.22 22:16, 'Fabian Stäber' via Prometheus Developers wrote:
> 
> Now, I'm not sure how to set the MetricFamily.name field for Counter
> metrics.
> 
> Should I use the name including the "_total" suffix here or without the
> "_total" suffix?

Short answer: Include the _total suffix.

Longer answer: OpenMetrics mandates to remove the _total suffix in the
metric family. That's a breaking change from the original Prometheus
format, both text and protobuf. (Which implies that you need to remove
the suffix when implementing the OpenMetrics protobuf format.) While
the change makes sense from a certain consistency perspective, I
personally think it's not worth the breakage it causes in many cases
(among them the collision of two standard Go metrics exposed by
prometheus/client_golang). It is one of a number of adoption hurdles,
and I would love to see this decision revisited.

-- 
Björn Rabenstein
[PGP-ID] 0x851C3DA17D748D03
[email] bjo...@rabenste.in

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prometheus-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-developers/Y3IdZ1oFqVKagR2e%40mail.rabenste.in.

Reply via email to