Skip to content

Commit 44ee737

Browse files
committed
Addressed Piotr's comments.
Signed-off-by: bwplotka <[email protected]>
1 parent 8139da7 commit 44ee737

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

content/docs/specs/remote_write_spec_2_0.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,15 +149,15 @@ Each header value MUST be a single 64-bit integer. The header names MUST be as f
149149
* `X-Prometheus-Remote-Write-Written-Histograms <integer; count of all successfully Histogram samples from this request>`
150150
* `X-Prometheus-Remote-Write-Written-Exemplars <integer; count of all successfully Exemplars from this request>`
151151

152+
Upon receiving a 2xx or a 4xx status code, Senders CAN assume that any missing `X-Prometheus-Remote-Write-Written-*` response header means no element from this category (e.g. Sample) was written by the Receiver (count of `0`). Senders MUST NOT assume the same when using the deprecated `prometheus.WriteRequest` Protobuf Message due to the risk of hitting 1.0 Receiver without this feature.
153+
152154
Senders MAY use those headers to confirm which parts of data were successfully written by the Receiver. Common use cases:
153155

154156
* [Partial Write](#partial-write) failure situations: Senders MAY use those headers for more accurate client instrumentation and error handling.
155157
* Broken 1.0 Receiver implementations: Senders SHOULD assume [415 HTTP Unsupported Media Type](https://www.rfc-editor.org/rfc/rfc9110.html#name-415-unsupported-media-type) status code when sending the data using `io.prometheus.write.v2.Request` request and receiving 2xx HTTP status code, but none of the `X-Prometheus-Remote-Write-Written-*` response headers from the Receiver. This is a common issue for the 1.0 Receivers that do not check the `Content-Type` request header; accidental decoding of the `io.prometheus.write.v2.Request` payload with `prometheus.WriteRequest` schema results in empty result and no decoding errors.
156158
* Unknown broken implementations or issues: Senders MAY use those headers to detect broken Sender and Receiver implementations or other problems.
157159

158-
On the 2xx HTTP status code, Senders CAN assume that a missing write response header means that no such a piece of data was written by the Receiver (count of `0`). value. One exception is that Senders MUST NOT assume the same (empty header means zero) when using the deprecated `prometheus.WriteRequest` Protobuf Message in the request.
159-
160-
Senders MUST NOT assume what Remote Write specification version the Receiver implements the remote write response headers.
160+
Senders MUST NOT assume what Remote Write specification version the Receiver implements from the remote write response headers.
161161

162162
More (optional) headers might come in the future, e.g. when more entities or fields are added and worth confirming.
163163

0 commit comments

Comments
 (0)