Skip to content

Content-Type for 'health/prometheus' metrics #34

@dmitriikazanin

Description

@dmitriikazanin

The problem is that since Prometheus 3.0 it's necessary to set Content-Type for responses with metrics. Otherwise, the following bug can occur:

content_type="text/html; charset=utf-8" fallback_media_type="" err="received unsupported Content-Type \"text/html; charset=utf-8\" and no fallback_scrape_protocol specified for target"

At least it should be done for health/prometheus endpoint

mimetype="text/plain; version=0.0.4"

Updated release should be set for every dependent component.
Optional: it makes sense to set for all impacted service monitors 'fallbackScrapeProtocol: PrometheusText0.0.4' in order to avoid the mentioned bug in the future.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions