Skip to content

Content-Type header for Prometheus 3.0.0 #980

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
jcpunk opened this issue Dec 5, 2024 · 1 comment
Open

Content-Type header for Prometheus 3.0.0 #980

jcpunk opened this issue Dec 5, 2024 · 1 comment

Comments

@jcpunk
Copy link

jcpunk commented Dec 5, 2024

Is your feature request related to a problem? Please describe.

Prometheus 3.0.0 has the option (by default) to be far more strict about what content it scrapes. This can cause unexpected scrape failures for the prometheus exporter.

Describe the solution you'd like

Set the header "to the correct value".

Describe alternatives you've considered

If a scrape target is not providing the correct Content-Type header the fallback protocol can be specified using the fallback_scrape_protocol parameter.

Additional context

From : https://prometheus.io/docs/prometheus/3.0/migration/

Prometheus v3 is more strict concerning the Content-Type header received when scraping. Prometheus v2 would default to the standard Prometheus text protocol if the target being scraped did not specify a Content-Type header or if the header was unparsable or unrecognised. This could lead to incorrect data being parsed in the scrape. Prometheus v3 will now fail the scrape in such cases.

Copy link

This issue has been marked as stale because it has been open for 120 days without activity. Please remove the stale label or add a comment; otherwise, it will be closed in 7 days.

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

No branches or pull requests

1 participant