Skip to main content
A high-cardinality tag is a metric label or tag whose values can grow without a small fixed set. Common examples include user_id, request_id, session_id, trace_id, ip_address, full URLs, timestamps, and raw error messages. Each unique tag value creates a separate time series for the metric. A user_id tag on a latency metric creates one time series per user for each metric and dimension combination.

Signals

SignalDescription
Unbounded value setThe tag can contain thousands or millions of distinct values.
Per-request or per-user valuesThe tag contains identifiers such as users, sessions, requests, traces, or IP addresses.
Sparse seriesMany generated time series have little data per series.
Limited query valueThe tag is not used in dashboards, alerts, or common queries.

Example

http_request_duration_seconds{service="api", endpoint="/users", user_id="usr_abc123"} 0.045
http_request_duration_seconds{service="api", endpoint="/users", user_id="usr_def456"} 0.052
http_request_duration_seconds{service="api", endpoint="/users", user_id="usr_ghi789"} 0.038
id: remove-user-id-tag
name: Remove user_id tag from metrics
description: Drop high-cardinality user_id tag. Creates millions of sparse time series.
metric:
  match:
    - tag: user_id
      exists: true
  transform:
    remove_tags:
      - user_id

Enforce at edge

Strip the tag before metrics reach your provider.

Open PRs

Remove the tag from instrumentation code.
The durable remediation is removing the tag from instrumentation. Edge enforcement can remove the tag before metrics reach the provider when you can’t change instrumentation right away.

Detection notes

For accounts with metric policy context, Tero analyzes tag cardinality across metrics. It flags tags with thousands or more unique values. Tero can also check whether these tags are used in queries or dashboards. A tag with many unique values and no query usage is a candidate for removal.