prometheus/prompb
Bartlomiej Plotka 6d53e9f5cc
Some checks are pending
buf.build / lint and publish (push) Waiting to run
CI / Go tests (push) Waiting to run
CI / More Go tests (push) Waiting to run
CI / Go tests for 32-bit x86 (push) Waiting to run
CI / List active LTS releases (push) Waiting to run
CI / Go tests for Prometheus upgrades and downgrades (push) Blocked by required conditions
CI / Go tests with previous Go version (push) Waiting to run
CI / UI tests (push) Waiting to run
CI / Go tests on Windows (push) Waiting to run
CI / Mixins tests (push) Waiting to run
CI / Compliance testing (push) Waiting to run
CI / Build Prometheus for common architectures (push) Blocked by required conditions
CI / Build Prometheus for all architectures (push) Blocked by required conditions
CI / Report status of build Prometheus for all architectures (push) Blocked by required conditions
CI / Check generated parser (push) Waiting to run
CI / golangci-lint (push) Waiting to run
CI / fuzzing (push) Waiting to run
CI / codeql (push) Waiting to run
CI / Publish main branch artifacts (push) Blocked by required conditions
CI / Publish release artefacts (push) Blocked by required conditions
CI / Publish UI on npm Registry (push) Blocked by required conditions
govulncheck / Run govulncheck (push) Waiting to run
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
Merge pull request #19090 from roidelapluie/roidelapluie/prompb-chunk-encodings
prompb: add XOR2 and start-time histogram chunk encodings
2026-07-07 17:40:56 +01:00
..
io/prometheus Add plumbing for ST histograms in RW 2026-06-10 08:13:09 -07:00
rwcommon Add plumbing for ST histograms in RW 2026-06-10 08:13:09 -07:00
buf.gen.yaml feat(proto): add buf configuration and update dependencies for code generation (#16239) 2025-03-19 22:19:08 +01:00
buf.lock feat(proto): add buf configuration and update dependencies for code generation (#16239) 2025-03-19 22:19:08 +01:00
buf.yaml prompb: add lint ignores for metrics.proto 2022-06-14 13:47:09 +02:00
codec.go fix(remote_read): NHCB not returned over remote read samples (#17794) 2026-01-07 08:44:57 +01:00
custom.go Remove copyright date from headers (#17785) 2026-01-05 13:46:21 +01:00
README.md Improve prompb/readme.md (#17037) 2025-10-06 12:55:08 +01:00
remote.pb.go prompb: Add histograms to remote write/read protobufs 2022-06-29 18:01:12 +02:00
remote.proto prompb: Add histograms to remote write/read protobufs 2022-06-29 18:01:12 +02:00
types.pb.go prompb: add XOR2 and start-time histogram chunk encodings 2026-07-03 14:13:17 +02:00
types.proto prompb: add XOR2 and start-time histogram chunk encodings 2026-07-03 14:13:17 +02:00

This directory contains Protocol Buffer (protobuf) definitions for Prometheus' remote read and write protocols. These definitions are used to serialize and deserialize time series data, such as metrics, labels, samples, and queries, for network communication to Prometheus.

The files here are synced to buf.build, a public protobuf schema registry, from the main branch of the Prometheus repository.

What This Package/Directory Hosts

Protobuf messages and services for:

  • Remote Write: Sending time series data to Prometheus (e.g., WriteRequest, TimeSeries).
  • Remote Read: Querying data from Prometheus (e.g., ReadRequest, Query, ChunkedReadResponse).
  • Core types: Shared definitions like Label, MetricMetadata, and exemplars.

Key files include:

  • remote.proto: Defines the remote read/write services and messages.
  • types.proto: Common types used across protocols.
  • io/prometheus/client/metrics.proto: Client metrics definitions.
  • io/prometheus/write/v2/types.proto: Remote Write v2 protocol types.

Stability Guarantees

These protobuf definitions follow the stability policies of the Prometheus project. Backward-compatible changes may occur in minor releases, but breaking changes are reserved for major versions (e.g., Prometheus 3.0). Experimental or unstable features are clearly marked in the documentation.

How to Change or Contribute

To modify these definitions, view and edit the source in the Prometheus GitHub repository: https://github.com/prometheus/prometheus/tree/main/prompb.

How to Use

Steps

  • Run make proto in the root directory to regenerate the compiled protobuf code.
  • The compiled Go code is version-controlled in the repository, so you typically don't need to re-generate unless making changes.