Flagsmith / Flagsmith/flagsmith
Track per-worker RSS memory via Prometheus
- Dominant language
- Python
- Stars
- 6.6k
- Forks
- 567
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 121
Description
## Summary
Expose per-worker RSS memory as a Prometheus gauge so we can track memory growth over time in Grafana. This is essential for detecting memory leaks in production — RSS growth is often invisible to Python-level profilers, so process-level metrics are the only reliable signal.
## Requirements
- Expose a Prometheus gauge metric (e.g. `flagsmith_worker_rss_bytes`) labelled by worker PID.
- The metric should report the RSS of the current process (e.g. via `resource.getrusage` or `/proc/self/status`).
- Updated on each request or periodically via a background thread.
## Acceptance Criteria
- [ ] Prometheus metric is exported with a `pid` label.
- [ ] Grafana dashboard shows per-worker RSS over time.
- [ ] We can observe whether individual workers grow monotonically or stabilise.
Contributor guide
Assessment
This issue has not been assessed yet.