Skip to content

Commit

Permalink
Include attribute name pluralization guidelines (open-telemetry#1115) (
Browse files Browse the repository at this point in the history
  • Loading branch information
pmm-sumo authored and jsuereth committed Nov 16, 2023
1 parent 25dea41 commit daf1054
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions specification/common/common.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ Table of Contents

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

</details>

Expand Down Expand Up @@ -72,6 +75,19 @@ Names SHOULD follow these rules:
name prohibits existence of an equally named namespace in the future, and vice
versa: any existing namespace prohibits existence of an equally named
attribute or label key in the future.

### Name Pluralization guidelines

- When an attribute represents a single entity, the attribute name SHOULD be singular.
Examples: `host.name`, `db.user`, `container.id`.

- When attribute can represent multiple entities, the attribute name SHOULD be pluralized
and the value type SHOULD be an array. E.g. `process.command_args` might include multiple
values: the executable name and command arguments.

- When an attribute represents a measurement,
[Metric Name Pluralization Guidelines](../metrics/semantic_conventions/README.md#pluralization)
SHOULD be followed for the attribute name.

### Recommendations for OpenTelemetry Authors

Expand Down

0 comments on commit daf1054

Please sign in to comment.