# Query metrics in the UI

Use the Metrics page to inspect time-series data, choose aggregations, change time ranges, and filter by dimensions.

Use the Metrics page when you want to explore data interactively before turning it into a dashboard chart or alarm. The UI uses the same query model as the API, but gives you controls for time range, resolution, aggregation, percentile, and dimensions.

Metric views are workspace-scoped. The current workspace controls which metrics appear and which data you can query.

## Open the Metrics page

Open **Metrics** from the app sidebar.

The list shows metrics available in the current workspace. Each row includes the metric name, discovered dimensions, a small trend preview, and quick actions.

Use search to find a metric by name. Use the dimension filters to narrow the list to metrics that include specific dimension names or values.

Select a metric name to open its detail page.

## Read the metric detail page

The metric detail page shows a chart for the selected metric and a set of query controls.

Use it to answer questions such as:

- what happened over the last hour, day, or week;
- whether a spike is visible at a specific time;
- which aggregation best represents the signal;
- whether one dimension value behaves differently from another;
- which dashboards already use the metric.

The page also summarizes the displayed data with the latest value, peak, minimum, average of the returned bucket values, and the number of returned datapoints across the visible series. That datapoint count is not the metric's represented sample count; use the `count` aggregation when you need sample count.

## Choose a time range

Use the time range picker to choose the query window.

Relative ranges are useful for live investigation, such as the last hour or last day. Custom ranges are useful when you know the exact incident window.

The picker also controls resolution. Resolution is the bucket size used for the chart. Smaller resolutions show more detail over short windows. Larger resolutions make long windows easier to read.

See [Metric rollups and resolution](/docs/metric-rollups-resolution) for how bucket size changes `count`, `avg`, percentile, trimmed mean, and other aggregations.

## Choose an aggregation

Use the aggregation selector to choose how the metric is aggregated in each bucket.

Available aggregations:

- **avg**: average value.
- **sum**: sum of values.
- **min**: smallest value.
- **max**: largest value.
- **count**: number of samples represented by the bucket.
- **pct**: percentile value.
- **trim**: mean after removing a percentage from the lower and/or upper ends.

Use **avg** for typical gauge-like trends, **max** for peak behavior, **count** for volume, **pct** for latency-style metrics where tail behavior matters, and **trim** when outliers would otherwise distort the mean.

When you select **pct**, set the percentile value. `95` is a common starting point for latency; use a higher percentile when you need to inspect rarer slow requests. When you select **trim**, set the lower and upper percentages to discard; both default to `10`.

In the API, these choices are sent as the `aggregation` query parameter, for example `avg`, `count`, `percentile(95)`, or `trimmed_mean(10;10)`. For trimmed means, leave either trim field empty to use a one-sided trim such as `trimmed_mean(10;)` or `trimmed_mean(;10)`.

## Filter by dimensions

Dimensions let you split a metric into slices, such as route, status, host, region, customer, or queue.

On the metric detail page, open the dimension filter editor and add a filter:

1. Choose a dimension name.
2. Choose whether to include or exclude a value.
3. Select a value from the loaded values.

Each active filter appears as a separate series in the chart. This makes it possible to compare values, such as two hosts or two routes, without creating a dashboard first.

Clear filters when you want to return to the aggregate metric.

## Use metric actions

The metric detail menu has shortcuts for common follow-up work:

- **Add to Dashboard** starts a chart workflow for the metric.
- **Create Alert** starts an alarm workflow using the metric.
- **Copy Metric Name** copies the exact name for API calls, docs, or configuration.

Use these actions after you have found the aggregation and filters that represent the signal correctly.

## Review dashboard usage

The metric detail page shows where the metric is already used in dashboards.

Use this before changing instrumentation or deleting dimension metadata. It helps you see which dashboards may depend on the metric.

## Delete dimension metadata

Dimension metadata can be removed from the metric detail page. This removes the dimension from the metric's discovered dimension list.

Use this when an old dimension should no longer appear in filters. Removing dimension metadata does not make it a general-purpose cleanup tool for historical data; treat it as a way to keep the UI selector list accurate.

## Move from exploration to monitoring

Use the Metrics page for investigation and one-off checks.

When the query becomes something you want to revisit, create a dashboard chart. When the query represents a condition that needs action, create an alarm.

See [Create a dashboard](/docs/dashboards), [Create an alarm](/docs/alarms), and [Metric rollups and resolution](/docs/metric-rollups-resolution) for those workflows.
