Analyze historical metrics cardinality in Cost Management and Billing
Use the Cardinality tab in the Cost Management and Billing app to understand how your metrics and labels contribute to your active series count over time. The Cardinality tab shows up to 30 days of historical cardinality, highlights metrics that are new or unused, and links to actions in the live cardinality management dashboards, Grafana Explore, and Adaptive Metrics.
If you want a current snapshot of cardinality from interactive dashboards instead, refer to Analyze metrics usage with live cardinality management dashboards.
Limitations
- The Cardinality tab displays aggregate cardinality data for the metrics and labels within a single stack.
- Cardinality data is retained for up to 30 days. The time picker defaults to the last 30 days.
- The label breakdown panel and the Explore with count queries action are live queries. If these time out, contact support to raise your Mimir query limits.
Before you begin
Access to the Cardinality tab requires the grafana-cmab-app.cardinality:read permission. For more information, refer to Manage access to Cost Management and Billing RBAC.
Access the Cardinality tab
- In Grafana Cloud, open the Cost Management and Billing app.
- Select the Cardinality tab.
- Use the time picker in the upper right to select a time range. The default range is the last 30 days, which is also the maximum supported range.
Summary stats
The top of the Cardinality tab shows summary statistics for the selected stack:
- Total metrics: the number of unique metric names.
- Total active series: the total number of active time series across all metrics.
- Total label names: the number of unique label keys.
- Total unique label value pairs: the number of distinct label key-value combinations.
These top values are not affected by the search filters on the tables below.
Highest cardinality metrics
The Highest cardinality metrics table lists the metrics with the most active time series. The cardinality of a metric is the number of time series associated with that metric, where each time series is defined as a unique combination of key-value label pairs.
The table includes the following columns:
- Metric: the metric name, with New and Unused badges where applicable.
- Series: the current number of active series for the metric.
- % of total: the metric’s share of the stack’s total active series.
- History: a sparkline showing how the metric’s aggregate cardinality across all labels has changed over the selected time range.
Use the search box to filter metrics by name, and click any column header to sort. Click a row or sparkline to open the Metric details drawer.
To reduce active series, start by inspecting metrics with high cardinality, as they contribute the most to your total series count.
Highest cardinality labels
The Highest cardinality labels table lists the label keys with the most distinct values. Labels with a limited set of values are preferred, because every unique combination of key-value label pairs creates a new time series and can dramatically increase your total series count.
The table includes the following columns:
- Label: the label name, with a New badge where applicable.
- Values: the number of distinct values seen for the label.
- % of total: the label’s share of total label value pairs.
- History: a sparkline showing how the labels’ aggregate number of values across all metrics has changed over the selected time range.
Use this table to identify labels with many distinct values, such as user IDs, email addresses, or other unbounded sets.
New and Unused badges
Rows in the cardinality tables may be tagged with a New or Unused badge.
- New: the metric or label was first ingested in the last 30 days. Hover over the badge to see the exact first-seen timestamp. The New badge is useful for spotting recently introduced metrics or labels that have grown into high cardinality contributors. The New badge applies to both the Highest cardinality metrics and Highest cardinality labels tables.
- Unused: the metric is not used in queries, dashboards, recording rules, or alerting rules, and may be contributing to cost without providing value. The Unused badge applies to the Highest cardinality metrics table only.
Note
An unused metric is a metric that has not been queried in the last 30 days and is not used in an existing dashboard, recording rule, or alerting rule. A metric’s usage status is recomputed every 24 hours so that it reflects the most recent query history and most recent set of dashboards, alerting rules, and recording rules.
To stop sending specific metrics to Grafana Cloud, refer to Reduce metrics costs via Adaptive Metrics.
Metric details
Click a metric in the Highest cardinality metrics table to open the metric details drawer. The drawer shows up to 30 days of historical context for a single metric, along with information about how the metric is used.
The drawer header shows the metric name, the New and Unused badges where applicable, and an Actions menu. For more information about the menu, refer to Actions.
The drawer has its own time range picker that controls the Cardinality history, Label breakdown, and Query count panels. The dashboards and rules tables show usage from the last 30 days and are not affected by the time range picker.
Cardinality history
The Cardinality history panel shows the number of active series for the metric over the selected time range. Use this panel to identify when a metric’s cardinality spiked, grew, or dropped, and to correlate changes with deployments or other events.
Label breakdown
The Label breakdown panel shows how the metric’s series are distributed across its labels. By default, the panel displays a stacked time series of label cardinality over the selected time range. For some metrics, the panel may instead display a snapshot view of label cardinality.
Query count
The Query count panel shows how often the metric has been queried over the selected time range, including queries from dashboards, alerting rules, recording rules, and free-form exploration. Use this panel together with the cardinality history to evaluate whether a high-cardinality metric is providing value.
Dashboards and rules containing the metric
Below the panels, two tables list the dashboards and alerting or recording rules that reference the metric. Click any entry to open the dashboard or rule in a new tab. These tables always reflect usage from the last 30 days, regardless of the time range picker.
Actions
The Actions menu in the metric details drawer provides one-click follow-ups for further analysis and remediation. The available actions depend on the metric type and on which plugins are installed:
- View in cardinality dashboard: opens the live cardinality management dashboard scoped to the selected metric or label, for a deeper breakdown of series and label combinations. This action is available when the cardinality management dashboards are provisioned in your stack.
- Explore with count queries: opens Grafana Explore with pre-populated
countqueries for the selected metric. This action is available for metrics only. - View in Adaptive Metrics: opens the Adaptive Metrics page for the selected metric, where you can view and configure aggregation rules. This action is available for metrics only, and only when the Adaptive Metrics app is installed and enabled.


