Skip to content

Commit

Permalink
Merge branch 'main' into db-deprecate-jdbc-driver
Browse files Browse the repository at this point in the history
  • Loading branch information
lmolkova authored Mar 8, 2024
2 parents 46ebfbe + a3252cb commit f33c97d
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .chloggen/clarify-metric-namespace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
change_type: 'enhancement'
component: metrics
note: Clarify metric attributes should be namespaced.
issues: [394]
subtext:
21 changes: 21 additions & 0 deletions docs/general/metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ aliases: [docs/specs/semconv/general/metrics-general]

- [General Guidelines](#general-guidelines)
- [Name Reuse Prohibition](#name-reuse-prohibition)
- [Metric attributes](#metric-attributes)
- [Units](#units)
- [Naming rules for Counters and UpDownCounters](#naming-rules-for-counters-and-updowncounters)
- [Pluralization](#pluralization)
Expand Down Expand Up @@ -89,6 +90,26 @@ When introducing a new metric name check all existing schema files to make sure
the name does not appear as a key of any "rename_metrics" section (keys denote
old metric names in rename operations).

### Metric attributes

Metric attributes SHOULD follow the general [attribute naming rules](attribute-naming.md).
In particular, metric attributes SHOULD have a namespace.

Metric attributes SHOULD be added under the metric namespace when their usage and
semantics are exclusive to the metric.

Examples:

Attributes `mode` and `mountpoint` for metric `system.filesystem.usage`
should be namespaced as `system.filesystem.mode` and `system.filesystem.mountpoint`.

Metrics can also have attributes outside of their namespace.

Examples:

Metric `http.server.request.duration` uses attributes from the registry such as
`server.port`, `error.type`.

### Units

Conventional metrics or metrics that have their units included in
Expand Down

0 comments on commit f33c97d

Please sign in to comment.