You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore(gcp-resource-detector): unit test to prevent a regression and ensure previously set attributes are not overwritten with blank values.
When attributes have already been set by other detectors, such as the EnvDetector, when the GcpDetector is run, it should not overwrite an existing attribute with a blank value if the source environment variable doesn't exist.
Prior to commit 143a1f4, the behavior was as follows:
- OTEL_RESOURCE_ATTRIBUTES = 'k8s.namespace.name=my-namespace'
- NAMESPACE is undefined
- EnvDetector runs and adds 'k8s.namespace.name=my-namespace' to attributes list
- GcpDetector runs and sets 'k8s.namespace.name=' (blank)
The GcpDetector should only set 'k8s.namespace.name' if the source environment variable is defined.
0 commit comments