|
21 | 21 | | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |
22 | 22 | |---|---|---|---|---|---| |
23 | 23 | | [`container.id`](/docs/registry/attributes/container.md) | string | Container ID. Usually a UUID, as for example used to [identify Docker containers](https://docs.docker.com/engine/containers/run/#container-identification). The UUID might be abbreviated. | `a3bf90e006b2` | `Recommended` |  | |
24 | | -| [`container.image.id`](/docs/registry/attributes/container.md) | string | Runtime specific image identifier. Usually a hash algorithm followed by a UUID. [1] | `sha256:19c92d0a00d1b66d897bceaa7319bee0dd38a10a851c60bcec9474aa3f01e50f` | `Recommended` |  | |
25 | | -| [`container.image.name`](/docs/registry/attributes/container.md) | string | Name of the image the container was built on. | `gcr.io/opentelemetry/operator` | `Recommended` |  | |
26 | | -| [`container.image.repo_digests`](/docs/registry/attributes/container.md) | string[] | Repo digests of the container image as provided by the container runtime. [2] | `["example@sha256:afcc7f1ac1b49db317a7196c902e61c6c3c4607d63599ee1a82d702d249a0ccb", "internal.registry.example.com:5000/example@sha256:b69959407d21e8a062e0416bf13405bb2b71ed7a84dde4158ebafacfa06f5578"]` | `Recommended` |  | |
27 | | -| [`container.image.tags`](/docs/registry/attributes/container.md) | 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 `<tag>` section of the full name for example from `registry.example.com/my-org/my-image:<tag>`. | `["v1.27.1", "3.5.7-0"]` | `Recommended` |  | |
28 | | -| [`container.label.<key>`](/docs/registry/attributes/container.md) | string | Container labels, `<key>` being the label name, the value being the label value. [3] | `nginx` | `Recommended` |  | |
| 24 | +| [`container.label.<key>`](/docs/registry/attributes/container.md) | string | Container labels, `<key>` being the label name, the value being the label value. [1] | `nginx` | `Recommended` |  | |
29 | 25 | | [`container.name`](/docs/registry/attributes/container.md) | string | Container name used by container runtime. | `opentelemetry-autoconf` | `Recommended` |  | |
30 | | -| [`container.runtime`](/docs/registry/attributes/container.md) | string | The container runtime managing this container. | `docker`; `containerd`; `rkt` | `Recommended` |  | |
31 | | -| [`oci.manifest.digest`](/docs/registry/attributes/oci.md) | string | The digest of the OCI image manifest. For container images specifically is the digest by which the container image is known. [4] | `sha256:e4ca62c0d62f3e886e684806dfe9d4e0cda60d54986898173c1083856cfda0f4` | `Recommended` |  | |
32 | | -| [`container.command`](/docs/registry/attributes/container.md) | string | The command used to run the container (i.e. the command name). [5] | `otelcontribcol` | `Opt-In` |  | |
| 26 | +| [`oci.manifest.digest`](/docs/registry/attributes/oci.md) | string | The digest of the OCI image manifest. For container images specifically is the digest by which the container image is known. [2] | `sha256:e4ca62c0d62f3e886e684806dfe9d4e0cda60d54986898173c1083856cfda0f4` | `Recommended` |  | |
| 27 | +| [`container.command`](/docs/registry/attributes/container.md) | string | The command used to run the container (i.e. the command name). [3] | `otelcontribcol` | `Opt-In` |  | |
33 | 28 | | [`container.command_args`](/docs/registry/attributes/container.md) | string[] | All the command arguments (including the command/executable itself) run by the container. | `["otelcontribcol", "--config", "config.yaml"]` | `Opt-In` |  | |
34 | 29 | | [`container.command_line`](/docs/registry/attributes/container.md) | string | The full command run by the container as a single string representing the full command. | `otelcontribcol --config config.yaml` | `Opt-In` |  | |
35 | 30 |
|
36 | | -**[1] `container.image.id`:** Docker defines a sha256 of the image id; `container.image.id` corresponds to the `Image` field from the Docker container inspect [API](https://docs.docker.com/engine/api/v1.43/#tag/Container/operation/ContainerInspect) endpoint. |
| 31 | +**[1] `container.label.<key>`:** For example, a docker container label `app` with value `nginx` SHOULD be recorded as the `container.label.app` attribute with value `"nginx"`. |
| 32 | + |
| 33 | +**[2] `oci.manifest.digest`:** Follows [OCI Image Manifest Specification](https://github.com/opencontainers/image-spec/blob/main/manifest.md), and specifically the [Digest property](https://github.com/opencontainers/image-spec/blob/main/descriptor.md#digests). |
| 34 | +An example can be found in [Example Image Manifest](https://github.com/opencontainers/image-spec/blob/main/manifest.md#example-image-manifest). |
| 35 | + |
| 36 | +**[3] `container.command`:** If using embedded credentials or sensitive data, it is recommended to remove them to prevent potential leakage. |
| 37 | + |
| 38 | +## Container Image |
| 39 | + |
| 40 | +**Status:**  |
| 41 | + |
| 42 | +**type:** `container.image` |
| 43 | + |
| 44 | +**Description:** The image used for the container. |
| 45 | + |
| 46 | +**Other Attributes:** |
| 47 | + |
| 48 | +> :warning: This entity definition contains attributes without a role. |
| 49 | +> Stable Entities MUST NOT have attributes without a defined role. |
| 50 | +
|
| 51 | +| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |
| 52 | +|---|---|---|---|---|---| |
| 53 | +| [`container.image.id`](/docs/registry/attributes/container.md) | string | Runtime specific image identifier. Usually a hash algorithm followed by a UUID. [4] | `sha256:19c92d0a00d1b66d897bceaa7319bee0dd38a10a851c60bcec9474aa3f01e50f` | `Recommended` |  | |
| 54 | +| [`container.image.name`](/docs/registry/attributes/container.md) | string | Name of the image the container was built on. | `gcr.io/opentelemetry/operator` | `Recommended` |  | |
| 55 | +| [`container.image.repo_digests`](/docs/registry/attributes/container.md) | string[] | Repo digests of the container image as provided by the container runtime. [5] | `["example@sha256:afcc7f1ac1b49db317a7196c902e61c6c3c4607d63599ee1a82d702d249a0ccb", "internal.registry.example.com:5000/example@sha256:b69959407d21e8a062e0416bf13405bb2b71ed7a84dde4158ebafacfa06f5578"]` | `Recommended` |  | |
| 56 | +| [`container.image.tags`](/docs/registry/attributes/container.md) | 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 `<tag>` section of the full name for example from `registry.example.com/my-org/my-image:<tag>`. | `["v1.27.1", "3.5.7-0"]` | `Recommended` |  | |
| 57 | + |
| 58 | +**[4] `container.image.id`:** Docker defines a sha256 of the image id; `container.image.id` corresponds to the `Image` field from the Docker container inspect [API](https://docs.docker.com/engine/api/v1.43/#tag/Container/operation/ContainerInspect) endpoint. |
37 | 59 | K8s defines a link to the container registry repository with digest `"imageID": "registry.azurecr.io /namespace/service/dockerfile@sha256:bdeabd40c3a8a492eaf9e8e44d0ebbb84bac7ee25ac0cf8a7159d25f62555625"`. |
38 | 60 | The ID is assigned by the container runtime and can vary in different environments. Consider using `oci.manifest.digest` if it is important to identify the same image in different environments/runtimes. |
39 | 61 |
|
40 | | -**[2] `container.image.repo_digests`:** [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. |
| 62 | +**[5] `container.image.repo_digests`:** [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. |
41 | 63 |
|
42 | | -**[3] `container.label.<key>`:** For example, a docker container label `app` with value `nginx` SHOULD be recorded as the `container.label.app` attribute with value `"nginx"`. |
| 64 | +## Container Runtime |
43 | 65 |
|
44 | | -**[4] `oci.manifest.digest`:** Follows [OCI Image Manifest Specification](https://github.com/opencontainers/image-spec/blob/main/manifest.md), and specifically the [Digest property](https://github.com/opencontainers/image-spec/blob/main/descriptor.md#digests). |
45 | | -An example can be found in [Example Image Manifest](https://github.com/opencontainers/image-spec/blob/main/manifest.md#example-image-manifest). |
| 66 | +**Status:**  |
| 67 | + |
| 68 | +**type:** `container.runtime` |
46 | 69 |
|
47 | | -**[5] `container.command`:** If using embedded credentials or sensitive data, it is recommended to remove them to prevent potential leakage. |
| 70 | +**Description:** The runtime being used to run the container |
| 71 | + |
| 72 | +**Identifying Attributes:** |
| 73 | + |
| 74 | +| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |
| 75 | +|---|---|---|---|---|---| |
| 76 | +| [`container.runtime.name`](/docs/registry/attributes/container.md) | string | The container runtime managing this container. | `docker`; `containerd`; `rkt` | `Recommended` |  | |
| 77 | +| [`container.runtime.version`](/docs/registry/attributes/container.md) | string | The version of the runtime of this process, as returned by the runtime without modification. | `1.0.0` | `Recommended` |  | |
| 78 | + |
| 79 | +**Descriptive Attributes:** |
| 80 | + |
| 81 | +| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |
| 82 | +|---|---|---|---|---|---| |
| 83 | +| [`container.runtime.description`](/docs/registry/attributes/container.md) | string | A description about the runtime which could include, for example details about the CRI/API version being used or other customisations. | `docker://19.3.1 - CRI: 1.22.0` | `Recommended` |  | |
48 | 84 |
|
49 | 85 |
|
50 | 86 | <!-- markdownlint-restore --> |
0 commit comments