Section 3 · Choose and fix metric labels

The most important labeling rule and the values to never use as metric labels

Estimated time: 1 min

Use bounded labels

A metric label should be a dimension you aggregate or filter by, with a bounded set of values.

The single most important rule is that label values must be bounded. A label like env has a handful of values forever. A label like user_id is an unbounded label: it grows without limit, and every new value creates another active series that’s billed and indexed.

Never use these as metric label values:

  • User, customer, or session IDs
  • Request or trace IDs
  • IP addresses
  • Email addresses
  • Timestamps

Each of these creates a new series per unique value, and the combinations multiply against every other label on the metric.

A chart comparing active series over time: a bounded label like env stays flat while an unbounded label like user_id grows without limit