From d23ddba1ca4835274026caed34a01863cae42bc4 Mon Sep 17 00:00:00 2001 From: vikingowl Date: Sun, 22 Feb 2026 20:26:58 +0100 Subject: [PATCH] fix: skip logging for health and readiness probe endpoints Suppress log output for /healthz and /readyz to reduce noise from Kubernetes liveness/readiness probes hitting every 10 seconds. --- backend/internal/middleware/logging.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/backend/internal/middleware/logging.go b/backend/internal/middleware/logging.go index 41b15ed..107dd2e 100644 --- a/backend/internal/middleware/logging.go +++ b/backend/internal/middleware/logging.go @@ -9,8 +9,15 @@ import ( func Logging() gin.HandlerFunc { return func(c *gin.Context) { - start := time.Now() path := c.Request.URL.Path + + // Skip logging for health/readiness probes to reduce noise. + if path == "/healthz" || path == "/readyz" { + c.Next() + return + } + + start := time.Now() query := c.Request.URL.RawQuery c.Next()