Skip to content

Commit

Permalink
Add container labels field from ECS
Browse files Browse the repository at this point in the history
Signed-off-by: ChrsMark <[email protected]>
  • Loading branch information
ChrsMark committed Jun 20, 2023
1 parent d6d2952 commit 865c663
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
5 changes: 5 additions & 0 deletions semantic_conventions/resource/container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,8 @@ groups:
brief: >
Container image tag.
examples: ['0.1']
- id: labels.<key>
type: string
brief: >
Container labels, `<key>` being the label name, the value being the label value.
examples: [ 'container.labels.app=nginx']
15 changes: 8 additions & 7 deletions specification/resource/semantic_conventions/container.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@
**Description:** A container instance.

<!-- semconv container -->
| Attribute | Type | Description | Examples | Requirement Level |
|---|---|---|---|---|
| `container.name` | string | Container name used by container runtime. | `opentelemetry-autoconf` | Recommended |
| `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` | Recommended |
| `container.runtime` | string | The container runtime managing this container. | `docker`; `containerd`; `rkt` | Recommended |
| `container.image.name` | string | Name of the image the container was built on. | `gcr.io/opentelemetry/operator` | Recommended |
| `container.image.tag` | string | Container image tag. | `0.1` | Recommended |
| Attribute | Type | Description | Examples | Requirement Level |
|--------------------------|---|--|---|---|
| `container.name` | string | Container name used by container runtime. | `opentelemetry-autoconf` | Recommended |
| `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` | Recommended |
| `container.runtime` | string | The container runtime managing this container. | `docker`; `containerd`; `rkt` | Recommended |
| `container.image.name` | string | Name of the image the container was built on. | `gcr.io/opentelemetry/operator` | Recommended |
| `container.image.tag` | string | Container image tag. | `0.1` | Recommended |
| `container.labels.<key>` | string | Container labels, `<key>` being the label name, the value being the label value. | `container.labels.app=nginx` | Recommended |
<!-- endsemconv -->

[DocumentStatus]: https://github.com/open-telemetry/opentelemetry-specification/blob/v1.21.0/specification/document-status.md

0 comments on commit 865c663

Please sign in to comment.