Why is telemetry cardinality a production risk, and how would you test it?
Answer
Cardinality is the number of distinct attribute or label combinations. Unbounded values such as user IDs, raw URLs, timestamps or request IDs can create excessive metric state, log streams, storage cost and slow queries. Review every dimension for boundedness, generate many realistic values, measure series or stream growth and verify configured limits and overflow signals. Preserve high-cardinality investigation data in logs, traces or structured metadata instead of turning it into indexed metric labels.
Strong answer includes
- identifies unbounded label values
- measures growth rather than checking a single request
- chooses a more suitable signal for detailed context
Practical example
A developer adds a user_id label directly to a Prometheus request-count metric to make per-user debugging easier. Within a day, the metric explodes from a few hundred time series to several million, because every distinct user creates a new series, and the monitoring backend starts running out of memory and dropping scrapes. A QA engineer catches this before release by generating traffic from 50,000 synthetic user IDs in a load test and watching the series count climb without bound, then recommends moving user_id to structured logs instead.