Clarify difference between `container.name` and `k8s.container.name` (#1980)

Add more details to container name attributes to clarify the difference.

Co-authored-by: Bogdan Drutu <bogdandrutu@gmail.com>
This commit is contained in:
Dmitrii Anoshin 2021-11-04 11:45:20 -07:00 committed by GitHub
parent 14973d30e6
commit fdd5c96846
4 changed files with 6 additions and 4 deletions

View File

@ -7,7 +7,7 @@ groups:
- id: name
type: string
brief: >
Container name.
Container name used by container runtime.
examples: ['opentelemetry-autoconf']
- id: id
type: string

View File

@ -61,7 +61,9 @@ groups:
- id: name
type: string
brief: >
The name of the Container in a Pod template.
The name of the Container from Pod specification, must be unique
within a Pod. Container runtime usually uses different globally unique
name (`container.name`).
examples: ['redis']
- id: restart_count
type: int

View File

@ -9,7 +9,7 @@
<!-- semconv container -->
| Attribute | Type | Description | Examples | Required |
|---|---|---|---|---|
| `container.name` | string | Container name. | `opentelemetry-autoconf` | No |
| `container.name` | string | Container name used by container runtime. | `opentelemetry-autoconf` | No |
| `container.id` | string | Container ID. Usually a UUID, as for example used to [identify Docker containers](https://docs.docker.com/engine/reference/run/#container-identification). The UUID might be abbreviated. | `a3bf90e006b2` | No |
| `container.runtime` | string | The container runtime managing this container. | `docker`; `containerd`; `rkt` | No |
| `container.image.name` | string | Name of the image the container was built on. | `gcr.io/opentelemetry/operator` | No |

View File

@ -87,7 +87,7 @@ to a running container.
<!-- semconv k8s.container -->
| Attribute | Type | Description | Examples | Required |
|---|---|---|---|---|
| `k8s.container.name` | string | The name of the Container in a Pod template. | `redis` | No |
| `k8s.container.name` | string | The name of the Container from Pod specification, must be unique within a Pod. Container runtime usually uses different globally unique name (`container.name`). | `redis` | No |
| `k8s.container.restart_count` | int | Number of times the container was restarted. This attribute can be used to identify a particular container (running or stopped) within a container spec. | `0`; `2` | No |
<!-- endsemconv -->