Skip to content

Commit

Permalink
count metric naming only applies to UpDownCounters
Browse files Browse the repository at this point in the history
  • Loading branch information
trask committed May 9, 2023
1 parent d358e4d commit 71d6af9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ release.
`net.sock.host.addr` to `server.socket.address` (since `net.sock.host.*` only applied to server instrumentation),
`net.sock.host.port` to `server.socket.port` (similarly since `net.sock.host.*` only applied to server instrumentation),
`http.client_ip` to `client.address`
- Update `.count` metric naming convention so that it only applies to UpDownCounters
([#3493](https://github.com/open-telemetry/opentelemetry-specification/pull/3493))

### Compatibility

Expand Down
6 changes: 5 additions & 1 deletion specification/metrics/semantic_conventions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ should not be pluralized, even if many data points are recorded.
* `system.paging.faults`, `system.disk.operations`, and `system.network.packets`
should be pluralized, even if only a single data point is recorded.

#### Use `count` Instead of Pluralization
#### Use `count` Instead of Pluralization for UpDownCounters

If the value being recorded represents the count of concepts signified
by the namespace then the metric should be named `count` (within its namespace).
Expand All @@ -125,6 +125,10 @@ to the processes then to represent the count of the processes we can have a metr
`system.processes.count`. The suffix `count` here indicates that it is the count of
`system.processes`.

This rule should only be applied to UpDownCounters, since (monotonic) Counters have
`_total` appended to their names when they are mapped to Prometheus, which would lead to
`_count_total`.

## General Metric Semantic Conventions

**Status**: [Mixed](../../document-status.md)
Expand Down

0 comments on commit 71d6af9

Please sign in to comment.