Support partial write on PRW2.0 - #7761
Conversation
Signed-off-by: SungJin1212 <tjdwls1201@gmail.com>
af8e168 to
b3a5222
Compare
Interesting, is this what Prometheus does today? If that's Prometheus' behavior I am ok with it. But it is a behavior change in Cortex regardless. Do you think we can put this behind a FF? |
Yes, Prometheus' v2 receiver has addressed the partial write since v2.54.0.
I'd rather not add another flag here: the v2 path is already opt-in and experimental. Currently, Prometheus can send exemplar-only series (prometheus/prometheus#17857), and Cortex drops the whole request, so partial write is what makes exemplars usable over RW2.0 at all. |
Implements partial write for Prometheus Remote Write 2.0 requests, following the Prometheus receiver behavior.
Previously a single invalid series aborted the whole conversion, so the entire batch was rejected with a
400and theX-Prometheus-Remote-Write-*-Writtenresponse headers were not set at all; now invalid series are skipped and reported together in the response, the valid ones are written, and the written stats headers are always set.This also makes Cortex accept a v2 write request that contains an exemplar-only series.
Which issue(s) this PR fixes:
Fixes #
Checklist
CHANGELOG.mdupdated - the order of entries should be[CHANGE],[FEATURE],[ENHANCEMENT],[BUGFIX]docs/configuration/v1-guarantees.mdupdated if this PR introduces experimental flags