From 12feabef58bf0e94be7103374e292d73ad2bc38b Mon Sep 17 00:00:00 2001 From: alkaplan Date: Tue, 7 Nov 2023 15:10:20 -0800 Subject: [PATCH 01/13] Adding labels attribute to k8s.pod resource type, with examples --- model/resource/k8s.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/model/resource/k8s.yaml b/model/resource/k8s.yaml index ac353625ea..749020832e 100644 --- a/model/resource/k8s.yaml +++ b/model/resource/k8s.yaml @@ -85,6 +85,11 @@ groups: brief: > The name of the Pod. examples: ['opentelemetry-pod-autoconf'] + - id: labels + type: template[string] + brief: > + Pod's labels, the `` being the label name, the value being the label value. + examples: ['pod.labels.app=my-app', 'pod.labels.mycompany.io/arch=x64'] - id: k8s.container prefix: k8s.container From bdb4799f3575545854f1d8740eabb712bfaaf4e5 Mon Sep 17 00:00:00 2001 From: alkaplan Date: Tue, 7 Nov 2023 15:23:24 -0800 Subject: [PATCH 02/13] Updated changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5a1368259f..09c18b0fd6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,8 @@ release. ### Breaking ### Features +- Adds `labels` attribute to `k8s.pod` resource + ([#494](https://github.com/open-telemetry/semantic-conventions/pull/494)) ### Fixes From 759931f7ad02c79552cf404c8645fa312b14c258 Mon Sep 17 00:00:00 2001 From: alkaplan Date: Tue, 7 Nov 2023 15:24:47 -0800 Subject: [PATCH 03/13] Merging two examples into one to illustrate the property bag nature of the templated attribute --- model/resource/k8s.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/resource/k8s.yaml b/model/resource/k8s.yaml index 749020832e..8bb52ba83a 100644 --- a/model/resource/k8s.yaml +++ b/model/resource/k8s.yaml @@ -89,7 +89,7 @@ groups: type: template[string] brief: > Pod's labels, the `` being the label name, the value being the label value. - examples: ['pod.labels.app=my-app', 'pod.labels.mycompany.io/arch=x64'] + examples: ['pod.labels.app=my-app,pod.labels.mycompany.io/arch=x64'] - id: k8s.container prefix: k8s.container From 0e2be5831decf1bfaf1f8d561e9370dc190da984 Mon Sep 17 00:00:00 2001 From: alkaplan Date: Thu, 9 Nov 2023 12:56:53 -0800 Subject: [PATCH 04/13] Regenerated the docs --- docs/resource/k8s.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/resource/k8s.md b/docs/resource/k8s.md index 5692ce3132..0a2cdf1dfa 100644 --- a/docs/resource/k8s.md +++ b/docs/resource/k8s.md @@ -91,6 +91,7 @@ containers on your cluster. | Attribute | Type | Description | Examples | Requirement Level | |---|---|---|---|---| +| `k8s.pod.labels.` | string | Pod's labels, the `` being the label name, the value being the label value. | `pod.labels.app=my-app,pod.labels.mycompany.io/arch=x64` | 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 | From a9e1b3bf0028ad2c544f14fc94ce7817148fe1d8 Mon Sep 17 00:00:00 2001 From: alkaplan Date: Thu, 9 Nov 2023 13:43:14 -0800 Subject: [PATCH 05/13] Brief's tweak --- model/resource/k8s.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/resource/k8s.yaml b/model/resource/k8s.yaml index 8bb52ba83a..c3dc5ce70c 100644 --- a/model/resource/k8s.yaml +++ b/model/resource/k8s.yaml @@ -88,7 +88,7 @@ groups: - id: labels type: template[string] brief: > - Pod's labels, the `` being the label name, the value being the label value. + The labels placed on the Pod, the `` being the label name, the value being the label value. examples: ['pod.labels.app=my-app,pod.labels.mycompany.io/arch=x64'] - id: k8s.container From f5b596005bce64af4db7b569c5de666362ed29d2 Mon Sep 17 00:00:00 2001 From: alkaplan Date: Thu, 9 Nov 2023 13:44:10 -0800 Subject: [PATCH 06/13] Regenerated docs --- docs/resource/k8s.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/resource/k8s.md b/docs/resource/k8s.md index 0a2cdf1dfa..ce19adc9e6 100644 --- a/docs/resource/k8s.md +++ b/docs/resource/k8s.md @@ -91,7 +91,7 @@ containers on your cluster. | Attribute | Type | Description | Examples | Requirement Level | |---|---|---|---|---| -| `k8s.pod.labels.` | string | Pod's labels, the `` being the label name, the value being the label value. | `pod.labels.app=my-app,pod.labels.mycompany.io/arch=x64` | Recommended | +| `k8s.pod.labels.` | string | The labels placed on the Pod, the `` being the label name, the value being the label value. | `pod.labels.app=my-app,pod.labels.mycompany.io/arch=x64` | 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 | From ff30d0ba574e11c18e974bfa5ce9c335b1ea25e4 Mon Sep 17 00:00:00 2001 From: alkaplan Date: Thu, 9 Nov 2023 13:58:44 -0800 Subject: [PATCH 07/13] Fixing lint issues --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 09c18b0fd6..817b6e97ca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ release. ### Breaking ### Features + - Adds `labels` attribute to `k8s.pod` resource ([#494](https://github.com/open-telemetry/semantic-conventions/pull/494)) From ef6bfb3311497f08c801f5f32d89c49af4379c7a Mon Sep 17 00:00:00 2001 From: alkaplan Date: Wed, 15 Nov 2023 12:30:29 -0800 Subject: [PATCH 08/13] Using full prefix in example, adding an example for an empty label --- model/resource/k8s.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/resource/k8s.yaml b/model/resource/k8s.yaml index c3dc5ce70c..fbcff67a90 100644 --- a/model/resource/k8s.yaml +++ b/model/resource/k8s.yaml @@ -89,7 +89,7 @@ groups: type: template[string] brief: > The labels placed on the Pod, the `` being the label name, the value being the label value. - examples: ['pod.labels.app=my-app,pod.labels.mycompany.io/arch=x64'] + examples: ['k8s.pod.labels.app=my-app,k8s.pod.labels.mycompany.io/arch=x64,k8s.pod.labels.data='] - id: k8s.container prefix: k8s.container From 9d7efbef997f1e0323166f6316ac9012d63d3e32 Mon Sep 17 00:00:00 2001 From: alkaplan Date: Wed, 15 Nov 2023 12:43:18 -0800 Subject: [PATCH 09/13] Regenerated .md --- docs/resource/k8s.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/resource/k8s.md b/docs/resource/k8s.md index 157eab1f2f..d3c73f8469 100644 --- a/docs/resource/k8s.md +++ b/docs/resource/k8s.md @@ -91,7 +91,7 @@ containers on your cluster. | Attribute | Type | Description | Examples | Requirement Level | |---|---|---|---|---| -| `k8s.pod.labels.` | string | The labels placed on the Pod, the `` being the label name, the value being the label value. | `pod.labels.app=my-app,pod.labels.mycompany.io/arch=x64` | Recommended | +| `k8s.pod.labels.` | string | The labels placed on the Pod, the `` 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 | From 3cf9ef1a0b8dab9aaf942732def1affe6658da6c Mon Sep 17 00:00:00 2001 From: Alexander Wert Date: Thu, 16 Nov 2023 08:26:29 +0100 Subject: [PATCH 10/13] Update CHANGELOG.md --- CHANGELOG.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4ab2237198..f3509ffe00 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,7 +18,6 @@ release. - 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 From 7686445f3aa7410b1b5cd0b04d7a0feef83d0282 Mon Sep 17 00:00:00 2001 From: Alexander Wert Date: Thu, 16 Nov 2023 14:50:48 +0100 Subject: [PATCH 11/13] Update model/resource/k8s.yaml --- model/resource/k8s.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/resource/k8s.yaml b/model/resource/k8s.yaml index b79e17195e..2c04f7db0c 100644 --- a/model/resource/k8s.yaml +++ b/model/resource/k8s.yaml @@ -37,7 +37,7 @@ groups: type: template[string] brief: > The labels placed on the Pod, the `` 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='] + examples: ['k8s.pod.labels.app=my-app','k8s.pod.labels.mycompany.io/arch=x64','k8s.pod.labels.data='] - id: k8s.container prefix: k8s.container From 6e6975cc17607cec0e57f7e1592e331138f2070b Mon Sep 17 00:00:00 2001 From: alkaplan Date: Mon, 20 Nov 2023 12:00:40 -0800 Subject: [PATCH 12/13] yamllint fixes --- docs/resource/k8s.md | 2 +- model/resource/k8s.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/resource/k8s.md b/docs/resource/k8s.md index d3c73f8469..dfb3cc035a 100644 --- a/docs/resource/k8s.md +++ b/docs/resource/k8s.md @@ -91,7 +91,7 @@ containers on your cluster. | Attribute | Type | Description | Examples | Requirement Level | |---|---|---|---|---| -| `k8s.pod.labels.` | string | The labels placed on the Pod, the `` 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.labels.` | string | The labels placed on the Pod, the `` 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 | diff --git a/model/resource/k8s.yaml b/model/resource/k8s.yaml index 2c04f7db0c..f557f0a5bb 100644 --- a/model/resource/k8s.yaml +++ b/model/resource/k8s.yaml @@ -37,7 +37,7 @@ groups: type: template[string] brief: > The labels placed on the Pod, the `` 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='] + examples: ['k8s.pod.labels.app=my-app', 'k8s.pod.labels.mycompany.io/arch=x64', 'k8s.pod.labels.data='] - id: k8s.container prefix: k8s.container From 3fa6a81738b44c8d4beccc0a3df440004c97e531 Mon Sep 17 00:00:00 2001 From: alkaplan Date: Mon, 20 Nov 2023 12:10:57 -0800 Subject: [PATCH 13/13] Moving k8s.pod.labels attribute to the registry --- docs/attributes-registry/k8s.md | 1 + docs/resource/k8s.md | 2 +- model/registry/k8s.yaml | 5 +++++ model/resource/k8s.yaml | 6 +----- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/docs/attributes-registry/k8s.md b/docs/attributes-registry/k8s.md index 5778085ae8..9becbbf729 100644 --- a/docs/attributes-registry/k8s.md +++ b/docs/attributes-registry/k8s.md @@ -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.` | string | The labels placed on the Pod, the `` 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 | diff --git a/docs/resource/k8s.md b/docs/resource/k8s.md index dfb3cc035a..f5ed62b723 100644 --- a/docs/resource/k8s.md +++ b/docs/resource/k8s.md @@ -91,7 +91,7 @@ containers on your cluster. | Attribute | Type | Description | Examples | Requirement Level | |---|---|---|---|---| -| `k8s.pod.labels.` | string | The labels placed on the Pod, the `` 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.labels.`](../attributes-registry/k8s.md) | string | The labels placed on the Pod, the `` 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 | diff --git a/model/registry/k8s.yaml b/model/registry/k8s.yaml index c42744cb21..9c453fb691 100644 --- a/model/registry/k8s.yaml +++ b/model/registry/k8s.yaml @@ -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 `` 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: > diff --git a/model/resource/k8s.yaml b/model/resource/k8s.yaml index f557f0a5bb..f0752f0f09 100644 --- a/model/resource/k8s.yaml +++ b/model/resource/k8s.yaml @@ -33,11 +33,7 @@ groups: attributes: - ref: k8s.pod.uid - ref: k8s.pod.name - - id: labels - type: template[string] - brief: > - The labels placed on the Pod, the `` 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='] + - ref: k8s.pod.labels - id: k8s.container prefix: k8s.container