From 3320dc116e7dec58964814fb3572228226af3c40 Mon Sep 17 00:00:00 2001 From: wuweng Date: Tue, 15 Apr 2025 12:47:58 -0700 Subject: [PATCH] skip trace for '/api/health' endpoint (#103430) * skip trace for '/api/health' endpoint * fix formatting Signed-off-by: Dave Henderson --------- Signed-off-by: Dave Henderson Co-authored-by: Dave Henderson --- pkg/middleware/request_tracing.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/middleware/request_tracing.go b/pkg/middleware/request_tracing.go index 2f492a697f9..3063dbdd51e 100644 --- a/pkg/middleware/request_tracing.go +++ b/pkg/middleware/request_tracing.go @@ -77,7 +77,8 @@ func RequestTracing(tracer tracing.Tracer) web.Middleware { // skip tracing for a few endpoints if strings.HasPrefix(req.URL.Path, "/public/") || req.URL.Path == "/robots.txt" || - req.URL.Path == "/favicon.ico" { + req.URL.Path == "/favicon.ico" || + req.URL.Path == "/api/health" { next.ServeHTTP(w, req) return }