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
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
flagsmith_worker_rss_bytes) labelled by worker PID.resource.getrusageor/proc/self/status).Acceptance Criteria
pidlabel.