diff --git a/.chloggen/merge_cpu_states.yaml b/.chloggen/merge_cpu_states.yaml
new file mode 100755
index 0000000000..54ea54c032
--- /dev/null
+++ b/.chloggen/merge_cpu_states.yaml
@@ -0,0 +1,22 @@
+# Use this changelog template to create an entry for release notes.
+#
+# If your change doesn't affect end users you should instead start
+# your pull request title with [chore] or use the "Skip Changelog" label.
+
+# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
+change_type: breaking
+
+# The name of the area of concern in the attributes-registry, (e.g. http, cloud, db)
+component: system
+
+# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
+note: Rename `process.cpu.state`, `container.cpu.state`, and `system.cpu.state` attributes into a common `cpu.mode` attribute
+
+# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
+# The values here must be integers.
+issues: [840]
+
+# (Optional) One or more lines of additional information to render under the primary note.
+# These lines will be padded with 2 spaces and then inserted directly into the document.
+# Use pipe (|) for multiline entries.
+subtext:
diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml
index 33cf248bb7..f4add087f9 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.yaml
+++ b/.github/ISSUE_TEMPLATE/bug_report.yaml
@@ -28,6 +28,7 @@ body:
- area:cloudevents
- area:code
- area:container
+ - area:cpu
- area:db
- area:deployment
- area:destination
diff --git a/.github/ISSUE_TEMPLATE/change_proposal.yaml b/.github/ISSUE_TEMPLATE/change_proposal.yaml
index 4429b696e6..e5c7532f76 100644
--- a/.github/ISSUE_TEMPLATE/change_proposal.yaml
+++ b/.github/ISSUE_TEMPLATE/change_proposal.yaml
@@ -21,6 +21,7 @@ body:
- area:cloudevents
- area:code
- area:container
+ - area:cpu
- area:db
- area:deployment
- area:destination
diff --git a/.github/ISSUE_TEMPLATE/new-conventions.yaml b/.github/ISSUE_TEMPLATE/new-conventions.yaml
index 1a504ea5ce..b4099a42cb 100644
--- a/.github/ISSUE_TEMPLATE/new-conventions.yaml
+++ b/.github/ISSUE_TEMPLATE/new-conventions.yaml
@@ -30,6 +30,7 @@ body:
- area:cloudevents
- area:code
- area:container
+ - area:cpu
- area:db
- area:deployment
- area:destination
diff --git a/docs/attributes-registry/README.md b/docs/attributes-registry/README.md
index 2aa1b98447..97eab1087b 100644
--- a/docs/attributes-registry/README.md
+++ b/docs/attributes-registry/README.md
@@ -40,6 +40,7 @@ Currently, the following namespaces exist:
- [CloudEvents](cloudevents.md)
- [Code](code.md)
- [Container](container.md)
+- [CPU](cpu.md)
- [Db](db.md)
- [Deployment](deployment.md)
- [Destination](destination.md)
diff --git a/docs/attributes-registry/container.md b/docs/attributes-registry/container.md
index 12ae8414bf..fdca43d789 100644
--- a/docs/attributes-registry/container.md
+++ b/docs/attributes-registry/container.md
@@ -18,7 +18,6 @@ A container instance.
| `container.command` | string | The command used to run the container (i.e. the command name). [1] | `otelcontribcol` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `container.command_args` | string[] | All the command arguments (including the command/executable itself) run by the container. [2] | `["otelcontribcol, --config, config.yaml"]` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `container.command_line` | string | The full command run by the container as a single string representing the full command. [2] | `otelcontribcol --config config.yaml` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
-| `container.cpu.state` | string | The CPU state for this data point. | `user`; `kernel` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `container.id` | string | Container ID. Usually a UUID, as for example used to [identify Docker containers](https://docs.docker.com/engine/reference/run/#container-identification). The UUID might be abbreviated. | `a3bf90e006b2` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `container.image.id` | string | Runtime specific image identifier. Usually a hash algorithm followed by a UUID. [2] | `sha256:19c92d0a00d1b66d897bceaa7319bee0dd38a10a851c60bcec9474aa3f01e50f` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `container.image.name` | string | Name of the image the container was built on. | `gcr.io/opentelemetry/operator` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
@@ -36,18 +35,19 @@ The ID is assigned by the container runtime and can vary in different environmen
**[3]:** [Docker](https://docs.docker.com/engine/api/v1.43/#tag/Image/operation/ImageInspect) and [CRI](https://github.com/kubernetes/cri-api/blob/c75ef5b473bbe2d0a4fc92f82235efd665ea8e9f/pkg/apis/runtime/v1/api.proto#L1237-L1238) report those under the `RepoDigests` field.
-`container.cpu.state` 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.
-
-| Value | Description | Stability |
-| -------- | --------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- |
-| `kernel` | When tasks of the cgroup are in kernel mode (Linux). When all container processes are in kernel mode (Windows). | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
-| `system` | When CPU is used by the system (host OS) | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
-| `user` | When tasks of the cgroup are in user mode (Linux). When all container processes are in user mode (Windows). | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
-
## Container Deprecated Attributes
Describes deprecated container attributes.
| Attribute | Type | Description | Examples | Stability |
| ------------------------ | ------ | ------------------------------------------ | --------------------------- | --------------------------------------------------------------------------------------------- |
+| `container.cpu.state` | string | Deprecated, use `cpu.mode` instead. | `user`; `kernel` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)
Replaced by `cpu.mode` |
| `container.labels.` | string | Deprecated, use `container.label` instead. | `container.label.app=nginx` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)
Replaced by `container.label`. |
+
+`container.cpu.state` 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.
+
+| Value | Description | Stability |
+| -------- | --------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- |
+| `kernel` | When tasks of the cgroup are in kernel mode (Linux). When all container processes are in kernel mode (Windows). | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
+| `system` | When CPU is used by the system (host OS) | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
+| `user` | When tasks of the cgroup are in user mode (Linux). When all container processes are in user mode (Windows). | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
diff --git a/docs/attributes-registry/cpu.md b/docs/attributes-registry/cpu.md
new file mode 100644
index 0000000000..2e405a8a83
--- /dev/null
+++ b/docs/attributes-registry/cpu.md
@@ -0,0 +1,28 @@
+
+
+
+
+
+# CPU
+
+## CPU Attributes
+
+Attributes specific to a cpu instance.
+
+| Attribute | Type | Description | Examples | Stability |
+| ---------- | ------ | ------------------- | ---------------- | ---------------------------------------------------------------- |
+| `cpu.mode` | string | The mode of the CPU | `user`; `system` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
+
+`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.
+
+| Value | Description | Stability |
+| ----------- | ----------- | ---------------------------------------------------------------- |
+| `idle` | idle | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
+| `interrupt` | interrupt | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
+| `iowait` | iowait | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
+| `kernel` | kernel | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
+| `nice` | nice | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
+| `steal` | steal | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
+| `system` | system | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
+| `user` | user | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
diff --git a/docs/attributes-registry/process.md b/docs/attributes-registry/process.md
index 2e525794c2..6522b0ace3 100644
--- a/docs/attributes-registry/process.md
+++ b/docs/attributes-registry/process.md
@@ -7,7 +7,7 @@
# Process
- [Process](#process-attributes)
-- [Process Cpu](#process-cpu-attributes)
+- [Process Deprecated](#process-deprecated-attributes)
## Process Attributes
@@ -58,13 +58,13 @@ An operating system process.
| `major` | major | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `minor` | minor | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
-## Process Cpu Attributes
+## Process Deprecated Attributes
-Attributes for process CPU
+Deprecated process attributes.
-| Attribute | Type | Description | Examples | Stability |
-| ------------------- | ------ | ----------------------------- | ------------------------ | ---------------------------------------------------------------- |
-| `process.cpu.state` | string | The CPU state of the process. | `system`; `user`; `wait` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
+| Attribute | Type | Description | Examples | Stability |
+| ------------------- | ------ | ----------------------------------- | ------------------------ | ------------------------------------------------------------------------------------- |
+| `process.cpu.state` | string | Deprecated, use `cpu.mode` instead. | `system`; `user`; `wait` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)
Replaced by `cpu.mode` |
`process.cpu.state` 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/docs/attributes-registry/system.md b/docs/attributes-registry/system.md
index de49928773..c504f989f9 100644
--- a/docs/attributes-registry/system.md
+++ b/docs/attributes-registry/system.md
@@ -23,14 +23,22 @@ Describes System attributes
| --------------- | ------ | --------------------- | -------------- | ---------------------------------------------------------------- |
| `system.device` | string | The device identifier | `(identifier)` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
-## System Cpu Attributes
+## System CPU Attributes
Describes System CPU attributes
-| Attribute | Type | Description | Examples | Stability |
-| --------------------------- | ------ | ------------------------------- | ------------------- | ---------------------------------------------------------------- |
-| `system.cpu.logical_number` | int | The logical CPU number [0..n-1] | `1` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
-| `system.cpu.state` | string | The state of the CPU | `idle`; `interrupt` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
+| Attribute | Type | Description | Examples | Stability |
+| --------------------------- | ---- | ------------------------------- | -------- | ---------------------------------------------------------------- |
+| `system.cpu.logical_number` | int | The logical CPU number [0..n-1] | `1` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
+
+## System Deprecated Attributes
+
+Deprecated system attributes.
+
+| Attribute | Type | Description | Examples | Stability |
+| ------------------------- | ------ | ------------------------------------------------ | ------------------- | --------------------------------------------------------------------------------------------------- |
+| `system.cpu.state` | string | Deprecated, use `cpu.mode` instead. | `idle`; `interrupt` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)
Replaced by `cpu.mode` |
+| `system.processes.status` | string | Deprecated, use `system.process.status` instead. | `running` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)
Replaced by `system.process.status`. |
`system.cpu.state` 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.
@@ -44,14 +52,6 @@ Describes System CPU attributes
| `system` | system | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `user` | user | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
-## System Deprecated Attributes
-
-Deprecated system attributes.
-
-| Attribute | Type | Description | Examples | Stability |
-| ------------------------- | ------ | ------------------------------------------------ | --------- | --------------------------------------------------------------------------------------------------- |
-| `system.processes.status` | string | Deprecated, use `system.process.status` instead. | `running` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)
Replaced by `system.process.status`. |
-
`system.processes.status` 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.
| Value | Description | Stability |
diff --git a/docs/system/container-metrics.md b/docs/system/container-metrics.md
index 5449a117d0..b0fb198f21 100644
--- a/docs/system/container-metrics.md
+++ b/docs/system/container-metrics.md
@@ -42,15 +42,24 @@ This metric is [opt-in][MetricOptIn].
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
|---|---|---|---|---|---|
-| [`container.cpu.state`](/docs/attributes-registry/container.md) | string | The CPU state for this data point. A container SHOULD be characterized _either_ by data points with no `state` labels, _or only_ data points with `state` labels. | `user`; `kernel` | `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` | `Opt-In` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
-`container.cpu.state` 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.
+**[1]:** Following states SHOULD be used: `user`, `system`, `kernel`
+
+
+
+`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.
| Value | Description | Stability |
|---|---|---|
-| `kernel` | When tasks of the cgroup are in kernel mode (Linux). When all container processes are in kernel mode (Windows). | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
-| `system` | When CPU is used by the system (host OS) | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
-| `user` | When tasks of the cgroup are in user mode (Linux). When all container processes are in user mode (Windows). | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
+| `idle` | idle | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
+| `interrupt` | interrupt | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
+| `iowait` | iowait | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
+| `kernel` | kernel | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
+| `nice` | nice | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
+| `steal` | steal | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
+| `system` | system | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
+| `user` | user | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
diff --git a/docs/system/process-metrics.md b/docs/system/process-metrics.md
index 5b40717462..892382e40f 100644
--- a/docs/system/process-metrics.md
+++ b/docs/system/process-metrics.md
@@ -75,15 +75,24 @@ This metric is [recommended][MetricRecommended].
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
|---|---|---|---|---|---|
-| [`process.cpu.state`](/docs/attributes-registry/process.md) | string | A process SHOULD be characterized _either_ by data points with no `state` labels, _or only_ data points with `state` labels. | `system`; `user`; `wait` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
+| [`cpu.mode`](/docs/attributes-registry/cpu.md) | string | A process SHOULD be characterized _either_ by data points with no `mode` labels, _or only_ data points with `mode` labels. [1] | `user`; `system` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
-`process.cpu.state` 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.
+**[1]:** Following states SHOULD be used: `user`, `system`, `wait`
+
+
+
+`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.
| Value | Description | Stability |
|---|---|---|
+| `idle` | idle | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
+| `interrupt` | interrupt | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
+| `iowait` | iowait | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
+| `kernel` | kernel | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
+| `nice` | nice | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
+| `steal` | steal | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `system` | system | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `user` | user | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
-| `wait` | wait | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
@@ -122,15 +131,24 @@ This metric is [recommended][MetricRecommended].
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
|---|---|---|---|---|---|
-| [`process.cpu.state`](/docs/attributes-registry/process.md) | string | A process SHOULD be characterized _either_ by data points with no `state` labels, _or only_ data points with `state` labels. | `system`; `user`; `wait` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
+| [`cpu.mode`](/docs/attributes-registry/cpu.md) | string | A process SHOULD be characterized _either_ by data points with no `mode` labels, _or only_ data points with `mode` labels. [1] | `user`; `system` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
+
+**[1]:** Following states SHOULD be used: `user`, `system`, `wait`
+
+
-`process.cpu.state` 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.
+`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.
| Value | Description | Stability |
|---|---|---|
+| `idle` | idle | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
+| `interrupt` | interrupt | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
+| `iowait` | iowait | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
+| `kernel` | kernel | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
+| `nice` | nice | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
+| `steal` | steal | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `system` | system | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `user` | user | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
-| `wait` | wait | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
diff --git a/docs/system/system-metrics.md b/docs/system/system-metrics.md
index 70a9c543af..cd01009e28 100644
--- a/docs/system/system-metrics.md
+++ b/docs/system/system-metrics.md
@@ -104,16 +104,21 @@ This metric is [recommended][MetricRecommended].
| 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 system's CPU SHOULD be characterized *either* by data points with no `mode` labels, *or only* data points with `mode` labels. [1] | `user`; `system` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| [`system.cpu.logical_number`](/docs/attributes-registry/system.md) | int | The logical CPU number [0..n-1] | `1` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
-| [`system.cpu.state`](/docs/attributes-registry/system.md) | string | The CPU state for this data point. A system's CPU SHOULD be characterized *either* by data points with no `state` labels, *or only* data points with `state` labels. | `idle`; `interrupt` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
-`system.cpu.state` 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.
+**[1]:** Following states SHOULD be used: `user`, `system`, `nice`, `idle`, `iowait`, `interrupt`, `steal`
+
+
+
+`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.
| Value | Description | Stability |
|---|---|---|
| `idle` | idle | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `interrupt` | interrupt | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `iowait` | iowait | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
+| `kernel` | kernel | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `nice` | nice | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `steal` | steal | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `system` | system | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
@@ -156,16 +161,21 @@ This metric is [recommended][MetricRecommended].
| 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 system's CPU SHOULD be characterized *either* by data points with no `mode` labels, *or only* data points with `mode` labels. [1] | `user`; `system` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| [`system.cpu.logical_number`](/docs/attributes-registry/system.md) | int | The logical CPU number [0..n-1] | `1` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
-| [`system.cpu.state`](/docs/attributes-registry/system.md) | string | The CPU state for this data point. A system's CPU SHOULD be characterized *either* by data points with no `state` labels, *or only* data points with `state` labels. | `idle`; `interrupt` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
-`system.cpu.state` 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.
+**[1]:** Following modes SHOULD be used: `user`, `system`, `nice`, `idle`, `iowait`, `interrupt`, `steal`
+
+
+
+`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.
| Value | Description | Stability |
|---|---|---|
| `idle` | idle | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `interrupt` | interrupt | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `iowait` | iowait | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
+| `kernel` | kernel | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `nice` | nice | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `steal` | steal | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `system` | system | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
diff --git a/model/metrics/container.yaml b/model/metrics/container.yaml
index f0e15ed596..94adad2921 100644
--- a/model/metrics/container.yaml
+++ b/model/metrics/container.yaml
@@ -10,8 +10,9 @@ groups:
instrument: counter
unit: "s"
attributes:
- - ref: container.cpu.state
- brief: "The CPU state for this data point. A container SHOULD be characterized _either_ by data points with no `state` labels, _or only_ data points with `state` labels."
+ - 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
# container.memory.* metrics and attribute group
diff --git a/model/metrics/process-metrics.yaml b/model/metrics/process-metrics.yaml
index 3941cdc56d..86d224d543 100644
--- a/model/metrics/process-metrics.yaml
+++ b/model/metrics/process-metrics.yaml
@@ -7,10 +7,11 @@ groups:
instrument: counter
unit: "s"
attributes:
- - ref: process.cpu.state
+ - ref: cpu.mode
brief: >
- A process SHOULD be characterized _either_ by data points with no `state`
- labels, _or only_ data points with `state` labels.
+ A process 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`, `wait`"
- id: metric.process.cpu.utilization
type: metric
@@ -22,10 +23,11 @@ groups:
instrument: gauge
unit: "1"
attributes:
- - ref: process.cpu.state
+ - ref: cpu.mode
brief: >
- A process SHOULD be characterized _either_ by data points with no `state`
- labels, _or only_ data points with `state` labels.
+ A process 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`, `wait`"
- id: metric.process.memory.usage
type: metric
diff --git a/model/metrics/system-metrics.yaml b/model/metrics/system-metrics.yaml
index 1b7a2cf28e..25e2d06665 100644
--- a/model/metrics/system-metrics.yaml
+++ b/model/metrics/system-metrics.yaml
@@ -8,8 +8,9 @@ groups:
instrument: counter
unit: "s"
attributes:
- - ref: system.cpu.state
- brief: "The CPU state for this data point. A system's CPU SHOULD be characterized *either* by data points with no `state` labels, *or only* data points with `state` labels."
+ - ref: cpu.mode
+ brief: "The CPU mode for this data point. A system's CPU 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`, `nice`, `idle`, `iowait`, `interrupt`, `steal`"
- ref: system.cpu.logical_number
- id: metric.system.cpu.utilization
@@ -20,8 +21,9 @@ groups:
instrument: gauge
unit: "1"
attributes:
- - ref: system.cpu.state
- brief: "The CPU state for this data point. A system's CPU SHOULD be characterized *either* by data points with no `state` labels, *or only* data points with `state` labels."
+ - ref: cpu.mode
+ brief: "The CPU mode for this data point. A system's CPU SHOULD be characterized *either* by data points with no `mode` labels, *or only* data points with `mode` labels."
+ note: "Following modes SHOULD be used: `user`, `system`, `nice`, `idle`, `iowait`, `interrupt`, `steal`"
- ref: system.cpu.logical_number
- id: metric.system.cpu.frequency
diff --git a/model/registry/container.yaml b/model/registry/container.yaml
index b2ff38239f..60348628b4 100644
--- a/model/registry/container.yaml
+++ b/model/registry/container.yaml
@@ -95,22 +95,3 @@ groups:
brief: >
Container labels, `` being the label name, the value being the label value.
examples: [ 'container.label.app=nginx' ]
- - id: cpu.state
- brief: "The CPU state for this data point."
- type:
- allow_custom_values: true
- members:
- - id: user
- value: 'user'
- brief: "When tasks of the cgroup are in user mode (Linux). When all container processes are in user mode (Windows)."
- stability: experimental
- - id: system
- value: 'system'
- brief: "When CPU is used by the system (host OS)"
- stability: experimental
- - id: kernel
- value: 'kernel'
- brief: "When tasks of the cgroup are in kernel mode (Linux). When all container processes are in kernel mode (Windows)."
- stability: experimental
- stability: experimental
- examples: ["user", "kernel"]
diff --git a/model/registry/cpu.yaml b/model/registry/cpu.yaml
new file mode 100644
index 0000000000..43fb145a38
--- /dev/null
+++ b/model/registry/cpu.yaml
@@ -0,0 +1,38 @@
+groups:
+ - id: registry.cpu
+ prefix: cpu
+ type: attribute_group
+ brief: Attributes specific to a cpu instance.
+ attributes:
+ - id: mode
+ brief: "The mode of the CPU"
+ type:
+ allow_custom_values: true
+ # TODO: Fix how enum members are used in semantic conventions after https://github.com/open-telemetry/build-tools/issues/192 is merged
+ members:
+ - id: user
+ value: 'user'
+ stability: experimental
+ - id: system
+ value: 'system'
+ stability: experimental
+ - id: nice
+ value: 'nice'
+ stability: experimental
+ - id: idle
+ value: 'idle'
+ stability: experimental
+ - id: iowait
+ value: 'iowait'
+ stability: experimental
+ - id: interrupt
+ value: 'interrupt'
+ stability: experimental
+ - id: steal
+ value: 'steal'
+ stability: experimental
+ - id: kernel
+ value: 'kernel'
+ stability: experimental
+ stability: experimental
+ examples: [ "user", "system" ]
diff --git a/model/registry/deprecated/container.yaml b/model/registry/deprecated/container.yaml
index 77f3466f02..63e69621dd 100644
--- a/model/registry/deprecated/container.yaml
+++ b/model/registry/deprecated/container.yaml
@@ -9,3 +9,23 @@ groups:
brief: "Deprecated, use `container.label` instead."
stability: experimental
deprecated: "Replaced by `container.label`."
+ - id: container.cpu.state
+ brief: "Deprecated, use `cpu.mode` instead."
+ type:
+ allow_custom_values: true
+ members:
+ - id: user
+ value: 'user'
+ brief: "When tasks of the cgroup are in user mode (Linux). When all container processes are in user mode (Windows)."
+ stability: experimental
+ - id: system
+ value: 'system'
+ brief: "When CPU is used by the system (host OS)"
+ stability: experimental
+ - id: kernel
+ value: 'kernel'
+ brief: "When tasks of the cgroup are in kernel mode (Linux). When all container processes are in kernel mode (Windows)."
+ stability: experimental
+ stability: experimental
+ deprecated: 'Replaced by `cpu.mode`'
+ examples: [ "user", "kernel" ]
diff --git a/model/registry/deprecated/process.yaml b/model/registry/deprecated/process.yaml
new file mode 100644
index 0000000000..33c5adb0cb
--- /dev/null
+++ b/model/registry/deprecated/process.yaml
@@ -0,0 +1,21 @@
+groups:
+ - id: registry.process.deprecated
+ type: attribute_group
+ brief: "Deprecated process attributes."
+ attributes:
+ - id: process.cpu.state
+ brief: "Deprecated, use `cpu.mode` instead."
+ deprecated: 'Replaced by `cpu.mode`'
+ type:
+ allow_custom_values: true
+ members:
+ - id: system
+ value: 'system'
+ stability: experimental
+ - id: user
+ value: 'user'
+ stability: experimental
+ - id: wait
+ value: 'wait'
+ stability: experimental
+ stability: experimental
diff --git a/model/registry/deprecated/system.yaml b/model/registry/deprecated/system.yaml
index 700023ab57..d220a501b7 100644
--- a/model/registry/deprecated/system.yaml
+++ b/model/registry/deprecated/system.yaml
@@ -23,3 +23,32 @@ groups:
deprecated: "Replaced by `system.process.status`."
stability: experimental
examples: ["running"]
+ - id: system.cpu.state
+ type:
+ allow_custom_values: true
+ members:
+ - id: user
+ value: 'user'
+ stability: experimental
+ - id: system
+ value: 'system'
+ stability: experimental
+ - id: nice
+ value: 'nice'
+ stability: experimental
+ - id: idle
+ value: 'idle'
+ stability: experimental
+ - id: iowait
+ value: 'iowait'
+ stability: experimental
+ - id: interrupt
+ value: 'interrupt'
+ stability: experimental
+ - id: steal
+ value: 'steal'
+ stability: experimental
+ brief: "Deprecated, use `cpu.mode` instead."
+ stability: experimental
+ deprecated: 'Replaced by `cpu.mode`'
+ examples: [ "idle", "interrupt" ]
diff --git a/model/registry/process.yaml b/model/registry/process.yaml
index 54c9a6fb40..7cb7451e66 100644
--- a/model/registry/process.yaml
+++ b/model/registry/process.yaml
@@ -196,26 +196,3 @@ groups:
value: 'minor'
stability: experimental
stability: experimental
-
- - id: registry.process.cpu
- prefix: process.cpu
- type: attribute_group
- brief: >
- Attributes for process CPU
- attributes:
- - id: state
- brief: >
- The CPU state of the process.
- type:
- allow_custom_values: true
- members:
- - id: system
- value: 'system'
- stability: experimental
- - id: user
- value: 'user'
- stability: experimental
- - id: wait
- value: 'wait'
- stability: experimental
- stability: experimental
diff --git a/model/registry/system.yaml b/model/registry/system.yaml
index d407f96d56..790a1374af 100644
--- a/model/registry/system.yaml
+++ b/model/registry/system.yaml
@@ -16,34 +16,6 @@ groups:
type: attribute_group
brief: "Describes System CPU attributes"
attributes:
- - id: state
- type:
- allow_custom_values: true
- members:
- - id: user
- value: 'user'
- stability: experimental
- - id: system
- value: 'system'
- stability: experimental
- - id: nice
- value: 'nice'
- stability: experimental
- - id: idle
- value: 'idle'
- stability: experimental
- - id: iowait
- value: 'iowait'
- stability: experimental
- - id: interrupt
- value: 'interrupt'
- stability: experimental
- - id: steal
- value: 'steal'
- stability: experimental
- brief: "The state of the CPU"
- stability: experimental
- examples: ["idle", "interrupt"]
- id: logical_number
type: int
stability: experimental
diff --git a/schema-next.yaml b/schema-next.yaml
index 9469bc54eb..f87f1059d9 100644
--- a/schema-next.yaml
+++ b/schema-next.yaml
@@ -41,7 +41,18 @@ versions:
# https://github.com/open-telemetry/semantic-conventions/pull/1006
- rename_metrics:
messaging.publish.messages: messaging.client.published.messages
-
+ # https://github.com/open-telemetry/semantic-conventions/pull/1026
+ - rename_attributes:
+ attribute_map:
+ system.cpu.state: cpu.mode
+ process.cpu.state: cpu.mode
+ container.cpu.state: cpu.mode
+ apply_to_metrics:
+ - system.cpu.time
+ - system.cpu.utilization
+ - process.cpu.time
+ - process.cpu.utilization
+ - container.cpu.time
1.26.0:
metrics:
changes:
diff --git a/templates/registry/markdown/weaver.yaml b/templates/registry/markdown/weaver.yaml
index 19cbd089a6..64e16bead2 100644
--- a/templates/registry/markdown/weaver.yaml
+++ b/templates/registry/markdown/weaver.yaml
@@ -10,6 +10,7 @@ acronyms:
- iOS
- AWS
- CloudEvents
+ - CPU
- CosmosDB
- DynamoDB
- ECS