Prometheus Remote Write 2.0: what changes for your metrics

Prometheus Remote Write 2.0: symbol table, metadata, native histograms, retries and experimental status. When to switch it on in production.
Remote write Prometheus 2.0 : ce qui change pour les métriques

Your Prometheus ships its metrics to remote storage, and the sender’s CPU or the network bill climbs with every new series. Should you change the protocol? Prometheus Remote Write 2.0 promises more compact requests and a transport that finally carries everything: metadata, native histograms and a start timestamp. Yet its specification still says “experimental”. Here is how to decide.

The facts come from the official specification (version 2.0-rc.6, dated October 2026, read on 14 November 2026), the documented Prometheus configuration file and the .proto file in the repository. I did not run an end-to-end test against a real receiver, and I flag that gap where it matters.

This piece takes the operator’s side. To pick the storage itself, read about Grafana Mimir or VictoriaMetrics. Here we deal with the pipe between Prometheus and them.

Prometheus Remote Write 2.0: the problem it fixes

With version 1.0, every series repeats its labels in full in each request. Metadata (type, help, unit) travels separately, under its own configuration. Native histograms and the creation timestamp have no natural slot in the message.

Version 2.0 changes the message. A de-duplicated string array, symbols, holds all the text. Each series then carries only numeric references into that array. The work is done once per request, not once per series.

Output of a Python script that builds the symbol table and the label references of an http_requests_total series

This example shows the principle: eight references for four labels, with the first string of the array left empty. The specification requires it: the first symbols entry is an empty string.

What the new message contains

The message is called io.prometheus.write.v2.Request. The .proto file in the Prometheus repository gives its exact shape.

Excerpt of Prometheus types.proto: the Request, Sample and Metadata messages of Remote Write version 2
Source : github.com
  • Request: symbols (field 4) and timeseries (field 5). Fields 1 to 3 are reserved, so a receiver that picks the wrong schema gets an empty message rather than a misread one.
  • Sample: value, timestamp in milliseconds and start_timestamp. The specification notes that the latter used to be called “created timestamp”.
  • Metadata: a type, plus references for help and unit.
  • Histogram: the native schema with its bucket spans. For the background, see native histograms.

A series holds either samples or histograms, never both. Labels must be sorted, with no empty name or value.

The operating decision: switch or wait

Status matters. The specification page says “Experimental” and calls itself a release candidate: no major change expected, but compatibility can still break on early feedback. So I suggest a simple rule.

  1. If your receiver announces support for the 2.0 format, try it on a staging instance.
  2. If it does not, change nothing. The Prometheus documentation itself tells you to check with your storage provider, or to test, before changing the value.
  3. Keep version 1.0 in production until the receiver passes your checks.

The advertised gains (efficiency, metadata, native histograms) are those of the documentation. I measured no bandwidth saving: do not rely on a figure before you measure your own.

Enabling Remote Write 2.0 in Prometheus

One field flips the message. By default Prometheus keeps the old one, prometheus.WriteRequest.

A prometheus.yml file with a remote_write block using protobuf_message io.prometheus.write.v2.Request
  1. Add a second remote_write block towards a test receiver, with a unique name: it labels the metrics and logs.
  2. Set protobuf_message to io.prometheus.write.v2.Request.
  3. Turn on send_native_histograms only if the receiver accepts them. It is false by default.
  4. Reload the configuration and watch the queue metrics.

The (experimental) mode field offers none, stateless and stateless-st. The last two require extra start-up options and drop some data, including all exemplars. Keep none for a first trial.

How to check that it works

The specification gives a precise check. The receiver must answer with three headers: X-Prometheus-Remote-Write-Samples-Written, X-Prometheus-Remote-Write-Histograms-Written and X-Prometheus-Remote-Write-Exemplars-Written, each a 64-bit integer. Compare those counters with the volume you sent.

Mind one trap: after a 2xx without these headers, the sender must not conclude that all is well. A 1.0 receiver that wrongly accepts the message looks like a success. The specification says to treat that case as a 415 (unsupported media type).

Headers required on the way out: Content-Encoding (snappy, block format), Content-Type, X-Prometheus-Remote-Write-Version (value 2.0.0) and User-Agent.

Retries and outages: the behaviour to know

For on-call duty, the retry rules matter more than the format.

  • 5xx: the sender must retry, using a backoff algorithm.
  • 429: it may retry, with backoff, and may read Retry-After. In Prometheus, retry_on_http_429 is false by default and still experimental.
  • Other 4xx: never retry.
  • 415: the sender may try again with another content type, which allows the fall-back to version 1.0.

A partial write must return a non-2xx code. If the receiver asks for a full resend, it must handle idempotency. Samples of one series go out in timestamp order; different series may go in parallel.

Keep an eye on cardinality too, as a more efficient protocol does not erase the cost of series: see when series explode.

Best practices

  • Test side by side, with a second remote_write block, before replacing the old one.
  • Check support in your receiver, version by version.
  • Verify the three “Written” counters after every change.
  • Do not mix the experimental modes into a first trial.
  • Re-read the specification page at each upgrade: the status may change.

Frequently asked questions

Is Remote Write 2.0 ready for production?

The specification is marked experimental (a release candidate). Use it in staging first, with version 1.0 running in parallel.

Do I have to change my storage to adopt 2.0?

Only if it does not recognise the new message. If the receiver answers 415 or 400, keep the 1.0 sender you retained.

What about Dynatrace?

This article covers Prometheus only. I did not verify what Dynatrace SaaS or Managed accepts as remote write: check docs.dynatrace.com before pointing a sender at it.

Conclusion

Prometheus Remote Write 2.0 brings a more compact and complete message, but its experimental status calls for caution: a side-by-side trial, counter checks and a planned fall-back. Sources: the Remote-Write 2.0 specification and the prometheus/prometheus repository. To place Prometheus next to OpenTelemetry, read OpenTelemetry and Prometheus.

span.observer is an independent blog, not affiliated with Dynatrace LLC or the Prometheus project. Brands mentioned belong to their owners. Tools change fast: check commands and options in the official documentation.

Total
0
Shares
Leave a Reply

Your email address will not be published. Required fields are marked *

Previous Post
Paquets Python vulnérables : les surveiller en exécution avec Dynatrace

Vulnerable Python packages: monitoring them at runtime with Dynatrace

Next Post
NGINX OpenTelemetry : exporter les traces avec ngx_otel_module

NGINX OpenTelemetry tracing with ngx_otel_module, step by step

Related Posts