diff --git a/semantic_conventions/resource/container.yaml b/semantic_conventions/resource/container.yaml index 93a4a40838..ecfe83cc78 100644 --- a/semantic_conventions/resource/container.yaml +++ b/semantic_conventions/resource/container.yaml @@ -35,7 +35,9 @@ groups: - id: image.id type: string brief: > - The ID of the container image. Usually a hash algorithm followed by a UUID. The UUID might be abbreviated. + Runtime specific image identifier. Usually a hash algorithm followed by a UUID. + note: + On docker, `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. examples: ['sha256:19c92d0a00d1b66d897bceaa7319bee0dd38a10a851c60bcec9474aa3f01e50f'] - id: command type: string @@ -47,14 +49,14 @@ groups: - id: command_line type: string requirement_level: - conditionally_required: [1] + conditionally_required: [2] brief: > The full command run by the container as a single string representing the full command. examples: [ 'otelcontribcol --config config.yaml' ] - id: command_args type: string[] requirement_level: - conditionally_required: [1] + conditionally_required: [2] brief: > All the command arguments (including the command/executable itself) run by the container. examples: [ 'otelcontribcol, --config, config.yaml' ] diff --git a/specification/resource/semantic_conventions/container.md b/specification/resource/semantic_conventions/container.md index bd49639fe7..f51576c57c 100644 --- a/specification/resource/semantic_conventions/container.md +++ b/specification/resource/semantic_conventions/container.md @@ -14,10 +14,12 @@ | `container.runtime` | string | The container runtime managing this container. | `docker`; `containerd`; `rkt` | Recommended | | `container.image.name` | string | Name of the image the container was built on. | `gcr.io/opentelemetry/operator` | Recommended | | `container.image.tag` | string | Container image tag. | `0.1` | Recommended | -| `container.image.id` | string | The ID of the container image. Usually a hash algorithm followed by a UUID. The UUID might be abbreviated. | `sha256:19c92d0a00d1b66d897bceaa7319bee0dd38a10a851c60bcec9474aa3f01e50f` | Recommended | -| `container.command` | string | The command used to run the container (i.e. the command name). | `otelcontribcol` | Conditionally Required: [1] | -| `container.command_line` | string | The full command run by the container as a single string representing the full command. | `otelcontribcol --config config.yaml` | Conditionally Required: [1] | -| `container.command_args` | string[] | All the command arguments (including the command/executable itself) run by the container. | `[otelcontribcol, --config, config.yaml]` | Conditionally Required: [1] | +| `container.image.id` | string | Runtime specific image identifier. Usually a hash algorithm followed by a UUID. [1] | `sha256:19c92d0a00d1b66d897bceaa7319bee0dd38a10a851c60bcec9474aa3f01e50f` | Recommended | +| `container.command` | string | The command used to run the container (i.e. the command name). | `otelcontribcol` | Conditionally Required: [2] | +| `container.command_line` | string | The full command run by the container as a single string representing the full command. | `otelcontribcol --config config.yaml` | Conditionally Required: [2] | +| `container.command_args` | string[] | All the command arguments (including the command/executable itself) run by the container. | `[otelcontribcol, --config, config.yaml]` | Conditionally Required: [2] | -**[1]:** If using embedded credentials or sensitive data, it is recommended to remove them to prevent potential leakage. +**[1]:** On docker, `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. + +**[2]:** If using embedded credentials or sensitive data, it is recommended to remove them to prevent potential leakage.