Skip to content

[RW2]: Prometheus client_golang remote API adoption #17192

@pipiland2612

Description

@pipiland2612

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 #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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions