View Source OpenTelemetry.SemConv.Incubating.ContainerAttributes (OpenTelemetry.SemConv v1.27.0)
OpenTelemetry Semantic Conventions for Container attributes.
Summary
Types
Deprecated, use cpu.mode
instead.
Functions
The command used to run the container (i.e. the command name).
All the command arguments (including the command/executable itself) run by the container. [2]
The full command run by the container as a single string representing the full command. [2]
Container ID. Usually a UUID, as for example used to identify Docker containers. The UUID might be abbreviated.
Runtime specific image identifier. Usually a hash algorithm followed by a UUID.
Name of the image the container was built on.
Repo digests of the container image as provided by the container runtime.
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 registry.example.com/my-org/my-image:<tag>
.
Container labels, <key>
being the label name, the value being the label value.
Container name used by container runtime.
The container runtime managing this container.
Types
Functions
@spec container_command() :: :"container.command"
The command used to run the container (i.e. the command name).
Value type
Value must be of type atom() | String.t()
.
Notes
If using embedded credentials or sensitive data, it is recommended to remove them to prevent potential leakage.
Examples
["otelcontribcol"]
iex> OpenTelemetry.SemConv.Incubating.ContainerAttributes.container_command()
:"container.command"
?CONTAINER_COMMAND.
'container.command'
@spec container_command_args() :: :"container.command_args"
All the command arguments (including the command/executable itself) run by the container. [2]
Value type
Value must be of type [atom() | String.t()]
.
Examples
["otelcontribcol, --config, config.yaml"]
iex> OpenTelemetry.SemConv.Incubating.ContainerAttributes.container_command_args()
:"container.command_args"
?CONTAINER_COMMAND_ARGS.
'container.command_args'
@spec container_command_line() :: :"container.command_line"
The full command run by the container as a single string representing the full command. [2]
Value type
Value must be of type atom() | String.t()
.
Examples
["otelcontribcol --config config.yaml"]
iex> OpenTelemetry.SemConv.Incubating.ContainerAttributes.container_command_line()
:"container.command_line"
?CONTAINER_COMMAND_LINE.
'container.command_line'
@spec container_cpu_state() :: :"container.cpu.state"
@spec container_cpu_state_values() :: container_cpu_state_values()
@spec container_id() :: :"container.id"
Container ID. Usually a UUID, as for example used to identify Docker containers. The UUID might be abbreviated.
Value type
Value must be of type atom() | String.t()
.
Examples
["a3bf90e006b2"]
iex> OpenTelemetry.SemConv.Incubating.ContainerAttributes.container_id()
:"container.id"
?CONTAINER_ID.
'container.id'
@spec container_image_id() :: :"container.image.id"
Runtime specific image identifier. Usually a hash algorithm followed by a UUID.
Value type
Value must be of type atom() | String.t()
.
Notes
Docker defines a sha256 of the image id; container.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": "registry.azurecr.io /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.
Examples
["sha256:19c92d0a00d1b66d897bceaa7319bee0dd38a10a851c60bcec9474aa3f01e50f"]
iex> OpenTelemetry.SemConv.Incubating.ContainerAttributes.container_image_id()
:"container.image.id"
?CONTAINER_IMAGE_ID.
'container.image.id'
@spec container_image_name() :: :"container.image.name"
Name of the image the container was built on.
Value type
Value must be of type atom() | String.t()
.
Examples
["gcr.io/opentelemetry/operator"]
iex> OpenTelemetry.SemConv.Incubating.ContainerAttributes.container_image_name()
:"container.image.name"
?CONTAINER_IMAGE_NAME.
'container.image.name'
@spec container_image_repo_digests() :: :"container.image.repo_digests"
Repo digests of the container image as provided by the container runtime.
Value type
Value must be of type [atom() | String.t()]
.
Notes
Docker and CRI report those under the RepoDigests
field.
Examples
["example@sha256:afcc7f1ac1b49db317a7196c902e61c6c3c4607d63599ee1a82d702d249a0ccb", "internal.registry.example.com:5000/example@sha256:b69959407d21e8a062e0416bf13405bb2b71ed7a84dde4158ebafacfa06f5578"]
iex> OpenTelemetry.SemConv.Incubating.ContainerAttributes.container_image_repo_digests()
:"container.image.repo_digests"
?CONTAINER_IMAGE_REPO_DIGESTS.
'container.image.repo_digests'
@spec container_image_tags() :: :"container.image.tags"
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 registry.example.com/my-org/my-image:<tag>
.
Value type
Value must be of type [atom() | String.t()]
.
Examples
["v1.27.1", "3.5.7-0"]
iex> OpenTelemetry.SemConv.Incubating.ContainerAttributes.container_image_tags()
:"container.image.tags"
?CONTAINER_IMAGE_TAGS.
'container.image.tags'
@spec container_label() :: :"container.label"
Container labels, <key>
being the label name, the value being the label value.
Value type
Value must be of type atom() | String.t()
.
Examples
["container.label.app=nginx"]
iex> OpenTelemetry.SemConv.Incubating.ContainerAttributes.container_label()
:"container.label"
?CONTAINER_LABEL.
'container.label'
@spec container_labels() :: :"container.labels"
@spec container_name() :: :"container.name"
Container name used by container runtime.
Value type
Value must be of type atom() | String.t()
.
Examples
["opentelemetry-autoconf"]
iex> OpenTelemetry.SemConv.Incubating.ContainerAttributes.container_name()
:"container.name"
?CONTAINER_NAME.
'container.name'
@spec container_runtime() :: :"container.runtime"
The container runtime managing this container.
Value type
Value must be of type atom() | String.t()
.
Examples
["docker", "containerd", "rkt"]
iex> OpenTelemetry.SemConv.Incubating.ContainerAttributes.container_runtime()
:"container.runtime"
?CONTAINER_RUNTIME.
'container.runtime'