Skip to content
This repository has been archived by the owner on Nov 21, 2024. It is now read-only.

Ensure Prometheus target is added as a label to incoming samples automatically #7

Closed
alolita opened this issue Feb 4, 2021 · 6 comments
Labels
design-required P0 An issue that needs to be addressed immediately. Breaking change. phase1 phase1 tasks prom-receiver Prometheus receiver tasks

Comments

@alolita
Copy link
Member

alolita commented Feb 4, 2021

Ensure Prometheus target is added as a label to incoming samples automatically.

Component: https://github.com/open-telemetry/opentelemetry-collector/tree/main/receiver/prometheusreceiver

A design proposal is needed for this task.

@alolita alolita added phase1 phase1 tasks prom-receiver Prometheus receiver tasks labels Feb 4, 2021
@dashpole
Copy link

dashpole commented Feb 5, 2021

@RichiH
Copy link
Member

RichiH commented Feb 13, 2021

No implying this must be supported, just noting: The other default label in Prometheus is job, which is roughly "what part of service discovery did the target information come from?".

Also see https://prometheus.io/docs/concepts/jobs_instances/

@scheler
Copy link

scheler commented Feb 16, 2021

They labels should be promoted to the "resource attributes" as they identify the resource against which the metrics are associated/reported. I submitted issue open-telemetry/opentelemetry-collector#2499

@rakyll rakyll added the P0 An issue that needs to be addressed immediately. Breaking change. label Apr 13, 2021
tigrannajaryan pushed a commit to open-telemetry/opentelemetry-collector that referenced this issue Apr 16, 2021
…2897)

In Prometheus, `job` and `instance` are the two auto generated labels, however they are both dropped by prometheus receiver. Although these information is still available in `service.name` and `host`:`port`, it breaks the data contract for most Prometheus users (who use `job` and `instance` to consume metrics in their own system).
This PR adds `job` and `instance` as well-known labels in prometheus receiver to fix the issue.

**Link to tracking Issue:** 
#575
#2499
#2363
open-telemetry/prometheus-interoperability-spec#7
@odeke-em
Copy link
Member

@alolita, in the collector, functionality for this was implemented in open-telemetry/opentelemetry-collector#2897, could we please close this issue?

@rakyll
Copy link
Contributor

rakyll commented Apr 20, 2021

Duplicate of #37.

@rakyll
Copy link
Contributor

rakyll commented Apr 20, 2021

After open-telemetry/opentelemetry-collector#2897 is merged, #37 is still failing. Closing this issue because it's a duplicate, let's have the conversation on #37.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
design-required P0 An issue that needs to be addressed immediately. Breaking change. phase1 phase1 tasks prom-receiver Prometheus receiver tasks
Projects
None yet
Development

No branches or pull requests

6 participants