Skip to content

docs(exposition): document Prometheus text format 1.0.0 - #3183

Open
krajorama wants to merge 1 commit into
prometheus:mainfrom
krajorama:krajo/doc-prometheus-text-1.0.0
Open

krajorama wants to merge 1 commit into
prometheus:mainfrom
krajorama:krajo/doc-prometheus-text-1.0.0

Conversation

@krajorama

@krajorama krajorama commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

TL;DR; better late than never (tm). Turns out we never documented the 1.0.0 text format, even though it's been there since 3.0.0 and selectable in negotiated formats. Direct link to preview: https://deploy-preview-3183--prometheus-docs.netlify.app/docs/instrumenting/exposition_formats/

Summary

Prometheus has requested text/plain;version=1.0.0 (the PrometheusText1.0.0 scrape protocol) since 3.0, and prometheus/common now negotiates, encodes and decodes it, but the exposition formats page only described version 0.0.4.

  • Add a Versions section to the Prometheus text format page:
    • 0.0.4: the original version, legacy names only. A missing version is treated as 0.0.4.
    • 1.0.0: the same format with quoted UTF-8 metric and label names, plus the escaping parameter. Links to the escaping schemes and content negotiation pages.
  • Say when targets should respond with 1.0.0, and that they must otherwise escape names with the requested scheme.
  • Note that Prometheus's text parser ignores the version parameter, so it also ingests quoted UTF-8 names sent as 0.0.4. That is not part of the 0.0.4 format and other consumers may reject it.
  • Update the Basic info table: "Supported in", "HTTP Content-Type" and "Supported advanced features" now cover both versions.
  • Replace "a missing version falls back to the most recent text format version" with "is treated as 0.0.4", since "most recent" is now ambiguous and prometheus/common treats a missing version as 0.0.4.

Context

Test plan

  • In-page anchor and cross-file links point to existing headings and files.
  • Rendered page not checked locally (table cells use the same inline HTML pattern as before); please check the preview.

Prometheus has requested `text/plain;version=1.0.0` (the PrometheusText1.0.0
scrape protocol) since 3.0, and prometheus/common now negotiates, encodes and
decodes it, but the exposition formats page only described version 0.0.4.

Add a Versions section describing both versions, and update the Basic info
table. Version 1.0.0 is the same format with quoted UTF-8 metric and label
names plus the `escaping` parameter. Note that Prometheus ignores the version
when parsing, so it also ingests UTF-8 names sent as 0.0.4, which is not part
of that format.

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants