Skip to content

[receiver/k8scluster] Prefix resource labels in entity events per OTel semconv#47493

Merged
dmitryax merged 1 commit into
open-telemetry:mainfrom
dmitryax:k8scluster-entity-label-prefix
Apr 11, 2026
Merged

[receiver/k8scluster] Prefix resource labels in entity events per OTel semconv#47493
dmitryax merged 1 commit into
open-telemetry:mainfrom
dmitryax:k8scluster-entity-label-prefix

Conversation

@dmitryax
Copy link
Copy Markdown
Member

@dmitryax dmitryax commented Apr 9, 2026

Resolves #47491

Kubernetes resource labels emitted as entity event attributes are now keyed as k8s.<resource>.label.<key> (e.g. k8s.pod.label.app) to align with OTel semantic conventions instead of being emitted verbatim.

Affected resources: pod, node, and all resources going through GetGenericMetadata (deployment, daemonset, replicaset, statefulset, cronjob, job, hpa, replicationcontroller).

@dmitryax dmitryax requested review from a team, ChrsMark and TylerHelmuth as code owners April 9, 2026 02:34
@github-actions github-actions Bot requested a review from povilasv April 9, 2026 02:34
@dmitryax dmitryax force-pushed the k8scluster-entity-label-prefix branch 2 times, most recently from 50193eb to 3f53f69 Compare April 9, 2026 03:07
semconv

Kubernetes resource labels emitted as entity event attributes are now
keyed as `k8s.<resource>.label.<key>` (e.g. `k8s.pod.label.app`) to
align with OTel semantic conventions instead of being emitted verbatim.

Affected resources: pod, node, and all resources going through
GetGenericMetadata (deployment, daemonset, replicaset, statefulset,
cronjob, job, hpa, replicationcontroller).

Assisted-by: Claude Opus 4.6
Copy link
Copy Markdown
Member

@ChrsMark ChrsMark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this change need to happen behind a feature gate pair similarly to the k8s_attributes processor? Or we don't want to treat this breaking change in this way because Entities are still experimental?

ref: #45307

@dmitryax
Copy link
Copy Markdown
Member Author

dmitryax commented Apr 9, 2026

Does this change need to happen behind a feature gate pair similarly to the k8s_attributes processor? Or we don't want to treat this breaking change in this way because Entities are still experimental?

Right, it's still an experimental side channel. So I think it's fine to change it as a breaking change

dmitryax added a commit that referenced this pull request Apr 11, 2026
…efix from dimension property updates. (#47494)

Add `dimension_client::strip_k8s_label_prefix` option to strip
`k8s.<resource>.label.` prefix from dimension property updates.

Once
#47493
is merged, the k8s cluster receiver will emit Kubernetes resource labels
in entity events with the `k8s.<resource>.label.` prefix per OTel
semantic conventions (e.g. `k8s.pod.label.app`). When
`strip_k8s_label_prefix: true` (the default), the SignalFx exporter
strips this prefix when forwarding labels as dimension properties,
preserving the existing SignalFx behavior (e.g. `app`).
@dmitryax dmitryax merged commit 138fbe1 into open-telemetry:main Apr 11, 2026
188 of 191 checks passed
AndrewCharlesHay pushed a commit to AndrewCharlesHay/opentelemetry-collector-contrib that referenced this pull request Apr 23, 2026
…efix from dimension property updates. (open-telemetry#47494)

Add `dimension_client::strip_k8s_label_prefix` option to strip
`k8s.<resource>.label.` prefix from dimension property updates.

Once
open-telemetry#47493
is merged, the k8s cluster receiver will emit Kubernetes resource labels
in entity events with the `k8s.<resource>.label.` prefix per OTel
semantic conventions (e.g. `k8s.pod.label.app`). When
`strip_k8s_label_prefix: true` (the default), the SignalFx exporter
strips this prefix when forwarding labels as dimension properties,
preserving the existing SignalFx behavior (e.g. `app`).
AndrewCharlesHay pushed a commit to AndrewCharlesHay/opentelemetry-collector-contrib that referenced this pull request Apr 23, 2026
…l semconv (open-telemetry#47493)

Resolves
open-telemetry#47491

Kubernetes resource labels emitted as entity event attributes are now
keyed as `k8s.<resource>.label.<key>` (e.g. `k8s.pod.label.app`) to
align with OTel semantic conventions instead of being emitted verbatim.

Affected resources: pod, node, and all resources going through
GetGenericMetadata (deployment, daemonset, replicaset, statefulset,
cronjob, job, hpa, replicationcontroller).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[receiver/k8s_cluster] Pod (and other resource) labels in entity events don't follow OTel semantic conventions

3 participants