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_labels() deprecated

Container name used by container runtime.

The container runtime managing this container.

Types

Link to this type

container_cpu_state_values()

View Source
@type container_cpu_state_values() :: %{user: :user, system: :system, kernel: :kernel}

Deprecated, use cpu.mode instead.

Enum Values

  • :user e - When tasks of the cgroup are in user mode (Linux). When all container processes are in user mode (Windows).
  • :system e - When CPU is used by the system (host OS)
  • :kernel e - When tasks of the cgroup are in kernel mode (Linux). When all container processes are in kernel mode (Windows).

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"
Link to this function

container_command_args()

View Source
@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"
Link to this function

container_command_line()

View Source
@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"
This function is deprecated. Replaced by `cpu.mode` .
@spec container_cpu_state() :: :"container.cpu.state"
Link to this function

container_cpu_state_values()

View Source
@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"
@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"
@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"
Link to this function

container_image_repo_digests()

View Source
@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"
@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"
@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"
This function is deprecated. Replaced by `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"
@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"