Metrics Cardinality Explorer
The Metrics Cardinality Explorer provides a unified, interactive interface for exploring your metrics ecosystem. It combines metric discovery, label analysis, and cardinality investigation in a single workflow, helping you understand the relationships between metrics, labels, and their values while identifying high-cardinality issues.
Key capabilities
The Metrics Cardinality Explorer enables you to:
-
Discover metric-label relationships: Understand which labels appear with which metrics, and which values exist for specific label-metric combinations.
-
Identify high cardinality metrics: Find metrics and labels contributing to high cardinality that may impact query performance or increase costs.
-
Build targeted queries: Incrementally refine your exploration by promoting label filters, progressively narrowing your focus to specific metric series.
-
Analyze cardinality impact: Optionally view series counts to understand the cardinality contribution of each label.
Understanding cardinality
Metrics cardinality is the number of unique combinations of metric names and their labels. Each unique combination creates a distinct time series in your data.
-
High cardinality metrics enable detailed analysis and troubleshooting, but can complicate data management and reduce query performance.
-
Higher cardinality increases the number of items to iterate over during queries, which harms efficiency.
-
In cloud-native environments where pricing may depend on the number of distinct metric series, reducing spurious label values can lead to cost savings.
-
Carefully defining labels helps manage cardinality and mitigates the risk of time series explosion as data volume grows.
See Cardinality for more information.
Access the Metrics Cardinality Explorer
-
From the left navigation, click Metrics.
-
Select Cardinality explorer from the dropdown menu.
The Metrics Cardinality Explorer interface opens with three main columns: Metrics, Labels, and Label values.
Interface overview
The explorer uses a three-column layout that guides you through progressive discovery:
-
Metrics column (left): Displays all metrics matching your current filters. Shows the metric name, type, and series count.
-
Labels column (center): Shows all labels that appear on the filtered metrics. Displays the label name and value count.
-
Label values column (right): Lists all values for the selected label. Enables value selection and query promotion.
-
Time picker: Controls the time range for cardinality analysis. Located in the top-right corner.
-
Date controls: Quick time range selection buttons.
-
Series count toggle: Enables or disables series count display in the Labels column.
Explore metrics
The Metrics column displays all metrics that match your current filters.
-
By default, all metrics in your system appear in the list.
-
To find a specific metric, use the search box at the top of the Metrics column.
-
Click any metric name to view its details.
When you select a metric:
-
The metric name appears at the top with a back arrow to return to the full list.
-
The metric’s type (gauge, counter, or histogram) and series count display.
-
The Labels column updates to show only labels that appear on this metric, with value counts reflecting this metric only.
-
-
To return to the full metrics list, click the back arrow (
) next to the metric name.
Explore labels
The Labels column shows all labels present on the metrics currently displayed in the Metrics column.
-
By default, the Labels column lists all labels across all metrics, showing the count of distinct values for each label.
-
To find a specific label, use the search box at the top of the Labels column.
-
Click any label name to view its values in the Label values column.
When you select a label:
-
The label name appears at the top of the Labels column with a back arrow.
-
The label’s value count displays.
-
The Label values column populates with all values for this label.
-
If series count is enabled, the series count for this label displays.
-
-
To return to the full labels list, click the back arrow next to the label name.
Label actions
Each label in the Labels column provides quick actions to work with that label:
-
Copy label: Click the copy icon to copy the label name to your clipboard for use in queries or documentation.
-
Open in Metrics Explorer: Click the external link icon to open Metrics Explorer with the selected metric and label pre-applied as a filter. This action is only available when a metric is selected.
These actions provide quick access to further analysis and query building workflows.
Display series count
By default, the Labels column shows only value counts. You can optionally display series counts to understand each label’s cardinality contribution.
| Querying series count can be expensive, especially for longer time ranges. Enable this feature only when needed for cardinality analysis. |
-
Toggle Show series count in the Labels column header.
-
The Labels column updates to display series count for each label alongside value count.
The series count represents the number of unique time series that include this label within the filtered metric set.
Select label values
Once you’ve selected a label, the Label values column displays all possible values for that label within the current filter context.
-
View the list of values in the Label values column.
-
To find a specific label value, use the search box at the top of the Label values column.
-
To narrow your exploration to specific values, select one or more checkboxes.
When you select label values:
-
The Metrics column filters to show only metrics that have the selected label values.
-
The Labels column updates to show labels that appear on the filtered metrics.
-
The selections persist while you continue exploring, but are temporary until promoted.
-
-
To clear your value selections, click the back arrow in the Labels column to deselect the current label.
Label value actions
Each label value in the Label values column provides quick actions to work with that value:
-
Copy label: Click the copy icon to copy the label value to your clipboard for use in queries or documentation.
-
Open in Metrics Explorer: Click the external link icon to open Metrics Explorer with the selected metric and label value pre-applied as a filter. This action is only available when a metric is selected.
These actions provide quick access to further analysis and query building workflows.
Promote label filters
Promoting a query converts your current label and value selections into a persistent filter that applies to all subsequent explorations.
-
After selecting a label and one or more values, click Promote query in the Label values column header.
-
The promoted filter appears in a new section above the Label values list, showing the label name and selected values.
Once promoted:
-
The filter applies as an AND condition to all metrics and labels.
-
The promoted label no longer appears in the Labels column.
-
You can continue selecting additional labels and promoting them to further narrow your focus.
-
All promoted filters combine with AND logic.
-
-
To remove a promoted filter, click the delete icon (
) next to the promoted label.
Removing a promoted filter:
-
Clears the persistent AND condition for that label.
-
Returns the label to the Labels column so it can be explored again.
-
Updates the Metrics and Labels columns to reflect the broader filter context.
-
Clear selections and filters
As you explore metrics and labels, you may want to clear your selections to broaden your exploration or start fresh.
Clear a selected metric
To return to viewing all metrics:
-
Click the back arrow (
) next to the metric name at the top of the Metrics column.
The Metrics column returns to showing all metrics, and the Labels column updates to show all labels across all metrics.
Clear a selected label
To return to viewing all labels:
-
Click the back arrow (
) next to the label name at the top of the Labels column.
The Labels column returns to showing all labels, and any selected label values are cleared from the Label values column.
| Clearing a label selection also clears any label value selections you made, but does not remove promoted filters. |
Example workflow: Investigate high cardinality
This example demonstrates using the Metrics Cardinality Explorer to identify and analyze a high-cardinality metric.
Scenario
You’ve noticed slow query performance and want to identify which metrics and labels contribute most to cardinality.
Steps
-
Access the Metrics Cardinality Explorer and enable Show series count in the Labels column.
This reveals that the
image_taglabel has an extremely high value count and series count. -
Click the
image_taglabel to view its values.The Label values column displays hundreds of distinct image tag values, many of which appear to be build-specific commit hashes.
-
Select specific values to investigate further:
-
Check the boxes for
v0.5.0andv0.11.1(stable version tags). -
Notice the Metrics column updates to show only metrics with these image tags.
-
-
Examine which metrics use the
image_taglabel:-
Review the filtered Metrics list.
-
Identify that
containerd_image_sizeis one metric using this label. -
Click
containerd_image_sizeto focus on this metric.
-
-
Promote the
image_tagfilter to maintain this focus:-
With the image tag values selected, click Promote query.
-
The filter persists, and you can now explore other labels on this metric with these specific image tags.
-
-
Investigate additional labels:
-
Notice the
short_imagelabel also appears on this metric. -
Click
short_imageto view its values. -
Select a specific value like
flagdand promote this filter as well.
-
-
With multiple promoted filters active, you’ve narrowed your exploration to a very specific subset of metric series, enabling detailed cardinality analysis.
Outcome
By progressively filtering and promoting labels, you’ve identified:
-
The
image_taglabel contributes significantly to high cardinality -
Many values are ephemeral build identifiers rather than stable version tags
-
Specific metrics like
containerd_image_sizeare affected
This analysis enables you to take action, such as:
-
Configuring metric relabeling rules to drop or normalize ephemeral image tags
-
Updating instrumentation to use stable version identifiers
-
Setting up alerts to monitor cardinality growth
Performance considerations
The Metrics Cardinality Explorer queries your metrics data to compute cardinality statistics. Follow these best practices for optimal performance:
Time range selection
-
Default range: The explorer defaults to the last hour, which provides good performance for most environments.
-
Supported range: You can explore data from up to one week in the past.
-
Recommended range: For best performance, keep your time range under one day, especially when enabling series count display.
-
Longer time ranges increase query complexity and response time, particularly in high-cardinality environments.
Series count queries
The Show series count toggle triggers additional cardinality queries that can be resource-intensive:
-
Series count queries iterate over all time series matching your filters.
-
In environments with millions of time series, these queries may take several seconds.
-
Use series count strategically when you need cardinality analysis rather than leaving it enabled continuously.
-
Consider using shorter time ranges when series count is enabled.
Use cases
Discover metric-label-value relationships
Use the explorer to understand your metrics topology:
-
Identify which labels apply to which metrics: Select a metric to see all its labels, helping you understand metric instrumentation and available dimensions for querying.
-
Find available values for label-metric combinations: Select a metric and then a label to see all values, useful when building dashboards or alerts.
-
Understand label coverage: See which labels appear across multiple metrics versus labels specific to individual metrics.
-
Validate instrumentation: Verify that expected labels appear on metrics after deploying new instrumentation or making configuration changes.
Identify and troubleshoot high cardinality
Use the explorer to diagnose cardinality issues:
-
Find high-cardinality labels: Enable series count to identify labels that create the most time series, which impact query performance and storage costs.
-
Investigate cardinality growth: Compare cardinality across different time ranges to identify labels with growing value sets, which may indicate instrumentation problems or unbounded label values.
-
Analyze label value distribution: Examine label values to find issues such as:
-
Ephemeral identifiers (commit hashes, build IDs) used as label values
-
High-precision timestamps or unique IDs incorrectly used as labels
-
Unbounded user input captured as labels
-
-
Isolate cardinality by metric: Filter to a specific high-cardinality metric, then examine which labels contribute most to its cardinality.
-
Build targeted remediation queries: Use promoted filters to construct precise metric selectors for implementing relabeling rules or ingestion filtering.
Related documentation
-
Metrics Summary - View individual metric details
-
Metrics Cardinality Analytics - Analyze cardinality with statistical reports
-
Metrics Explorer - Query and visualize metric data
-
Metrics Best Practices - Guidelines for managing cardinality
-
Cardinality - Definition and concepts