OM2: Discontinue OM Proto; specify PrometheusProto#2836
OM2: Discontinue OM Proto; specify PrometheusProto#2836
Conversation
94f1cc9 to
40185d0
Compare
krajorama
left a comment
There was a problem hiding this comment.
LGTM, let's see dev summit response
Signed-off-by: bwplotka <bwplotka@gmail.com>
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>
1c3163d to
a19a068
Compare
|
|
||
| ### Basic info | ||
|
|
||
| | Aspect | Description | |
There was a problem hiding this comment.
FYI: Taken from historical, yet still up-to-date Matt P. document https://docs.google.com/document/d/1ZjyKiKxZV83VI9ZKAXRGKaUKK2BIWCT7oiGBKDBpjEY/edit?tab=t.0#heading=h.enginc5vuf3z
Signed-off-by: bwplotka <bwplotka@gmail.com>
22e3764 to
d7fbfc6
Compare
|
This direction was approved on dev-summit |
|
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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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> | |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
| * 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` |
There was a problem hiding this comment.
| OpenMetrics would like to register the MIME type, `application/openmetrics-text` | |
| OpenMetrics would like to register the MIME type `application/openmetrics-text` |
Fixes prometheus/OpenMetrics#296
This proposes:
Proposed this to be a discussion on DevSummit https://docs.google.com/document/d/1uurQCi5iVufhYHGlBZ8mJMK_freDFKPG0iYBQqJ9fvA/edit?tab=t.0#bookmark=id.8x3p3zrx8mfu