Description
Component(s)
receiver/prometheus
What happened?
Description
In our setup, we have a push gateway which jobs push metrics to. Each of the metrics pushed by the jobs have a different job label. We want to preserve the job label set by the metric publishing job. But when we set honor_labels: true
in the otel prometheus receiver configuration for the scrape job, all metrics scraped from the push gateway has a single value for the job label. The value set for the job label is from a one set of metrics pushed by a job.
Steps to Reproduce
Configure a push gateway, push few metrics to it with different values for job label.
Configure OTEL collector to scrape push gateway.
Check the values for the job label.
Expected Result
Metrics scraped from push gateway should have the job label value set by the metrics publisher.
Actual Result
All metrics scraped from push gateway has a single value for the job label.
Collector version
v0.103.0
Environment information
No response
OpenTelemetry Collector configuration
receivers:
prometheus/2:
config:
scrape_configs:
- honor_labels: true
job_name: app-platform-pushgateway
kubernetes_sd_configs:
- namespaces:
names:
- app-platform-monitoring
role: pod
relabel_configs:
- action: keep
regex: Running
source_labels:
- __meta_kubernetes_pod_phase
- action: keep
regex: true
source_labels:
- __meta_kubernetes_pod_ready
- action: keep
regex: metrics
source_labels:
- __meta_kubernetes_pod_container_port_name
scheme: http
scrape_interval: 30s
scrape_timeout: 10s
Log output
No response
Additional context
No response
Activity