]> git.ipfire.org Git - thirdparty/pdns.git/commit
Adjust Content-Type header for Prometheus endpoint to include version 15072/head
authorWouter de Vries <wouter@cloudflare.com>
Tue, 21 Jan 2025 14:18:57 +0000 (15:18 +0100)
committerWouter de Vries <wouter@cloudflare.com>
Tue, 21 Jan 2025 14:25:37 +0000 (15:25 +0100)
commitf572f31ecd8d76793f1f5864ab740f6f7f7e2b84
tree1dfa2f3376fc03d6b930e6139d50268794f25acf
parent3d4ddfb4cdb77e5d821a0df102eb3ea0d0e7fb26
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/
pdns/dnsdistdist/dnsdist-web.cc
pdns/recursordist/docs/http-api/prometheus.rst
pdns/recursordist/ws-recursor.cc
pdns/ws-auth.cc