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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user