Container Attributes

A container instance.

container.commandstringThe command used to run the container (i.e. the command name). [1]otelcontribcolExperimental
container.command_argsstring[]All the command arguments (including the command/executable itself) run by the container. [2]otelcontribcol, --config, config.yamlExperimental
container.command_linestringThe full command run by the container as a single string representing the full command. [2]otelcontribcol --config config.yamlExperimental
container.cpu.statestringThe CPU state for this data point.user; kernelExperimental
container.idstringContainer ID. Usually a UUID, as for example used to identify Docker containers. The UUID might be abbreviated.a3bf90e006b2Experimental
container.image.idstringRuntime specific image identifier. Usually a hash algorithm followed by a UUID. [2]sha256:19c92d0a00d1b66d897bceaa7319bee0dd38a10a851c60bcec9474aa3f01e50fExperimental
container.image.namestringName of the image the container was built
container.image.repo_digestsstring[]Repo digests of the container image as provided by the container runtime. [3]example@sha256:afcc7f1ac1b49db317a7196c902e61c6c3c4607d63599ee1a82d702d249a0ccb;
container.image.tagsstring[]Container image tags. An example can be found in Docker Image Inspect. Should be only the <tag> section of the full name for example from<tag>.v1.27.1; 3.5.7-0Experimental
container.label.<key>stringContainer labels, <key> being the label name, the value being the label
container.namestringContainer name used by container runtime.opentelemetry-autoconfExperimental
container.runtimestringThe container runtime managing this container.docker; containerd; rktExperimental

[1]: If using embedded credentials or sensitive data, it is recommended to remove them to prevent potential leakage.

[2]: Docker defines a sha256 of the image id; corresponds to the Image field from the Docker container inspect API endpoint. K8s defines a link to the container registry repository with digest "imageID": " /namespace/service/dockerfile@sha256:bdeabd40c3a8a492eaf9e8e44d0ebbb84bac7ee25ac0cf8a7159d25f62555625". 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.

[3]: Docker and CRI 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.

userWhen tasks of the cgroup are in user mode (Linux). When all container processes are in user mode (Windows).Experimental
systemWhen CPU is used by the system (host OS)Experimental
kernelWhen tasks of the cgroup are in kernel mode (Linux). When all container processes are in kernel mode (Windows).Experimental

Container Deprecated Attributes

Describes deprecated container attributes.

container.labels.<key>stringDeprecated, use container.label
Replaced by container.label.