[opentelemetry-kube-stack] Use chart's top-level resourceAttributes for k8s.cluster.name and deployment.environment.name - #361
Conversation
d967501 to
67db02f
Compare
cyrille-leclerc
left a comment
There was a problem hiding this comment.
Successfully tested
| name: k8s.pod.uid | ||
| resource/global: | ||
| attributes: | ||
| - action: upsert |
There was a problem hiding this comment.
should it be upsert, overwriting? or just inserting if not defined? Probably a question on the upstream feature rather than on our usage of it.
There was a problem hiding this comment.
I’m okay with upsert
For supported cloud providers, the cluster name is auto-detected, and the installation script doesn’t add k8s.cluster.name to the resourceAttributes.
If a user explicitly sets the cluster name in resourceAttributes, we can assume they want to override the value, so upsert makes sense.
mx-psi
left a comment
There was a problem hiding this comment.
Changes look good, could we avoid the newline changes in all rendered examples?
@mx-psi Somehow the file formatting in the main branch is broken. I think the new line change is generated by |
What does this PR do?
Upstream chart PR open-telemetry/opentelemetry-helm-charts#2393 adds a top-level
resourceAttributesmap that renders as aresource/globalupsert processor on every collector pipeline and is merged into the Instrumentation CR'sresource.resourceAttributes.This lets us delete our homegrown workaround for contrib#49970 and unify how
k8s.cluster.nameanddeployment.environment.nameget set.