Skip to content

Commit 3fee202

Browse files
authored
Include attribute name pluralization guidelines (#1115) (#1140)
1 parent e0d42d5 commit 3fee202

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

specification/common/common.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ Table of Contents
77

88
- [Attributes](#attributes)
99
- [Attribute and Label Naming](#attribute-and-label-naming)
10+
- [Name Pluralization Guidelines](#name-pluralization-guidelines)
11+
- [Recommendations for OpenTelemetry Authors](#recommendations-for-opentelemetry-authors)
12+
- [Recommendations for Application Developers](#recommendations-for-application-developers)
1013

1114
</details>
1215

@@ -72,6 +75,19 @@ Names SHOULD follow these rules:
7275
name prohibits existence of an equally named namespace in the future, and vice
7376
versa: any existing namespace prohibits existence of an equally named
7477
attribute or label key in the future.
78+
79+
### Name Pluralization guidelines
80+
81+
- When an attribute represents a single entity, the attribute name SHOULD be singular.
82+
Examples: `host.name`, `db.user`, `container.id`.
83+
84+
- When attribute can represent multiple entities, the attribute name SHOULD be pluralized
85+
and the value type SHOULD be an array. E.g. `process.command_args` might include multiple
86+
values: the executable name and command arguments.
87+
88+
- When an attribute represents a measurement,
89+
[Metric Name Pluralization Guidelines](../metrics/semantic_conventions/README.md#pluralization)
90+
SHOULD be followed for the attribute name.
7591

7692
### Recommendations for OpenTelemetry Authors
7793

0 commit comments

Comments
 (0)