From db8911a1af7abb6bdafbd999adada548fd9c0849 Mon Sep 17 00:00:00 2001 From: Felipe Cardozo Date: Mon, 26 Jun 2023 02:50:48 -0300 Subject: [PATCH] disable echoprometheus compression by default (#97) * disable metrics compression by default --- echoprometheus/prometheus.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/echoprometheus/prometheus.go b/echoprometheus/prometheus.go index 9907e8e..89ae77e 100644 --- a/echoprometheus/prometheus.go +++ b/echoprometheus/prometheus.go @@ -115,7 +115,7 @@ func NewHandlerWithConfig(config HandlerConfig) echo.HandlerFunc { if config.Gatherer == nil { config.Gatherer = prometheus.DefaultGatherer } - h := promhttp.HandlerFor(config.Gatherer, promhttp.HandlerOpts{}) + h := promhttp.HandlerFor(config.Gatherer, promhttp.HandlerOpts{DisableCompression: true}) if r, ok := config.Gatherer.(prometheus.Registerer); ok { h = promhttp.InstrumentMetricHandler(r, h)