From e5809cadff0d89f88c447262cf635c223bf58166 Mon Sep 17 00:00:00 2001 From: Etien Roznik <12816736+eroznik@users.noreply.github.com> Date: Mon, 28 Oct 2024 15:44:50 +0100 Subject: [PATCH] fix: http request metrics(#1611) --- internal/driver/daemon.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/driver/daemon.go b/internal/driver/daemon.go index e0ecf9d3c..7c78e312e 100644 --- a/internal/driver/daemon.go +++ b/internal/driver/daemon.go @@ -348,8 +348,8 @@ func (r *RegistryDefault) ReadRouter(ctx context.Context) http.Handler { } } - n.UseHandler(br) n.Use(r.PrometheusManager()) + n.UseHandler(br) if r.sqaService != nil { n.Use(r.sqaService) @@ -385,8 +385,8 @@ func (r *RegistryDefault) WriteRouter(ctx context.Context) http.Handler { } } - n.UseHandler(pr) n.Use(r.PrometheusManager()) + n.UseHandler(pr) if r.sqaService != nil { n.Use(r.sqaService) @@ -422,8 +422,8 @@ func (r *RegistryDefault) OPLSyntaxRouter(ctx context.Context) http.Handler { } } - n.UseHandler(pr) n.Use(r.PrometheusManager()) + n.UseHandler(pr) if r.sqaService != nil { n.Use(r.sqaService) @@ -554,8 +554,8 @@ func (r *RegistryDefault) metricsRouter(ctx context.Context) http.Handler { r.PrometheusManager().RegisterRouter(router) r.MetricsHandler().SetRoutes(router) - n.UseHandler(router) n.Use(r.PrometheusManager()) + n.UseHandler(router) var handler http.Handler = n options, enabled := r.Config(ctx).CORS("metrics")