Skip to content

Commit

Permalink
Expanding k8s.pod resource to include pod labels (open-telemetry#494)
Browse files Browse the repository at this point in the history
Co-authored-by: Armin Ruech <[email protected]>
Co-authored-by: Alexander Wert <[email protected]>
  • Loading branch information
3 people authored and pyohannes committed Jan 17, 2024
1 parent 3e7bf1b commit 144484e
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ release.

### Features

- Adds `labels` attribute to `k8s.pod` resource
([#494](https://github.com/open-telemetry/semantic-conventions/pull/494))
- Add `code.stacktrace` attribute
([#435](https://github.com/open-telemetry/semantic-conventions/pull/435))
- Add `http.flavor` and `http.user_agent` to list of deprecated attributes
Expand Down
1 change: 1 addition & 0 deletions docs/attributes-registry/k8s.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
| `k8s.namespace.name` | string | The name of the namespace that the pod is running in. | `default` | Recommended |
| `k8s.node.name` | string | The name of the Node. | `node-1` | Recommended |
| `k8s.node.uid` | string | The UID of the Node. | `1eb3a0c6-0477-4080-a9cb-0cb7db65c6a2` | Recommended |
| `k8s.pod.labels.<key>` | string | The labels placed on the Pod, the `<key>` being the label name, the value being the label value. | `k8s.pod.labels.app=my-app`; `k8s.pod.labels.mycompany.io/arch=x64`; `k8s.pod.labels.data=` | Recommended |
| `k8s.pod.name` | string | The name of the Pod. | `opentelemetry-pod-autoconf` | Recommended |
| `k8s.pod.uid` | string | The UID of the Pod. | `275ecb36-5aa8-4c2a-9c47-d8bb681b9aff` | Recommended |
| `k8s.replicaset.name` | string | The name of the ReplicaSet. | `opentelemetry` | Recommended |
Expand Down
1 change: 1 addition & 0 deletions docs/resource/k8s.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ containers on your cluster.
<!-- semconv k8s.pod -->
| Attribute | Type | Description | Examples | Requirement Level |
|---|---|---|---|---|
| [`k8s.pod.labels.<key>`](../attributes-registry/k8s.md) | string | The labels placed on the Pod, the `<key>` being the label name, the value being the label value. | `k8s.pod.labels.app=my-app`; `k8s.pod.labels.mycompany.io/arch=x64`; `k8s.pod.labels.data=` | Recommended |
| [`k8s.pod.name`](../attributes-registry/k8s.md) | string | The name of the Pod. | `opentelemetry-pod-autoconf` | Recommended |
| [`k8s.pod.uid`](../attributes-registry/k8s.md) | string | The UID of the Pod. | `275ecb36-5aa8-4c2a-9c47-d8bb681b9aff` | Recommended |
<!-- endsemconv -->
Expand Down
5 changes: 5 additions & 0 deletions model/registry/k8s.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ groups:
brief: >
The name of the Pod.
examples: ['opentelemetry-pod-autoconf']
- id: pod.labels
type: template[string]
brief: >
The labels placed on the Pod, the `<key>` being the label name, the value being the label value.
examples: ['k8s.pod.labels.app=my-app', 'k8s.pod.labels.mycompany.io/arch=x64', 'k8s.pod.labels.data=']
- id: container.name
type: string
brief: >
Expand Down
1 change: 1 addition & 0 deletions model/resource/k8s.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ groups:
attributes:
- ref: k8s.pod.uid
- ref: k8s.pod.name
- ref: k8s.pod.labels

- id: k8s.container
prefix: k8s.container
Expand Down

0 comments on commit 144484e

Please sign in to comment.