From d96809048087d670467deab0238aa213aa1beafc Mon Sep 17 00:00:00 2001 From: ChrsMark Date: Mon, 29 Jul 2024 11:18:04 +0300 Subject: [PATCH] tune cpu.mode for other metric Signed-off-by: ChrsMark --- docs/system/container-metrics.md | 8 ++++++-- model/metrics/container.yaml | 3 ++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/docs/system/container-metrics.md b/docs/system/container-metrics.md index f91a788c51..1574fafc9f 100644 --- a/docs/system/container-metrics.md +++ b/docs/system/container-metrics.md @@ -46,10 +46,12 @@ This metric is [opt-in][MetricOptIn]. | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| -| [`cpu.mode`](/docs/attributes-registry/cpu.md) | string | The CPU mode for this data point. A container's CPU metric SHOULD be characterized _either_ by data points with no `mode` labels, _or only_ data points with `mode` labels. [1] | `user`; `system` | `Opt-In` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| [`cpu.mode`](/docs/attributes-registry/cpu.md) | string | The CPU mode for this data point. A container's CPU metric SHOULD be characterized _either_ by data points with no `mode` labels, _or only_ data points with `mode` labels. [1] | `user`; `system` | `Conditionally Required` [2] | ![Experimental](https://img.shields.io/badge/-experimental-blue) | **[1]:** Following states SHOULD be used: `user`, `system`, `kernel` +**[2]:** Required if mode is available, i.e. metrics coming from the Docker Stats API. + `cpu.mode` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used. @@ -106,10 +108,12 @@ This metric is [opt-in][MetricOptIn]. | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| -| [`cpu.mode`](/docs/attributes-registry/cpu.md) | string | The CPU mode for this data point. A container's CPU metric SHOULD be characterized _either_ by data points with no `mode` labels, _or only_ data points with `mode` labels. [1] | `user`; `system` | `Opt-In` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| [`cpu.mode`](/docs/attributes-registry/cpu.md) | string | The CPU mode for this data point. A container's CPU metric SHOULD be characterized _either_ by data points with no `mode` labels, _or only_ data points with `mode` labels. [1] | `user`; `system` | `Conditionally Required` [2] | ![Experimental](https://img.shields.io/badge/-experimental-blue) | **[1]:** Following states SHOULD be used: `user`, `system`, `kernel` +**[2]:** Required if mode is available, i.e. metrics coming from the Docker Stats API. + `cpu.mode` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used. diff --git a/model/metrics/container.yaml b/model/metrics/container.yaml index 6677dc831b..7db120f528 100644 --- a/model/metrics/container.yaml +++ b/model/metrics/container.yaml @@ -13,7 +13,8 @@ groups: - ref: cpu.mode brief: "The CPU mode for this data point. A container's CPU metric SHOULD be characterized _either_ by data points with no `mode` labels, _or only_ data points with `mode` labels." note: "Following states SHOULD be used: `user`, `system`, `kernel`" - requirement_level: opt_in + requirement_level: + conditionally_required: Required if mode is available, i.e. metrics coming from the Docker Stats API. - id: metric.container.cpu.usage type: metric