]> git.ipfire.org Git - thirdparty/pdns.git/commit
Adjust Content-Type header for Prometheus endpoint to include version 15501/head
authorWouter de Vries <wouter@cloudflare.com>
Tue, 21 Jan 2025 14:18:57 +0000 (15:18 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Wed, 30 Apr 2025 10:04:01 +0000 (12:04 +0200)
commit9cee0fa70629345a250de012b50d4520c2cceff5
tree188704069e8b831496e7eafc23fd4fa53ef70e9c
parent18d1656b232e3d9ed907b8df2257285c12a5ef1d
Adjust Content-Type header for Prometheus endpoint to include version

Prometheus v3 will, by default, be more strict about the content-types
returned from scrape endpoints. With the current value (just
`text/plain`), it would fail to scrape.

In this commit the value is changed from `text/plain` to `text/plain;
version=0.0.4`.

See also [1] and [2]
[1] https://prometheus.io/docs/instrumenting/exposition_formats/
[2] https://prometheus.io/docs/prometheus/3.0/migration/

(cherry picked from commit f572f31ecd8d76793f1f5864ab740f6f7f7e2b84)
pdns/dnsdist-web.cc
pdns/recursordist/docs/http-api/prometheus.rst
pdns/recursordist/ws-recursor.cc
pdns/ws-auth.cc