Frontend health endpoint logs excessive noise in Kubernetes
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 82/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- javascript, kubernetes
Research direction
Start in frontend/api/index.js at the /health handler and inspect how its direct console.log produces output for every request. Remove the default health-check log or gate it as described, then verify that /health still returns OK without emitting the unwanted line by default.
Written by the indexing model from the issue text.
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')
})
- Dominant language
- Python
- Stars
- 6.6k
- Forks
- 571
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 116
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Flagsmith/flagsmith
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Sales dashboard: download_org_data 500s with "Object of type generator is not JSON serializable" Open
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
All issues in Flagsmith/flagsmith
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100