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

Add recommendation to use non-prefixed units for metric instruments #3312

Merged
merged 19 commits into from
Apr 12, 2023
Merged
Show file tree
Hide file tree
Changes from 13 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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ release.

- Clarify that units should use UCUM case sensitive variant.
([#3306](https://github.com/open-telemetry/opentelemetry-specification/pull/3306))
- Recommended non-prefixed units for metric instrument semantic conventions.
([#3312](https://github.com/open-telemetry/opentelemetry-specification/pull/3312))
- Remove No-Op instrument and Meter creation requirements.
([#3322](https://github.com/open-telemetry/opentelemetry-specification/pull/3322))
- Fixed attributes requirement level in semantic conventions for hardware metrics
Expand Down
6 changes: 6 additions & 0 deletions specification/metrics/semantic_conventions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,12 @@ give additional meaning *without* the leading default unit (`1`). For example,
use `{packet}`, `{error}`, `{fault}`, etc.
- Instrument units SHOULD be specified using the UCUM case sensitive ("c/s")
variant. For example, "Cel" for the unit with full name "degree Celsius".
- Instruments SHOULD use non-prefixed units (i.e. `By` instead of `MiBy`)
unless there is good technical reason to not do so.
trask marked this conversation as resolved.
Show resolved Hide resolved
- If using a non-prefixed unit would limit the data that could be
represented, an instrument SHOULD use an appropriately prefixed unit. For
example, an instrument measuring a duration of time as an integer that
needs a precision of nanoseconds should use a unit of `ns` instead of `s`.
MrAlias marked this conversation as resolved.
Show resolved Hide resolved
MrAlias marked this conversation as resolved.
Show resolved Hide resolved

### Instrument Types

Expand Down