From 4fc619b605a24c72b8b3423e62a660e54d2513e8 Mon Sep 17 00:00:00 2001 From: Matt Bostock Date: Sat, 17 Sep 2016 10:28:03 +0100 Subject: [PATCH] Scrape: Remove JSON from Accept request header JSON is no longer supported as an exposition format [1] [2] [3]. Remove it from the `Accept` header added to requests when scraping targets. [1]: https://github.com/prometheus/prometheus/blob/master/CHANGELOG.md#100--2016-07-18 [2]: https://prometheus.io/docs/instrumenting/exposition_formats/#historical-versions [3]: https://docs.google.com/document/d/1ZjyKiKxZV83VI9ZKAXRGKaUKK2BIWCT7oiGBKDBpjEY/edit?usp=sharing --- retrieval/scrape.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/retrieval/scrape.go b/retrieval/scrape.go index cd91b1ba0..d45c1fe8c 100644 --- a/retrieval/scrape.go +++ b/retrieval/scrape.go @@ -308,7 +308,7 @@ type targetScraper struct { client *http.Client } -const acceptHeader = `application/vnd.google.protobuf;proto=io.prometheus.client.MetricFamily;encoding=delimited;q=0.7,text/plain;version=0.0.4;q=0.3,application/json;schema="prometheus/telemetry";version=0.0.2;q=0.2,*/*;q=0.1` +const acceptHeader = `application/vnd.google.protobuf;proto=io.prometheus.client.MetricFamily;encoding=delimited;q=0.7,text/plain;version=0.0.4;q=0.3,*/*;q=0.1` func (s *targetScraper) scrape(ctx context.Context, ts time.Time) (model.Samples, error) { req, err := http.NewRequest("GET", s.URL().String(), nil)