Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify unit annotation format for metric semantic conventions #2719

Open
arminru opened this issue Aug 9, 2022 · 2 comments
Open

Clarify unit annotation format for metric semantic conventions #2719

arminru opened this issue Aug 9, 2022 · 2 comments
Labels
area:semantic-conventions Related to semantic conventions help wanted Extra attention is needed release:required-for-ga Must be resolved before GA release, or nice to have before GA spec:metrics Related to the specification/metrics directory triaged-accepted The issue is triaged and accepted by the OTel community, one can proceed with creating a PR proposal

Comments

@arminru
Copy link
Member

arminru commented Aug 9, 2022

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

| messaging.kafka.partition.current_offset | Gauge | Int64 | partition offset | `{partition offset}` | Current offset of partition of topic. | `topic` | The ID (integer) of a topic |
| | | | | | | `partition` | The number (integer) of the partition |
| messaging.kafka.partition.oldest_offset | Gauge | Int64 | partition offset | `{partition offset}` | Oldest offset of partition of topic | `topic` | The ID (integer) of a topic |

| messaging.kafka.consumer.offset_sum | Gauge | Int64 | offset sum | `{offset sum}` | Sum of consumer group offset across partitions of topic | `group` | The ID (string) of a consumer group |
| | | | | | | `topic` | The ID (integer) of a topic |
| messaging.kafka.consumer.lag | Gauge | Int64 | lag | `{lag}` | Current approximate lag of consumer group at partition of topic | `group` | The ID (string) of a consumer group |
| | | | | | | `topic` | The ID (integer) of a topic |
| | | | | | | `partition` | The number (integer) of the partition |
| messaging.kafka.consumer.lag_sum | Gauge | Int64 | lag sum | `{lag sum}` | Current approximate sum of consumer group lag across all partitions of topic | `group` | The ID (string) of a consumer group |

| messaging.kafka.producer.record-sent.rate | Gauge | Double | records sent rate | `{records_sent}/s` | The average number of records sent per second for a specific topic. | `client-id` | `client-id` value |

| `faas.coldstarts` | Counter | default unit | `{coldstarts}` | Number of invocation cold starts. |

@arminru arminru added area:semantic-conventions Related to semantic conventions spec:metrics Related to the specification/metrics directory release:required-for-ga Must be resolved before GA release, or nice to have before GA labels Aug 9, 2022
@rbailey7210 rbailey7210 added the triaged-accepted The issue is triaged and accepted by the OTel community, one can proceed with creating a PR proposal label Aug 12, 2022
@tigrannajaryan tigrannajaryan removed their assignment Aug 15, 2022
@tigrannajaryan
Copy link
Member

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

@evan-bradley
Copy link
Contributor

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:semantic-conventions Related to semantic conventions help wanted Extra attention is needed release:required-for-ga Must be resolved before GA release, or nice to have before GA spec:metrics Related to the specification/metrics directory triaged-accepted The issue is triaged and accepted by the OTel community, one can proceed with creating a PR proposal
Development

No branches or pull requests

4 participants