open-telemetry / opentelemetry-helm-charts

OpenTelemetry Helm Charts
https://opentelemetry.io
Apache License 2.0
391 stars 470 forks source link

Resource/Span attributes collision possible due to default K8s processor behavior #1311

Closed bixu closed 1 month ago

bixu commented 1 month ago

The behavior of this default can have surprising unwanted consequences.

Example:

Proposal:

Consider some namespacing when this default is enabled. For example, k8s.pod.label.<label value>.

TylerHelmuth commented 1 month ago

@bixu the semantic conventions do specify a namespacing. This feature was added before that and we are not going to update it until the k8s semantic conventions are stabilized, to minimize the amount to times we need to do a breaking change.

If you need some namespacing I suggest not using the .Values.preset.kubernetesAttributes.extractAllPodLabels field and instead configure the extraction manually:

  k8sattributes:
    extract:
      labels:
        - tag_name: k8s.pod.label.$$1
          key_regex: (.*)
          from: pod
bixu commented 1 month ago

Thanks for the context, we're fine with explicitly configuring this until the semconv settles.

Should we keep the issue for tracking this until then? If not, I'm happy to close.

TylerHelmuth commented 1 month ago

I think closing is fine, we'll have a specific semconv issue for tracking that work