Clarify metric attributes should be namespaced (#786)
Co-authored-by: Armin Ruech <7052238+arminru@users.noreply.github.com> Co-authored-by: Chris Mark <chrismarkou92@gmail.com> Co-authored-by: Liudmila Molkova <limolkova@microsoft.com>
This commit is contained in:
parent
3d409a7d4a
commit
a3252cb605
|
|
@ -0,0 +1,5 @@
|
|||
change_type: 'enhancement'
|
||||
component: metrics
|
||||
note: Clarify metric attributes should be namespaced.
|
||||
issues: [394]
|
||||
subtext:
|
||||
|
|
@ -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)
|
||||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue