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

New component: Prometheus Remote Write receiver #33782

Open
3 tasks
tomatopunk opened this issue Jun 26, 2024 · 14 comments
Open
3 tasks

New component: Prometheus Remote Write receiver #33782

tomatopunk opened this issue Jun 26, 2024 · 14 comments
Labels
Accepted Component New component has been sponsored

Comments

@tomatopunk
Copy link

tomatopunk commented Jun 26, 2024

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?

  • This is a vendor-specific component
  • If this is a vendor-specific component, I am a member of the OpenTelemetry organization.
  • If this is a vendor-specific component, I am proposing to contribute and support it as a representative of the vendor.

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.

@tomatopunk tomatopunk added needs triage New item requiring triage Sponsor Needed New component seeking sponsor labels Jun 26, 2024
@andrzej-stencel andrzej-stencel changed the title New component: prometheus_remotewrite_receiver New component: Prometheus Remote Write receiver Jun 26, 2024
@dashpole
Copy link
Contributor

See #14751 (comment). 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
Copy link
Member

ChrsMark commented Jun 26, 2024

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 andrzej-stencel added Accepted Component New component has been sponsored and removed needs triage New item requiring triage Sponsor Needed New component seeking sponsor labels Jun 26, 2024
@andrzej-stencel
Copy link
Member

Thanks @dashpole, this is very valuable information.

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

@vipinvkmenon
Copy link

vipinvkmenon commented Jul 8, 2024

Looking forward to this feature. Id be more than happy to test and provide feedbacks if any once merged

@JustinMason
Copy link

JustinMason commented Jul 22, 2024

#34196

I have a great initial implementation of a remoteWrite receiver, this foundation implemented all the configurations supported by the oltp receiver. So HTTP, gRPC, CORS, TLS and mTLS, and auth settings are all in there.

This mirrored the https://github.com/open-telemetry/opentelemetry-collector/tree/main/receiver/otlpreceiver and its initial implementation is limited to sum and gauge metric mapping, but it is stable. The receiver has been running reliability in a production environment getting remoteWrites from prometheus and Victoria metrics.

@rakesh-p
Copy link

rakesh-p commented Sep 13, 2024

until this remotewrite receiver is ready, is there no other way to send metrics from prometheus to opentelemetry collector please?

we have several k8s clusters and each with its own prometheus running to collect the metrics from the cluster. we would like to send the metrics collected by all prometheus instances (1 in each cluster) to central opentelemetry collector.

So far, the only way i found is that i can add a prometheus receiver to opentelemetry pipeline which can go and scrap metrics directly from targets. Also the opentelemetry collectors run as a cluster behind load balancer. Does it mean, all the prometheus receivers will scrap the metrics from targets and hence will result in duplication?

Thanks

@rakesh-p
Copy link

for anyone using splunk-otel-collector, there is a remote write receiver https://docs.splunk.com/observability/en/gdi/opentelemetry/components/signalfx-gateway-prometheus-remote-write-receiver.html

@JustinMason
Copy link

@rakesh-p Im not sure about the signalfx receiver, it may be worth testing.
Consider building your own collector using the framework and include this module.
OTel Collector Builder

Here is a example of a collector and a initial implementation: https://github.com/JustinMason/otel-collector/tree/main/receiver/prometheusremotewritereceiver

@ArthurSens
Copy link
Contributor

ArthurSens commented Sep 19, 2024

Hi @andrzej-stencel

I'm Arthur, a Prometheus team member and contributor to the otel-prometheus-wg!
I've noticed that this component's bootstrap has become stale, so I'm wondering if you're still interested in sponsoring the work here.

I'd love to work on a prototype that focuses on Prometheus Remote-Write v2 since we already know that v1 has a few limitations for good OTLP compatibility.

@dashpole
Copy link
Contributor

I'm also happy to help with the review of a PRW 2.0 receiver

@dashpole
Copy link
Contributor

I talked with @andrzej-stencel. I'm going to take over of the sponsor of the component to unblock development

@andrzej-stencel
Copy link
Member

Thank you @dashpole!

@tomatopunk
Copy link
Author

Thank you for all. Regarding the sponsor's not to proceed with reviewing and merging the PR, I will no longer be continuing its development.

@ArthurSens
Copy link
Contributor

No worries @tomatopunk! Thanks for quickstarting the conversations here, I'm volunteering to continue your work :)

mx-psi pushed a commit that referenced this issue Oct 1, 2024
**Description:** 

Add skeleton for Prometheus Remote-Write Receiver. With the release of
PrometheusRemoteWritev2, there's commitment from the Prometheus team to
implement and maintain this component :)


prometheus/prometheus#12633 (comment)

**Link to tracking Issue:**
#33782

Signed-off-by: Arthur Silva Sens <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepted Component New component has been sponsored
Projects
None yet
Development

No branches or pull requests

8 participants