Skip to content

Commit 48b522e

Browse files
Clarify when "count" is used instead of pluralization (open-telemetry#2613)
1 parent 35b2b57 commit 48b522e

File tree

1 file changed

+12
-0
lines changed
  • specification/metrics/semantic_conventions

1 file changed

+12
-0
lines changed

specification/metrics/semantic_conventions/README.md

+12
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
* [Name Reuse Prohibition](#name-reuse-prohibition)
1111
* [Units](#units)
1212
* [Pluralization](#pluralization)
13+
+ [Use `count` Instead of Pluralization](#use-count-instead-of-pluralization)
1314
- [General Metric Semantic Conventions](#general-metric-semantic-conventions)
1415
* [Instrument Naming](#instrument-naming)
1516
* [Instrument Units](#instrument-units)
@@ -105,6 +106,17 @@ should not be pluralized, even if many data points are recorded.
105106
* `system.paging.faults`, `system.disk.operations`, and `system.network.packets`
106107
should be pluralized, even if only a single data point is recorded.
107108

109+
#### Use `count` Instead of Pluralization
110+
111+
If the value being recorded represents the count of concepts signified
112+
by the namespace then the metric should be named `count` (within its namespace).
113+
The pluralization rule does not apply in this case.
114+
115+
For example if we have a namespace `system.processes` which contains all metrics related
116+
to the processes then to represent the count of the processes we can have a metric named
117+
`system.processes.count`. The suffix `count` here indicates that it is the count of
118+
`system.processes`.
119+
108120
## General Metric Semantic Conventions
109121

110122
The following semantic conventions aim to keep naming consistent. They

0 commit comments

Comments
 (0)