From dbd49a415c6e1fbe5d434eaf03b3fb416122fa36 Mon Sep 17 00:00:00 2001 From: ChrsMark Date: Fri, 10 May 2024 16:07:23 +0300 Subject: [PATCH] deprecate *.cpu.state attributes Signed-off-by: ChrsMark --- docs/attributes-registry/container.md | 28 +++++++++++++-------------- docs/attributes-registry/process.md | 6 +++--- docs/attributes-registry/system.md | 8 ++++---- model/registry/container.yaml | 1 + model/registry/cpu.yaml | 2 +- model/registry/process.yaml | 1 + model/registry/system.yaml | 1 + 7 files changed, 25 insertions(+), 22 deletions(-) diff --git a/docs/attributes-registry/container.md b/docs/attributes-registry/container.md index eb62fd417f..dc6d40a427 100644 --- a/docs/attributes-registry/container.md +++ b/docs/attributes-registry/container.md @@ -13,20 +13,20 @@ A container instance. -| Attribute | Type | Description | Examples | Stability | -| ------------------------------ | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- | -| `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`; `system`; `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) | -| `container.image.repo_digests` | string[] | Repo digests of the container image as provided by the container runtime. [3] | `example@sha256:afcc7f1ac1b49db317a7196c902e61c6c3c4607d63599ee1a82d702d249a0ccb`; `internal.registry.example.com:5000/example@sha256:b69959407d21e8a062e0416bf13405bb2b71ed7a84dde4158ebafacfa06f5578` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `container.image.tags` | string[] | Container image tags. An example can be found in [Docker Image Inspect](https://docs.docker.com/engine/api/v1.43/#tag/Image/operation/ImageInspect). Should be only the `` section of the full name for example from `registry.example.com/my-org/my-image:`. | `v1.27.1`; `3.5.7-0` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `container.label.` | string | Container labels, `` being the label name, the value being the label value. | `container.label.app=nginx` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `container.name` | string | Container name used by container runtime. | `opentelemetry-autoconf` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `container.runtime` | string | The container runtime managing this container. | `docker`; `containerd`; `rkt` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| Attribute | Type | Description | Examples | Stability | +| ------------------------------ | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | +| `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`; `system`; `kernel` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)
Removed, report cpu state with `cpu.state` common attribute | +| `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) | +| `container.image.repo_digests` | string[] | Repo digests of the container image as provided by the container runtime. [3] | `example@sha256:afcc7f1ac1b49db317a7196c902e61c6c3c4607d63599ee1a82d702d249a0ccb`; `internal.registry.example.com:5000/example@sha256:b69959407d21e8a062e0416bf13405bb2b71ed7a84dde4158ebafacfa06f5578` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `container.image.tags` | string[] | Container image tags. An example can be found in [Docker Image Inspect](https://docs.docker.com/engine/api/v1.43/#tag/Image/operation/ImageInspect). Should be only the `` section of the full name for example from `registry.example.com/my-org/my-image:`. | `v1.27.1`; `3.5.7-0` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `container.label.` | string | Container labels, `` being the label name, the value being the label value. | `container.label.app=nginx` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `container.name` | string | Container name used by container runtime. | `opentelemetry-autoconf` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `container.runtime` | string | The container runtime managing this container. | `docker`; `containerd`; `rkt` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | **[1]:** If using embedded credentials or sensitive data, it is recommended to remove them to prevent potential leakage. diff --git a/docs/attributes-registry/process.md b/docs/attributes-registry/process.md index cde9b8d280..075746878d 100644 --- a/docs/attributes-registry/process.md +++ b/docs/attributes-registry/process.md @@ -62,9 +62,9 @@ An operating system process. Attributes for process CPU -| 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 | The CPU state of the process. | `system`; `user`; `wait` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)
Removed, report cpu state with `cpu.state` common attribute | `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 180d62d803..67c109024e 100644 --- a/docs/attributes-registry/system.md +++ b/docs/attributes-registry/system.md @@ -27,10 +27,10 @@ Describes System 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 | `user`; `system`; `nice` | ![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.cpu.state` | string | The state of the CPU | `user`; `system`; `nice` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)
Removed, report cpu state with `cpu.state` common attribute | `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. diff --git a/model/registry/container.yaml b/model/registry/container.yaml index b2ff38239f..e12956dafb 100644 --- a/model/registry/container.yaml +++ b/model/registry/container.yaml @@ -113,4 +113,5 @@ groups: 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: 'Removed, report cpu state with `cpu.state` common attribute' examples: ["user", "kernel"] diff --git a/model/registry/cpu.yaml b/model/registry/cpu.yaml index f0e49146d8..bd346a95f2 100644 --- a/model/registry/cpu.yaml +++ b/model/registry/cpu.yaml @@ -35,4 +35,4 @@ groups: value: 'kernel' stability: experimental stability: experimental - examples: [ "user", "system" ] \ No newline at end of file + examples: [ "user", "system" ] diff --git a/model/registry/process.yaml b/model/registry/process.yaml index 54c9a6fb40..402cfffafa 100644 --- a/model/registry/process.yaml +++ b/model/registry/process.yaml @@ -206,6 +206,7 @@ groups: - id: state brief: > The CPU state of the process. + deprecated: 'Removed, report cpu state with `cpu.state` common attribute' type: allow_custom_values: true members: diff --git a/model/registry/system.yaml b/model/registry/system.yaml index 0766d4c8b2..62df9b6225 100644 --- a/model/registry/system.yaml +++ b/model/registry/system.yaml @@ -43,6 +43,7 @@ groups: stability: experimental brief: "The state of the CPU" stability: experimental + deprecated: 'Removed, report cpu state with `cpu.state` common attribute' examples: ["idle", "interrupt"] - id: logical_number type: int