kepler icon indicating copy to clipboard operation
kepler copied to clipboard

Content-Type header for Prometheus 3.0.0

Open jcpunk opened this issue 1 year ago • 0 comments

What would you like to be added?

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.

Why is this needed?

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.

jcpunk avatar Dec 05 '24 15:12 jcpunk