opentelemetry-specification icon indicating copy to clipboard operation
opentelemetry-specification copied to clipboard

Clarify unit annotation format for metric semantic conventions

Open arminru opened this issue 2 years ago • 2 comments

The semantic conventions for metrics currently use both spaces and underscores in unit annotations consisting of multiple words. Additionally, we have examples where the spaces between words are just omitted.

Before calling any of the metrics semantic conventions stable, we should add guidance on what's preferred and align the existing conventions to be consistent.

Also, as per the UCUM standard, both 1 and {count} are considered equivalent, which might lead to inconsistent conventions. A preference for either of them could also be laid out by the OTel spec.

Examples

https://github.com/open-telemetry/opentelemetry-specification/blob/534d4562b9e4f9ba030146783a1785f94b266862/specification/metrics/semantic_conventions/instrumentation/kafka.md?plain=1#L40-L42 https://github.com/open-telemetry/opentelemetry-specification/blob/534d4562b9e4f9ba030146783a1785f94b266862/specification/metrics/semantic_conventions/instrumentation/kafka.md?plain=1#L78-L83 https://github.com/open-telemetry/opentelemetry-specification/blob/534d4562b9e4f9ba030146783a1785f94b266862/specification/metrics/semantic_conventions/instrumentation/kafka.md?plain=1#L65 https://github.com/open-telemetry/opentelemetry-specification/blob/534d4562b9e4f9ba030146783a1785f94b266862/specification/metrics/semantic_conventions/faas-metrics.md?plain=1#L43

arminru avatar Aug 09 '22 09:08 arminru

@arminru do yo plan to work on this? If not we need a "help wanted" label.

tigrannajaryan avatar Aug 15 '22 21:08 tigrannajaryan

I'd like to take a look at this. @jsuereth do you see this issue depending on any output from the Semantic Conventions Working Group, or can it be worked on in parallel?

evan-bradley avatar Oct 11 '22 13:10 evan-bradley