Container

容器

状态: 开发中

type: container

Description: 容器实例。

其他属性

⚠️ 此实体定义包含没有角色的属性。稳定的实体不得包含没有定义角色的属性。

Stability需求级别Value Type描述Example Values
container.idDevelopment推荐字符串容器 ID。通常是一个 UUID,例如用于 标识 Docker 容器。UUID 可能会被缩写。a3bf90e006b2
container.label.<key>Development推荐字符串容器标签,<key> 为标签名称,值为标签值。[1]nginx
container.nameDevelopment推荐字符串容器运行时使用的容器名称。opentelemetry-autoconf
oci.manifest.digestDevelopment推荐字符串OCI 镜像清单的摘要。对于容器镜像,通常是容器镜像所知的摘要。[2]sha256:e4ca62c0d62f3e886e684806dfe9d4e0cda60d54986898173c1083856cfda0f4
container.commandDevelopment选择加入字符串用于运行容器的命令(即命令名称)。[3]otelcontribcol
container.command_argsDevelopment选择加入string[]容器运行的所有命令参数(包括命令/可执行文件本身)。["otelcontribcol", "--config", "config.yaml"]
container.command_lineDevelopment选择加入字符串容器运行的完整命令,表示为单个字符串。otelcontribcol --config config.yaml

[1] container.label.<key>: 例如,一个名为 app,值为 nginx 的 docker 容器标签应记录为 container.label.app 属性,值为 "nginx"

[2] oci.manifest.digest: 遵循 OCI 镜像清单规范,特别是 摘要属性。在 示例镜像清单 中可以找到一个例子。

[3] container.command: 如果使用嵌入式凭证或敏感数据,建议将其移除以防止潜在泄露。

容器镜像

状态: 开发中

type: container.image

Description: 用于容器的镜像。

其他属性

⚠️ 此实体定义包含没有角色的属性。稳定的实体不得包含没有定义角色的属性。

Stability需求级别Value Type描述Example Values
container.image.idDevelopment推荐字符串运行时特定的镜像标识符。通常是一个哈希算法后跟一个 UUID。[4]sha256:19c92d0a00d1b66d897bceaa7319bee0dd38a10a851c60bcec9474aa3f01e50f
container.image.nameDevelopment推荐字符串Name of the image the container was built on.gcr.io/opentelemetry/operator
container.image.repo_digestsDevelopment推荐string[]容器运行时提供的容器镜像的仓库摘要。[5]["example@sha256:afcc7f1ac1b49db317a7196c902e61c6c3c4607d63599ee1a82d702d249a0ccb", "internal.registry.example.com:5000/example@sha256:b69959407d21e8a062e0416bf13405bb2b71ed7a84dde4158ebafacfa06f5578"]
container.image.tagsDevelopment推荐string[]容器镜像标签。在 Docker Image Inspect 中可以找到一个例子。对于从 registry.example.com/my-org/my-image:<tag> 完整名称,应只包含 <tag> 部分。["v1.27.1", "3.5.7-0"]

[4] container.image.id: Docker 定义了镜像 ID 的 sha256;container.image.id 对应于 Docker 容器检查 API 端点的 Image 字段。K8s 定义了一个指向容器注册表仓库的链接,其中包含摘要 "imageID": "registry.azurecr.io /namespace/service/dockerfile@sha256:bdeabd40c3a8a492eaf9e8e44d0ebbb84bac7ee25ac0cf8a7159d25f62555625"。ID 由容器运行时分配,可能在不同环境中有所不同。如果希望在不同环境/运行时中标识同一镜像,请考虑使用 oci.manifest.digest

[5] container.image.repo_digests: DockerCRIRepoDigests 字段下报告这些。

容器运行时

状态: 开发中

type: container.runtime

Description: 正在运行容器的运行时。

标识属性

Stability需求级别Value Type描述Example Values
container.runtime.nameDevelopment推荐字符串管理此容器的容器运行时。docker; containerd; rkt
container.runtime.versionDevelopment推荐字符串此进程运行时的版本,由运行时直接返回。1.0.0

描述性属性

Stability需求级别Value Type描述Example Values
container.runtime.descriptionDevelopment推荐字符串关于运行时的描述,可以包含例如正在使用的 CRI/API 版本或其他自定义信息的详细信息。docker://19.3.1 - CRI: 1.22.0