diff --git a/.chloggen/node-label-opt.yaml b/.chloggen/node-label-opt.yaml new file mode 100644 index 000000000..b1891f334 --- /dev/null +++ b/.chloggen/node-label-opt.yaml @@ -0,0 +1,22 @@ +# Use this changelog template to create an entry for release notes. +# +# If your change doesn't affect end users you should instead start +# your pull request title with [chore] or use the "Skip Changelog" label. + +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: breaking + +# The name of the area of concern in the attributes-registry, (e.g. http, cloud, db) +component: k8s + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: "Make k8s Node and Pod labels optional" + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +# The values here must be integers. +issues: [2079] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/docs/resource/k8s.md b/docs/resource/k8s.md index 8dc422e6f..5dc07b44a 100644 --- a/docs/resource/k8s.md +++ b/docs/resource/k8s.md @@ -82,14 +82,14 @@ conflict. | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| -| [`k8s.node.label.`](/docs/attributes-registry/k8s.md) | string | The label key-value pairs placed on the Node. [1] | `k8s.node.label.kubernetes.io/arch=arm64`; `k8s.node.label.data=` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) | | [`k8s.node.name`](/docs/attributes-registry/k8s.md) | string | The name of the Node. | `node-1` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) | | [`k8s.node.uid`](/docs/attributes-registry/k8s.md) | string | The UID of the Node. | `1eb3a0c6-0477-4080-a9cb-0cb7db65c6a2` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) | -| [`k8s.node.annotation.`](/docs/attributes-registry/k8s.md) | string | The annotation key-value pairs placed on the Node. [2] | `k8s.node.annotation.node.alpha.kubernetes.io/ttl=0`; `k8s.node.annotation.data=` | `Opt-In` | ![Development](https://img.shields.io/badge/-development-blue) | +| [`k8s.node.annotation.`](/docs/attributes-registry/k8s.md) | string | The annotation key-value pairs placed on the Node. [1] | `k8s.node.annotation.node.alpha.kubernetes.io/ttl=0`; `k8s.node.annotation.data=` | `Opt-In` | ![Development](https://img.shields.io/badge/-development-blue) | +| [`k8s.node.label.`](/docs/attributes-registry/k8s.md) | string | The label key-value pairs placed on the Node. [2] | `k8s.node.label.kubernetes.io/arch=arm64`; `k8s.node.label.data=` | `Opt-In` | ![Development](https://img.shields.io/badge/-development-blue) | -**[1] `k8s.node.label`:** The `` being the label name, the value being the label value, even if the value is empty. +**[1] `k8s.node.annotation`:** The `` being the annotation name, the value being the annotation value, even if the value is empty. -**[2] `k8s.node.annotation`:** The `` being the annotation name, the value being the annotation value, even if the value is empty. +**[2] `k8s.node.label`:** The `` being the label name, the value being the label value, even if the value is empty. @@ -145,10 +145,10 @@ containers on your cluster. | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| -| [`k8s.pod.label.`](/docs/attributes-registry/k8s.md) | string | The label key-value pairs placed on the Pod, the `` being the label name, the value being the label value. | `k8s.pod.label.app=my-app`; `k8s.pod.label.mycompany.io/arch=x64`; `k8s.pod.label.data=` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) | | [`k8s.pod.name`](/docs/attributes-registry/k8s.md) | string | The name of the Pod. | `opentelemetry-pod-autoconf` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) | | [`k8s.pod.uid`](/docs/attributes-registry/k8s.md) | string | The UID of the Pod. | `275ecb36-5aa8-4c2a-9c47-d8bb681b9aff` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) | | [`k8s.pod.annotation.`](/docs/attributes-registry/k8s.md) | string | The annotation key-value pairs placed on the Pod, the `` being the annotation name, the value being the annotation value. | `k8s.pod.annotation.kubernetes.io/enforce-mountable-secrets=true`; `k8s.pod.annotation.mycompany.io/arch=x64`; `k8s.pod.annotation.data=` | `Opt-In` | ![Development](https://img.shields.io/badge/-development-blue) | +| [`k8s.pod.label.`](/docs/attributes-registry/k8s.md) | string | The label key-value pairs placed on the Pod, the `` being the label name, the value being the label value. | `k8s.pod.label.app=my-app`; `k8s.pod.label.mycompany.io/arch=x64`; `k8s.pod.label.data=` | `Opt-In` | ![Development](https://img.shields.io/badge/-development-blue) | diff --git a/model/k8s/resources.yaml b/model/k8s/resources.yaml index 679ac79ec..67bb4a453 100644 --- a/model/k8s/resources.yaml +++ b/model/k8s/resources.yaml @@ -19,6 +19,7 @@ groups: - ref: k8s.node.name - ref: k8s.node.uid - ref: k8s.node.label + requirement_level: opt_in - ref: k8s.node.annotation requirement_level: opt_in @@ -41,6 +42,7 @@ groups: - ref: k8s.pod.uid - ref: k8s.pod.name - ref: k8s.pod.label + requirement_level: opt_in - ref: k8s.pod.annotation requirement_level: opt_in