Skip to content

OM2: Discontinue OM Proto; specify PrometheusProto#2836

Open
bwplotka wants to merge 4 commits intomainfrom
bwplotka/om-proto
Open

OM2: Discontinue OM Proto; specify PrometheusProto#2836
bwplotka wants to merge 4 commits intomainfrom
bwplotka/om-proto

Conversation

@bwplotka
Copy link
Member

@bwplotka bwplotka commented Feb 10, 2026

Fixes prometheus/OpenMetrics#296

This proposes:

  • Discontinuation of OpenMetrics proto in OM2
  • Official maintenance (as it's true now) of previously deprecated Prometheus Proto

Proposed this to be a discussion on DevSummit https://docs.google.com/document/d/1uurQCi5iVufhYHGlBZ8mJMK_freDFKPG0iYBQqJ9fvA/edit?tab=t.0#bookmark=id.8x3p3zrx8mfu

@bwplotka bwplotka force-pushed the bwplotka/om-proto branch 4 times, most recently from 94f1cc9 to 40185d0 Compare February 10, 2026 10:36
@jan--f jan--f added the kind/enhancement Improvements to existing documentation label Feb 10, 2026
Copy link
Member

@krajorama krajorama left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, let's see dev summit response

@bwplotka bwplotka changed the title OM2: Deprecate OM Proto; remove deprecation mention of PrometheusProto OM2: Discontinue OM Proto; specify PrometheusProto Feb 19, 2026
bwplotka and others added 3 commits February 24, 2026 13:16
Co-authored-by: George Krajcsovits <krajorama@users.noreply.github.com>
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
Signed-off-by: bwplotka <bwplotka@gmail.com>

### Basic info

| Aspect | Description |
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Signed-off-by: bwplotka <bwplotka@gmail.com>
@bwplotka
Copy link
Member Author

This direction was approved on dev-summit

@bwplotka bwplotka requested a review from krajorama February 27, 2026 07:09
@vesari
Copy link

vesari commented Feb 27, 2026

LGTM for the protobuf part you asked me to have a look at.

Prometheus officially supports [protobuf exposition format](https://developers.google.com/protocol-buffers/) in addition to
the text representation.

The payload MUST be encoded as a set of Protobuf messages representing MetricFamily. Messages MUST be encoded in binary and
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we use normative language anywhere else in this doc page. Lets stick with "must" instead of MUST unless we want to turn the whole thing into a specification.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can even remove the word altogether. "The payload is encoded..." is clear enough already 🤔

| **Optional HTTP `Content-Encoding`** | `gzip` |
| **Advantages** | <ul><li>Cross-Platform</li><li>Size</li><li>Forward/Backward Compatibility</li><li>Strict Schema</li><li>Supports Concatenation and Streaming</li></ul> |
| **Limitations** | <ul><li>Not human readable</li></ul> |
| **Supported metric primitives** | <ul><li>Counter</li><li>Gauge</li><li>Histogram</li><li>Summary</li><li>Untyped</li></ul> |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if we want to list somewhere that it supports exemplars and native histograms?

### Versioning

Earlier versions of Prometheus supported an exposition format based on [Protocol Buffers](https://developers.google.com/protocol-buffers/) (aka Protobuf) in addition to the current text-based format. With Prometheus 2.0, the Protobuf format was marked as deprecated and Prometheus stopped ingesting samples from said exposition format.
At the moment Prometheus protobuf is stable, but explicitly unversioned to lean towards the backward and forward compatibility factor.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does "lean towards the backward and forward compatibility factor" mean?

Prometheus officially supports [protobuf exposition format](https://developers.google.com/protocol-buffers/) in addition to
the text representation.

The payload MUST be encoded as a set of Protobuf messages representing MetricFamily. Messages MUST be encoded in binary and
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can even remove the word altogether. "The payload is encoded..." is clear enough already 🤔

prepended with their variadic unsigned-integer encoded size, which serves as a delimitation. The varint encoded size delimited
encoding offers streaming capabilities, especially important for large scrape targets.

The payload MUST have `application/vnd.google.protobuf;proto=io.prometheus.client.MetricFamily;encoding=delimited` as their content type.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is already documented in the content negotiation page, right? do we mention that here again?

All string fields MUST be UTF-8 encoded.

Prometheus 3.0 [prefers the text-based protocols by default](./content_negotiation.md#default-accept-header) unless:
* Manual preference settings in via `scrape_protocols` setting in Prometheus configuration.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Manual preference settings in via `scrape_protocols` setting in Prometheus configuration.
* Manual preference settings via `scrape_protocols` setting in Prometheus configuration.

<!---
# EDITOR’S NOTE: `application/openmetrics-text` is in active use since 2018, `application/openmetrics-proto` is not yet in active use.
-->
OpenMetrics would like to register the MIME type, `application/openmetrics-text`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
OpenMetrics would like to register the MIME type, `application/openmetrics-text`
OpenMetrics would like to register the MIME type `application/openmetrics-text`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/enhancement Improvements to existing documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OM 2.0: OM protobuf future

6 participants