Overview
Health and metrics endpoints are hit far more often than real traffic — Kubernetes probes hit /health* on a tight interval, and Prometheus scrapes /metrics on its own schedule. Logging every one of these at the same level as real requests floods the access log, dominates line count during a load test, and pollutes Kibana with noise that has nothing to do with actual traffic behavior.
Description
Files: internal/httpmiddleware/, cmd/esignet/main.go
Actual:
/health* and /metrics requests are logged through the same AccessLog middleware as all other traffic. At probe and scrape frequency, these entries dominate the log volume, making it harder to find and reason about real request logs, especially under load.
Expected:
- Exclude
/health* and /metrics paths from AccessLog.
- Confirm
LOG_LEVEL=info is set in the perf environment values (not debug, which would compound the noise problem).
- Consider adding a
LOG_SAMPLING option to sample access logs at very high TPS, rather than logging every request, once volume becomes a concern beyond just excluding health/metrics.
Acceptance Criteria
/health, /health/live, /health/ready, and /metrics requests no longer appear in the access log output.
- All other request paths continue to be logged as before (no unintended exclusions).
- Perf environment confirmed running with
LOG_LEVEL=info.
LOG_SAMPLING option evaluated and documented as a follow-up (implementation optional for this issue, evaluation not).
Definition of Done
Overview
Health and metrics endpoints are hit far more often than real traffic — Kubernetes probes hit
/health*on a tight interval, and Prometheus scrapes/metricson its own schedule. Logging every one of these at the same level as real requests floods the access log, dominates line count during a load test, and pollutes Kibana with noise that has nothing to do with actual traffic behavior.Description
Files:
internal/httpmiddleware/,cmd/esignet/main.goActual:
/health*and/metricsrequests are logged through the sameAccessLogmiddleware as all other traffic. At probe and scrape frequency, these entries dominate the log volume, making it harder to find and reason about real request logs, especially under load.Expected:
/health*and/metricspaths fromAccessLog.LOG_LEVEL=infois set in the perf environment values (notdebug, which would compound the noise problem).LOG_SAMPLINGoption to sample access logs at very high TPS, rather than logging every request, once volume becomes a concern beyond just excluding health/metrics.Acceptance Criteria
/health,/health/live,/health/ready, and/metricsrequests no longer appear in the access log output.LOG_LEVEL=info.LOG_SAMPLINGoption evaluated and documented as a follow-up (implementation optional for this issue, evaluation not).Definition of Done
AccessLogmiddleware updated to exclude/health*and/metricspathsLOG_LEVEL=infoLOG_SAMPLINGoption evaluated; decision (implement now vs. defer) documenteddevelop-go