-
Notifications
You must be signed in to change notification settings - Fork 501
Frontend health endpoint logs excessive noise in Kubernetes #7080
Copy link
Copy link
Open
Description
Problem
The frontend health endpoint (/health) in frontend/api/index.js contains a hardcoded console.log('Healthcheck complete') on every request:
app.get('/health', (req, res) => {
console.log('Healthcheck complete')
res.send('OK')
})In Kubernetes, liveness and readiness probes hit /health every 10 seconds per pod. This generates a constant stream of Healthcheck complete log lines that:
- Increases log storage/ingestion costs (e.g. CloudWatch, Datadog, Loki) — especially when running multiple replicas
- Drowns out meaningful application logs, making it harder to debug real issues
- Cannot be disabled via environment variables —
ACCESS_LOG_LOCATIONdoes not affect this since it's a directconsole.logcall
Expected Behavior
Health check requests should not produce log output by default, or there should be an environment variable (e.g. LOG_HEALTHCHECK=false) to suppress it.
Suggested Fix
Remove the console.log from the health endpoint, or gate it behind an environment variable:
app.get('/health', (req, res) => {
if (process.env.LOG_HEALTHCHECK === 'true') {
console.log('Healthcheck complete')
}
res.send('OK')
})Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels