10000 docs(migration): clarify on content-type headers by LukoJy3D · Pull Request #16155 · prometheus/prometheus · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

docs(migration): clarify on content-type headers #16155

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

LukoJy3D
Copy link
@LukoJy3D LukoJy3D commented Mar 3, 2025

Previously, when creating a custom metric endpoint, we did not bother with setting the header, just making sure that the metric format met the standard. From the migration guide, it was unclear what format the content-type header is accepted in, and it is only visible in the source code. It would have helped me if I had found it sooner.

Signed-off-by: Lukas Juozas Janušaitis <lukas.janusaitis@hostinger.com>
@LukoJy3D LukoJy3D force-pushed the docs/migration/clarify_on_content_type_headers branch from c9de656 to 870b470 Compare March 3, 2025 14:52
@machine424
Copy link
Member

Thanks for this.
I think that instead of just listing the accepted protocols, which might lead users to choose the wrong one, it would be better to ensure that https://prometheus.io/docs/instrumenting/exposition_formats/ is as explicit and informative about the other formats as it is for the Text-based one. We can then simply link to that page in the migration guide.

There is #15830 to track that change, if you're interested.

(By the way, specifying the media type is sufficient, the version and other parameters are not required)

@github-actions github-actions bot added the stale label May 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0