skip trace for '/api/health' endpoint (#103430)

* skip trace for '/api/health' endpoint

* fix formatting

Signed-off-by: Dave Henderson <dave.henderson@grafana.com>

---------

Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
Co-authored-by: Dave Henderson <dave.henderson@grafana.com>
This commit is contained in:
wuweng
2025-04-15 15:47:58 -04:00
committed by GitHub
co-authored by Dave Henderson
parent f421c71373
commit 3320dc116e
+2 -1
View File
@@ -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
}