In our setup, metrics are being pulled from PrometheusScrapeHandler by an agent process running on the same machine. In this case, response compression is meaningless (because there is no bottleneck in network throughput) and even harmful, because according to our profiling, compression takes about 60% of response generation time (or 10—20 seconds in absolute values). We've tried a patched version of the handler with compression removed and it really improved overall performance of the metrics pipeline.
Currently, PrometheusScrapeHandler automatically enables compression if an incoming request contains corresponding Accept-Encoding value. We'd like to be able to disable compression via configuration of PrometheusScrapeHandler