eclipse / microprofile-metrics

microprofile-metrics
Apache License 2.0
100 stars 66 forks source link

Counters are considered dimensionless, but allow units #501

Open jmartisk opened 4 years ago

jmartisk commented 4 years ago

Spec says

Counter metrics are considered dimensionless. The implementation must not append the unit name to the metric name and must not scale the value.

The word 'dimensionless' implies to me that there is no unit at all. So I think we should either rephrase/remove the first sentence, or forbid specifying units for counters (which would be a breaking change, so I suppose the first solution is better).

donbourne commented 4 years ago

I think it would make sense to soften that wording a bit. It's not forbidden for a counter to have a unit, but most of the time it's implicit from the name of the metric, which is why we don't want the implementation appending units.