Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect receiver label in prometheus receiver observability metrics #5011

Closed
olagacek opened this issue Feb 23, 2021 · 5 comments
Closed
Labels
comp:prometheus Prometheus related issues

Comments

@olagacek
Copy link
Contributor

Describe the bug

In version 0.20.0 of opentelemetry collector observability metrics coming from prometheus receiver do not contain proper label "receiver" with receiver name - it is set to empty string, instead of "prometheus"

Steps to reproduce

Run Open Telemetry app with prometheus receiver enabled, then scrape localhost:8888 metrics and inspect the returned response.

What did you expect to see?

otelcol_receiver_accepted_metric_points, otelcol_receiver_refused_metric_points metrics having "receiver" label set to "prometheus"

What did you see instead?

otelcol_receiver_accepted_metric_points, otelcol_receiver_refused_metric_points metrics have "receiver" label set to ""

What version did you use?

Version: v0.20.0

What config did you use?

    receivers:
      prometheus:
        use_start_time_metric: true
        config:
          scrape_configs:
            - job_name: "kubelet"
              scrape_interval: 60s
              static_configs:
              - targets: ["127.0.0.1:10255"]
              metric_relabel_configs:
              - source_labels: [ __name__ ]
                regex: "kubelet_docker_operations|kubelet_docker_operations_errors"
                action: keep
    exporters:
      stackdriver:
    service:
      pipelines:
        metrics/prom:
          receivers:
            - prometheus
          exporters:
            - stackdriver

Environment
OS: COS
Compiler(if manually compiled): go 1.14

@yeya24
Copy link
Contributor

yeya24 commented Mar 11, 2021

I can take this one.

@yeya24
Copy link
Contributor

yeya24 commented Mar 25, 2021

I think this issue was fixed by open-telemetry/opentelemetry-collector#2680 already

@gillg
Copy link
Contributor

gillg commented Jun 30, 2021

I confirm all metrics I use in otel collector namespace has label like receiver="prometheus" exporter="prometheus"

@odeke-em
Copy link
Member

@alolita @bogdandrutu @Aneurysm9 @kirbyquerby could someone please help close this issue? The PR author forgot to attach the "Fixes #NNNN" in their commit message so it didn't auto close, but it was fixed months ago.

@bogdandrutu bogdandrutu transferred this issue from open-telemetry/opentelemetry-collector Aug 30, 2021
@alolita alolita added the comp:prometheus Prometheus related issues label Sep 2, 2021
@gouthamve
Copy link
Member

@dashpole Another issue to close.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:prometheus Prometheus related issues
Projects
None yet
Development

No branches or pull requests

7 participants