Which labels should never appear on metrics?
BeginnerProductionCardinality Control & Cost
Answer
Unbounded or per-request values: user IDs, emails, session IDs, request IDs, trace IDs, full URLs with IDs (/orders/839201), raw error messages, IP addresses of clients, timestamps. Those belong in logs or traces. Normalise routes to templates (/orders/{id}) in the instrumentation middleware.
More on Cardinality Control & Cost
What is cardinality and why is it the main cost driver for metrics?BeginnerHow do you find which metrics and labels are driving cardinality?IntermediateHow do you enforce cardinality limits so one team cannot blow up the shared system?AdvancedHow do you drop or aggregate metrics you do not need?IntermediateHow do histograms affect cardinality, and how do you control it?IntermediateHow do you estimate the monthly cost of a new metric before it ships?Intermediate