From faf4d7e3bbaabd4bf54bb29582755e44a5092b27 Mon Sep 17 00:00:00 2001 From: noel <37166916+ahmczsy@users.noreply.github.com> Date: Sat, 8 May 2021 17:11:16 +0800 Subject: [PATCH] modify the order of PrometheusHandler (#670) * modify the order of PrometheusHandler * modify the order of PrometheusHandler --- rest/engine.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rest/engine.go b/rest/engine.go index e0a5a085..40ee5c1b 100644 --- a/rest/engine.go +++ b/rest/engine.go @@ -109,13 +109,13 @@ func (s *engine) bindRoute(fr featuredRoutes, router httpx.Router, metrics *stat chain := alice.New( handler.TracingHandler, s.getLogHandler(), + handler.PrometheusHandler(route.Path), handler.MaxConns(s.conf.MaxConns), handler.BreakerHandler(route.Method, route.Path, metrics), handler.SheddingHandler(s.getShedder(fr.priority), metrics), handler.TimeoutHandler(time.Duration(s.conf.Timeout)*time.Millisecond), handler.RecoverHandler, handler.MetricHandler(metrics), - handler.PrometheusHandler(route.Path), handler.MaxBytesHandler(s.conf.MaxBytes), handler.GunzipHandler, )