opentelemetry-collector icon indicating copy to clipboard operation
opentelemetry-collector copied to clipboard

Exported_job label in metrics (e.g., target_info) started including the namespace as part of the value

Open Vinaum8 opened this issue 5 months ago • 0 comments
trafficstars

Component(s)

No response

What happened?

Describe the bug After upgrading the OpenTelemetry Operator and Collector to the following versions:

image:
  repository: 'ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator'
  tag: '0.125.0'
collectorImage:
  repository: 'ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib'
  tag: '0.126.0'

The exported_job label in metrics (e.g., target_info) started including the namespace as part of the value, changing from just the job name to the format namespace/job_name.

Previously, the label had the value:

exported_job="APPREDACTED"

Now it appears as both:

exported_job="APPREDACTED" AND exported_job="production/APPREDACTED"

Where production is the namespace of the resource.

This change is causing duplicated time series and confusion in dashboards and alerts that rely on the exported_job label. Steps to reproduce

Steps to reproduce

  1. Deploy the OpenTelemetry Operator and Collector using the versions mentioned above.
  2. Deploy an Instrumentation resource in the production namespace.
  3. Observe the target_info metric in Prometheus.
  4. Note that the exported_job label appears with two different values:

APPREDACTED AND production/APPREDACTED

What did you expect to see? What did you expect to see? I expected to see the exported_job label value remain consistent as before, containing only the job name: APPREDACTED, regardless of the namespace.

What did you see instead? The exported_job label now has two different formats:

APPREDACTED AND production/APPREDACTED

This new behavior introduces duplicates and inconsistencies in metrics.

Collector version

0.126.0

Environment information

INF Target K8s version is 1.31.7-eks-bcf3d70

OpenTelemetry Collector configuration

telemetry:
        metrics:
          level: normal
          readers:
            - pull:
                exporter:
                  prometheus:
                    host: '[${env:MY_POD_IP}]'
                    port: 8888

Log output


Additional context

No response

Vinaum8 avatar May 22 '25 18:05 Vinaum8