Skip to content

Missing Content-Type header for metrics #2013

@mgcrea

Description

@mgcrea

Description

Not really a bug but the http response of the prometheus endpoint lacks a Content-Type header (should be text/plain). Unfortunately influxdb2 fails to properly scrap the endpoint without that.

Version

sigp/lighthouse:v1.0.2

Present Behaviour

http -h http://172.17.0.1:5054/metrics
HTTP/1.1 200 OK
content-length: 40138
date: Sun, 29 Nov 2020 19:45:14 GMT
server: Lighthouse/v1.0.2-f7183098e/x86_64-linux

Expected Behaviour

http -h http://172.17.0.1:5054/metrics
HTTP/1.1 200 OK
content-length: 40138
content-type: text/plain; charset=utf-8
date: Sun, 29 Nov 2020 19:45:14 GMT
server: Lighthouse/v1.0.2-f7183098e/x86_64-linux

Exemple Geth output:

http -h http://172.17.0.1:6060/debug/metrics/prometheus
HTTP/1.1 200 OK
Content-Length: 46840
Content-Type: text/plain
Date: Sun, 29 Nov 2020 19:44:46 GMT

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions