From 0e2dc02ebcbd546c6c094c41b98753c8f77d883a Mon Sep 17 00:00:00 2001 From: Bartlomiej Plotka Date: Mon, 8 Jul 2024 08:39:59 +0100 Subject: [PATCH] Apply Callum's suggestions Co-authored-by: Callum Styan Signed-off-by: Bartlomiej Plotka --- content/docs/specs/remote_write_spec_2_0.md | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/content/docs/specs/remote_write_spec_2_0.md b/content/docs/specs/remote_write_spec_2_0.md index 1c907893..e5e5e567 100644 --- a/content/docs/specs/remote_write_spec_2_0.md +++ b/content/docs/specs/remote_write_spec_2_0.md @@ -141,17 +141,15 @@ The following subsections specify Sender and Receiver semantics around headers a -For all HTTP status codes, Receivers MUST send back the HTTP response `X-Prometheus-Remote-Write-Received-` type of the header indicating write statistics, i.e. how many Samples, Histograms and Exemplars were successfully received by the Receiver. Receivers MAY omit each header, if its value is zero. +For all HTTP status codes, Receivers MUST send back the HTTP response `X-Prometheus-Remote-Write-Accepted-` type of the header indicating write statistics, i.e. how many Samples, Histograms and Exemplars were successfully accepted/ingested by the Receiver. Receivers MAY omit each header, if its value is zero. Receivers MUST send those response headers, even if they use asynchronous or eventual write mechanisms e.g. when Receivers can't confirm that downstream storage actually written them in durable way. The headers are only to confirm how many Samples, Histograms and Exemplars were accepted by the Receiver, especially useful on [Partial Write](#partial-write) situations. Each header value MUST be a single 64 bytes integer. The header names MUST be as follows: -``` -X-Prometheus-Remote-Write-Received-Samples -X-Prometheus-Remote-Write-Received-Histograms -X-Prometheus-Remote-Write-Received-Exemplars -``` +X-Prometheus-Remote-Write-Accepted-Samples +X-Prometheus-Remote-Write-Accepted-Histograms +X-Prometheus-Remote-Write-Accepted-Exemplars Senders MAY use those headers for client instrumentation and for communication durability checks, e.g. to verify no miscommunication or implementation bug exist between the Sender and Receiver. Specifically, this guards against broken Sender or Receiver implementations with buggy or missing content-type checks, accidental decoding of `io.prometheus.write.v2.Request` payload with `prometheus.WriteRequest` schema (which would result in successful decoding with always empty request) and more.