Description
What are you trying to achieve?
I am working on a project built on OTel and Prometheus (overview blog post here) and am trying to make the metrics I generate fit both OpenTelemetry and OpenMetrics as best as I can. However, there is an unfortunate and seemingly unnecessary divergence between these two standards with regard to the naming of counters.
The OTel semantic conventions say that count
should be used as a suffix while OpenMetrics mandates that counters end with a total
suffix. It seems silly that metrics produced with OTel and then exported to Prometheus would end up with a _count_total
suffix.
I completely understand if this part of the spec is too far along to change it now. But, if not, I'd like to propose changing the recommendation to say that the word total
should be used instead. Those two words are pretty close to synonymous so it doesn't seem like it would be that painful to go with the one chosen by OpenMetrics for that extra little bit of compatibility.
For what it's worth, I personally prefer the word count
so I can see why OTel chose it, but I'd opt for the substantive benefit of better compatibility between the standards over that instinct.
Additional context.
The Metrics Semantic Conventions say:
Use count Instead of Pluralization
If the value being recorded represents the count of concepts signified by the namespace then the metric should be named count (within its namespace). The pluralization rule does not apply in this case.
For example if we have a namespace system.processes which contains all metrics related to the processes then to represent the count of the processes we can have a metric named system.processes.count. The suffix count here indicates that it is the count of system.processes.
OpenMetrics says:
Counter
The MetricPoint's Total Value Sample MetricName MUST have the suffix "_total".