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

added note about abbreviations #1121

Merged
merged 9 commits into from
Jun 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .chloggen/abbr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Use this changelog template to create an entry for release notes.
#
# If your change doesn't affect end users you should instead start
# your pull request title with [chore] or use the "Skip Changelog" label.

# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: enhancement

# The name of the area of concern in the attributes-registry, (e.g. http, cloud, db)
component: all

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Define name abbreviations guidelines in attribute and metric names.

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
# The values here must be integers.
issues: [1121]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext:
15 changes: 13 additions & 2 deletions docs/general/attribute-naming.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@

<!-- toc -->

- [Name Pluralization guidelines](#name-pluralization-guidelines)
- [Name Pluralization Guidelines](#name-pluralization-guidelines)
- [Name Abbreviation Guidelines](#name-abbreviation-guidelines)
- [Name Reuse Prohibition](#name-reuse-prohibition)
- [Recommendations for OpenTelemetry Authors](#recommendations-for-opentelemetry-authors)
- [Recommendations for Application Developers](#recommendations-for-application-developers)
Expand Down Expand Up @@ -57,7 +58,7 @@ Names SHOULD follow these rules:
versa: any existing namespace prohibits existence of an equally named
attribute key in the future.

## Name Pluralization guidelines
## Name Pluralization Guidelines

- When an attribute represents a single entity, the attribute name SHOULD be
singular. Examples: `host.name`, `container.id`.
Expand All @@ -70,6 +71,16 @@ Names SHOULD follow these rules:
[Metric Name Pluralization Guidelines](./metrics.md#pluralization) SHOULD be
followed for the attribute name.

## Name Abbreviation Guidelines

Abbreviations MAY be used when they are widely recognized and commonly used.

Examples include common technical abbreviations such as `IP`, `DB`, `CPU`,
`HTTP`, `URL`, or product names like `AWS`, `GCP`, `K8s`.

Abbreviations SHOULD be avoided if they are ambiguous, for example, when they apply
to multiple products or concepts.

## Name Reuse Prohibition

A new attribute MUST NOT be added with the same name as an attribute that
Expand Down
3 changes: 3 additions & 0 deletions docs/general/metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ and confusion for end users. (For example, prefer `process.runtime.java.gc*` ove
`process.runtime.gc.*`.) Measures of many operating system metrics are similarly
ambiguous.

Metric names and attributes SHOULD follow the general
[name abbreviation guidelines](attribute-naming.md#name-abbreviation-guidelines).

### Name Reuse Prohibition

A new metric MUST NOT be added with the same name as a metric that existed in
Expand Down
Loading