From e42ddb03d514e23dc0d0783c1c51d58a17dfb836 Mon Sep 17 00:00:00 2001 From: Andrey Slotin Date: Fri, 2 Aug 2024 12:00:55 +0200 Subject: [PATCH] Inject Pyroscope middleware into the call chain --- pkg/http/http.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/http/http.go b/pkg/http/http.go index 1166645..75579ef 100644 --- a/pkg/http/http.go +++ b/pkg/http/http.go @@ -145,7 +145,7 @@ func (s *Server) WithPrometheus() *Server { // WithProfiling adds a middleware that extracts k6 labels from the baggage and adds them to the context. func (s *Server) WithProfiling() *Server { - s.router.Use(k6.LabelsFromBaggageHandler) + s.router = s.router.With(k6.LabelsFromBaggageHandler) return s }