grafclouds.com / documents / training / devops-challenges / prometheus-cardinality-explosion

We're Missing a Dimension, So Add user_id as a Label?

Advanced ~14 min read
Observability

Scenario

During the last incident, the question "which customers are hitting these errors?" could only be answered by grepping raw logs under pressure — slow, manual, and painful. The team's metrics are clean and bounded today: labels like route, status, and region. But the Prometheus server is already under memory pressure and has OOM-restarted before. Logs and a tracing system exist, though in practice nobody has invested in them.

In the retro, a teammate proposes the one-line remedy: "Just add user_id and request_id as labels on the request metrics. Then every dashboard can slice by user, and next incident we'll see the affected customers instantly."

The Quick Fix on the Table

Add user_id (and request_id) as Prometheus labels. It really is a one-line instrumentation change, and it appears to give exactly the per-customer visibility the incident lacked.

Interview · Round 1

The quick fix is on the table and the room is waiting for your call. Would you sign off on it? Take a position and justify it — out loud or on paper — before revealing the analysis.