Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add container labels field from ECS #125

Merged
merged 3 commits into from
Sep 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ release.

- Adds `session.id` and session.md to general docs and model
([#215](https://github.com/open-telemetry/semantic-conventions/pull/215))
- Add `container.labels.<key>` attributes.
([#125](https://github.com/open-telemetry/semantic-conventions/pull/125))
- Add `cluster.name` and `node.name` attributes to Elasticsearch semantic conventions.
([#285](https://github.com/open-telemetry/semantic-conventions/pull/285))
- Fix the unit of metric.process.runtime.jvm.system.cpu.load_1m to be {run_queue_item}
Expand Down
1 change: 1 addition & 0 deletions docs/resource/container.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
| `container.command` | string | The command used to run the container (i.e. the command name). [3] | `otelcontribcol` | Opt-In |
| `container.command_line` | string | The full command run by the container as a single string representing the full command. [2] | `otelcontribcol --config config.yaml` | Opt-In |
| `container.command_args` | string[] | All the command arguments (including the command/executable itself) run by the container. [2] | `[otelcontribcol, --config, config.yaml]` | Opt-In |
| `container.labels.<key>` | string | Container labels, `<key>` being the label name, the value being the label value. | `container.labels.app=nginx` | Recommended |

**[1]:** Docker defines a sha256 of the image id; `container.image.id` corresponds to the `Image` field from the Docker container inspect [API](https://docs.docker.com/engine/api/v1.43/#tag/Container/operation/ContainerInspect) endpoint.
K8s defines a link to the container registry repository with digest `"imageID": "registry.azurecr.io /namespace/service/dockerfile@sha256:bdeabd40c3a8a492eaf9e8e44d0ebbb84bac7ee25ac0cf8a7159d25f62555625"`.
Expand Down
5 changes: 5 additions & 0 deletions model/resource/container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,8 @@ groups:
brief: >
All the command arguments (including the command/executable itself) run by the container. [2]
examples: [ 'otelcontribcol, --config, config.yaml' ]
- id: labels
type: template[string]
brief: >
Container labels, `<key>` being the label name, the value being the label value.
examples: [ 'container.labels.app=nginx' ]