prometheus/prometheus

[RW2]: Prometheus client_golang remote API adoption

Open

#17.192 geöffnet am 15. Sept. 2025

Auf GitHub ansehen
 (8 Kommentare) (1 Reaktion) (0 zugewiesene Personen)Go (10.408 Forks)batch import
help wantedkind/feature

Repository-Metriken

Stars
 (64.042 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 11T 5h) (118 gemergte PRs in 30 T)

Beschreibung

Proposal

Adopt the https://github.com/prometheus/client_golang/tree/main/exp/api/remote from client_golang to replace the current custom remote write handler implementation in Prometheus.

Context

This proposal is part of the broader https://github.com/prometheus/prometheus/issues/16944 outlined in PROM-35. The current Prometheus implementation in storage/remote maintains its own custom protocol handling logic for both v1 and v2 remote write protocols. Meanwhile, the Prometheus team has built an official remote write client in client_golang that does the same thing but is designed to be shared across the ecosystem.

Benefits

Using the official client means we can share the same remote write implementation with other projects like Mimir, Thanos, and Cortex. It also means protocol updates happen in one place instead of being scattered across different codebases.

Potential Concerns

The main concern is that the exp/api/remote package is marked "experimental." However, this refers to the API potentially changing, not the protocol stability. The Remote Write protocol itself is stable - the experimental label just gives flexibility to refine the API before it's locked in (with Prometheus as the core user).

We'd also want to coordinate this with other PRW2.0 work to avoid conflicts.

Contributor Guide