Skip to content

Commit

Permalink
tune cpu.mode for other metric
Browse files Browse the repository at this point in the history
Signed-off-by: ChrsMark <[email protected]>
  • Loading branch information
ChrsMark committed Jul 29, 2024
1 parent be6f6b6 commit d968090
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
8 changes: 6 additions & 2 deletions docs/system/container-metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down
3 changes: 2 additions & 1 deletion model/metrics/container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d968090

Please sign in to comment.