prometheus/scrape
Łukasz Mierzwa 870627fbed Add enable_compression scrape config option
Currently Prometheus will always request gzip compression from the target when sending scrape requests.
HTTP compression does reduce the amount of bytes sent over the wire and so is often desirable.
The downside of compression is that it requires extra resources - cpu & memory.

This also affects the resource usage on the target since it has to compress the response
before sending it to Prometheus.

This change adds a new option to the scrape job configuration block: enable_compression.
The default is true so it remains the same as current Prometheus behaviour.

Setting this option to false allows users to disable compression between Prometheus
and the scraped target, which will require more bandwidth but it lowers the resource
usage of both Prometheus and the target.

Fixes #12319.

Signed-off-by: Łukasz Mierzwa <l.mierzwa@gmail.com>
2023-11-20 12:02:55 +00:00
..
testdata Re-generate test cert to fix test_windows test failures 2022-03-17 19:37:18 +01:00
clientprotobuf.go Update according to code review 2023-05-05 02:33:00 +08:00
helpers_test.go scrape: Refactor names of float samples 2023-07-13 14:27:51 +02:00
manager.go use Go standard errors package 2023-11-03 07:26:31 +00:00
manager_test.go Scrape metrics can now be registered with a non-default registry. 2023-10-11 16:19:00 +01:00
metrics.go Scrape metrics can now be registered with a non-default registry. 2023-10-11 16:19:00 +01:00
scrape.go Add enable_compression scrape config option 2023-11-20 12:02:55 +00:00
scrape_test.go Add enable_compression scrape config option 2023-11-20 12:02:55 +00:00
target.go use Go standard errors package 2023-11-03 07:26:31 +00:00
target_test.go Fix wording from "jitterSeed" -> "offsetSeed" for server-wide scrape offsets 2023-05-25 11:54:00 +02:00