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.
This commit is contained in:
2026-02-22 20:26:58 +01:00
parent cb2e8c4cde
commit d23ddba1ca

View File

@@ -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()