From 3fa6a81738b44c8d4beccc0a3df440004c97e531 Mon Sep 17 00:00:00 2001 From: alkaplan Date: Mon, 20 Nov 2023 12:10:57 -0800 Subject: [PATCH] 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