modify the order of PrometheusHandler (#670)

* modify the order of PrometheusHandler

* modify the order of PrometheusHandler
master
noel 4 years ago committed by GitHub
parent f64fe5eb5e
commit faf4d7e3bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -109,13 +109,13 @@ func (s *engine) bindRoute(fr featuredRoutes, router httpx.Router, metrics *stat
chain := alice.New( chain := alice.New(
handler.TracingHandler, handler.TracingHandler,
s.getLogHandler(), s.getLogHandler(),
handler.PrometheusHandler(route.Path),
handler.MaxConns(s.conf.MaxConns), handler.MaxConns(s.conf.MaxConns),
handler.BreakerHandler(route.Method, route.Path, metrics), handler.BreakerHandler(route.Method, route.Path, metrics),
handler.SheddingHandler(s.getShedder(fr.priority), metrics), handler.SheddingHandler(s.getShedder(fr.priority), metrics),
handler.TimeoutHandler(time.Duration(s.conf.Timeout)*time.Millisecond), handler.TimeoutHandler(time.Duration(s.conf.Timeout)*time.Millisecond),
handler.RecoverHandler, handler.RecoverHandler,
handler.MetricHandler(metrics), handler.MetricHandler(metrics),
handler.PrometheusHandler(route.Path),
handler.MaxBytesHandler(s.conf.MaxBytes), handler.MaxBytesHandler(s.conf.MaxBytes),
handler.GunzipHandler, handler.GunzipHandler,
) )

Loading…
Cancel
Save