Analytics

Keep metric dimensions under control

Editorial edition · 16 November 2026

The idea

Every distinct combination of metric labels can create another time series. A user identifier or full URL can therefore multiply storage and query work rapidly. Labels should describe useful groups, not reproduce every detail of an individual event.

Design choice

Prefer bounded categories such as route templates and outcome classes. Put detailed identifiers into controlled logs or traces when needed. Establish a budget for new dimensions before adding them to a widely emitted metric.

Worked example

Count requests by /orders/{id} rather than by the complete order URL. The metric answers route-level questions without producing one series for every order.

Before you ship

  • Estimate combinations before deployment
  • Avoid personal identifiers in labels
  • Monitor newly created series

Examples are illustrative. Adapt the checks to your own environment.

Further reading

OpenTelemetry metrics

Search the library