feat: change content type

  • Please check this box if this contribution uses AI-generated content (including content generated by GitLab Duo features) as outlined in the GitLab DCO & CLA. As a benefit of being a GitLab Community Contributor, you receive complimentary access to GitLab Duo.

  • fix incorrect content type to resolve prometheus content type validation, see example of error below:

time=2024-12-18T12:54:28.758Z level=ERROR source=scrape.go:1585 msg="Failed to determine correct type of scrape target." component="scrape manager" scrape_pool=serviceMonitor/gitlab/gitlab-gitlab-exporter/0 target=http://100.64.179.162:9168/metrics content_type="text/plain; version=0.0.4, charset=utf-8" fallback_media_type="" err="cannot parse Content-Type \"text/plain; version=0.0.4, charset=utf-8\" and no fallback_scrape_protocol for target\nmime: invalid media parameter"

See source code for prometheus and source code for media type parcer lib

Prometheus image version is quay.io/prometheus/prometheus:v3.0.1

Edited by ngnix

Merge request reports

Loading