prometheus: enable gzip for /metrics endpoint

closes #9464
pull/9619/head
bergquist 8 years ago
parent 1fd2270a93
commit 139f077453
  1. 5
      pkg/api/http_server.go
  2. 4
      pkg/middleware/util.go

@ -188,9 +188,8 @@ func (hs *HttpServer) metricsEndpoint(ctx *macaron.Context) {
return
}
promhttp.HandlerFor(prometheus.DefaultGatherer, promhttp.HandlerOpts{
DisableCompression: true,
}).ServeHTTP(ctx.Resp, ctx.Req.Request)
promhttp.HandlerFor(prometheus.DefaultGatherer, promhttp.HandlerOpts{}).
ServeHTTP(ctx.Resp, ctx.Req.Request)
}
func (hs *HttpServer) healthHandler(ctx *macaron.Context) {

@ -21,6 +21,10 @@ func Gziper() macaron.Handler {
return
}
if strings.HasPrefix(requestPath, "/metrics") {
return
}
ctx.Invoke(macaronGziper)
}
}

Loading…
Cancel
Save