Skip to content

[Task] eSignet Go Performance: Exclude /health* and /metrics from access logging #2496

Description

@rachik-hue

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

  • AccessLog middleware updated to exclude /health* and /metrics paths
  • Perf environment values confirmed set to LOG_LEVEL=info
  • LOG_SAMPLING option evaluated; decision (implement now vs. defer) documented
  • Verified via load run that log volume drops and Kibana no longer shows probe/scrape noise
  • Code reviewed and merged into develop-go

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

Fields

Priority

Low

End Date

Sep 13, 2026

Complexity

LOW

Start Date

Aug 31, 2026

Original Estimate

1

Time Tracking

None yet

Resolved By

None yet

Story Points

1

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions