open-telemetry / opentelemetry-collector-contrib

Contrib repository for the OpenTelemetry Collector
https://opentelemetry.io
Apache License 2.0
2.71k stars 2.14k forks source link

New component: Prometheus Remote Write receiver #33782

Open tomatopunk opened 2 days ago

tomatopunk commented 2 days ago

The purpose and use-cases of the new component

The new component, Prometheus remote write receive, is designed to enable OpenTelemetry collectors to receive metrics data from Prometheus instances via the remote write protocol. This allows for seamless integration of Prometheus metrics into the OpenTelemetry ecosystem, enabling centralized metrics collection, processing, and exporting to various backends.

Example configuration for the component

receivers:
  prometheusremotewrite:
    endpoint: "0.0.0.0:12345"  # The address to listen on for Prometheus remote write 

Telemetry data types supported

metric

Is this a vendor-specific component?

Code Owner(s)

@tomatopunk

Sponsor (optional)

@andrzej-stencel

Additional context

The tracking issue #10358, #14751 was closed because this component did not have a sponsor.

dashpole commented 2 days ago

See https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/14751#issuecomment-1348879991. The lack of transactionality in PRW 1.0 makes it difficult to implement a working receiver for PRW. IMO, we should wait to introduce this until PRW 2.0, which was just released as experimental: https://prometheus.io/docs/specs/remote_write_spec_2_0/. It solves the issues raised in the previous proposal.

ChrsMark commented 2 days ago

Example configuration for the component

receivers:
prometheusremotewrite:
   endpoint: "0.0.0.0:12345"  # The address to listen on for Prometheus remote write 

Should we consider tls+https support as well instead of just plain http?

andrzej-stencel commented 2 days ago

Thanks @dashpole, this is very valuable information.

Let's make sure the new receiver supports the PRW 2.0 spec.