---
title: "Metrics"
subtitle: "Watch requests, cost, tokens, latency, and errors over time."
---

Metrics charts your LLM requests over time. Use it to spot a change in traffic, cost, latency, or errors, and to find the model, prompt, or user behind it. Open it from **Observability** › **Metrics** in the [platform](https://platform.respan.ai/platform/observability/dashboard).

<img src={"/docs/images/metrics/metrics-overview-light.png"} className="block dark:hidden" alt="The Metrics page with the Default view tab, the Display, export, and New graph buttons, the filter row, a Requests chart compared with the last period, and Errors, Error rate, and Cost charts" />
<img src={"/docs/images/metrics/metrics-overview-dark.png"} className="hidden dark:block" alt="The Metrics page with the Default view tab, the Display, export, and New graph buttons, the filter row, a Requests chart compared with the last period, and Errors, Error rate, and Cost charts" />

<Note>
Metrics counts individual LLM requests, not traces. One trace can contain several requests, so totals can differ from [Logs](/docs/documentation/features/observe/explore-spans) grouped by traces.
</Note>

## Read the dashboard

<Steps>
<span data-docs-fragment-alias={"choose-the-investigation-window"} aria-hidden="true" data-pagefind-ignore="" style={{ display: "block", height: 0, scrollMarginTop: "5rem" }} />

<Step title="Pick the environment and time range">

In the filter row, set the environment to **All environments**, **Production**, or **Test**. Test data comes from test API keys and the Playground.

Open the time range and pick a preset, from **Last 5 mins** to **Last 30 days**, or **Today**, **This week**, or **This month**. For exact dates, set **Start** and **End** in the calendar and click **Apply**. **Local** and **UTC** switch the timezone. Presets longer than your plan's log retention are unavailable.

</Step>
<Step title="Filter">

Use the quick filters **Status**, **Status code**, **Prompt**, **API key**, **Provider**, and **Model** to pick values from a list. **Custom property** filters on one of your [custom properties](/docs/documentation/features/custom-attributes) (the `metadata` on your requests). **More filters** (or press **F**) has every other field, plus **Add filter group** and AND/OR between conditions. Press **C** to clear all filters.

Every graph uses these filters except the breakdown graphs (**Requests by model**, **Cost by deployment**, and the other "by model" and "by deployment" graphs) and the cache and storage graphs. Those show "This chart does not support filters" while a filter is on.

</Step>
<Step title="Read a graph">

Each graph shows its total for the range, then the previous period's total after the arrow and the change between them. The gray line is the previous period. Hover a graph to see each time bucket's values.

On a breakdown graph such as **Requests by model**, click a bar to see each model's count and share for that time bucket. On a top list such as **Top models by requests**, click **+ N more** to see the full ranking.

</Step>
</Steps>

<Tip>
If a graph is empty, widen the time range, set the environment to **All environments**, and clear your filters. If [Logs](/docs/documentation/features/observe/explore-spans) is empty too, follow the [tracing quickstart](/docs/documentation/features/tracing/quickstart) to send your first trace.
</Tip>

## Add a graph

Click **New graph** (or press **G**), then choose **Template** or **Custom**.

<Tabs>
<Tab title="Template">

<img src={"/docs/images/metrics/metrics-select-graphs-light.png"} width="720" className="block dark:hidden" alt="The Select graphs dialog on the Template tab, with sections from Models to Metadata and graph cards marked as added or ready to add" />
<img src={"/docs/images/metrics/metrics-select-graphs-dark.png"} width="720" className="hidden dark:block" alt="The Select graphs dialog on the Template tab, with sections from Models to Metadata and graph cards marked as added or ready to add" />

<Steps>
<Step title="Pick a section">
The sections are **Models**, **Latency**, **Tokens**, **Prompts**, **Users**, **Caches**, **Storage**, **Keys**, **Providers**, and **Scores**. **Metadata** appears when your team has saved custom graphs or your requests carry metadata. It holds those graphs and one ready-made graph per metadata key.
</Step>
<Step title="Select graphs and save">
Click a graph card to add it (a check mark) or take it off, then click **Save**. Graphs that break cost or requests down by API key ask you to pick the keys first.
</Step>
</Steps>

**Add all** and **Clear all** add or remove every template, and **Reset to default** brings back the default set. All three apply right away.

</Tab>
<Tab title="Custom">

<img src={"/docs/images/metrics/metrics-custom-graph-light.png"} width="720" className="block dark:hidden" alt="The Add graph dialog on the Custom tab, titled P95 latency by model, with Latency at Percentile P95, Group by set to Model, and a preview with one line per model" />
<img src={"/docs/images/metrics/metrics-custom-graph-dark.png"} width="720" className="hidden dark:block" alt="The Add graph dialog on the Custom tab, titled P95 latency by model, with Latency at Percentile P95, Group by set to Model, and a preview with one line per model" />

<Steps>
<Step title="Name the graph">
Enter a **Title**. It starts as "New chart".
</Step>
<Step title="Choose what to measure">
Under **Metrics**, pick **Latency**, **Total tokens**, **Cost**, **Number of requests**, or one of your metadata keys. Then pick **Percentile**, **Average**, **Sum**, or **Count**. For **Percentile**, pick **P50**, **P75**, **P90**, **P95**, **P99**, or **P99.9**. Click **+** next to **Metrics** to plot another metric on the same graph.
</Step>
<Step title="Filter or group it (optional)">
Open **More options**. **Span filters** apply to this graph only, on top of the page filters. **Group by** draws one line per **Model**, **Provider**, or **Customer ID**, or per value of a **Metadata key**.
</Step>
<Step title="Create it">
Check the preview, then click **Create**.
</Step>
</Steps>

</Tab>
</Tabs>

<span data-docs-fragment-alias={"choose-the-right-percentile"} aria-hidden="true" data-pagefind-ignore="" style={{ display: "block", height: 0, scrollMarginTop: "5rem" }} />

Use **P50** for typical requests and **P95** or **P99** for the slow tail; an average can hide a few very slow requests. Grouping by **Customer ID** needs a customer identifier on your requests. See [Users & identifiers](/docs/documentation/features/custom-attributes#users).

To change a custom graph, hover it and click its **Edit graph config** icon. The **Edit graph** dialog has **Save** and **Remove**.

## Create a monitor from a graph

Hover a graph and click its monitor icon (**Create a monitor**). Respan creates a monitor from the matching template and opens it in a new tab. The monitor starts turned off, so review its conditions and turn it on. See [Monitors](/docs/documentation/features/monitoring/monitors).

<img src={"/docs/images/metrics/metrics-chart-actions-light.png"} width="365" className="block dark:hidden" alt="The Errors graph on hover, with the drag handle and the Create a monitor, Remove chart, and Expand chart icons" />
<img src={"/docs/images/metrics/metrics-chart-actions-dark.png"} width="365" className="hidden dark:block" alt="The Errors graph on hover, with the drag handle and the Create a monitor, Remove chart, and Expand chart icons" />

The icon is on the error, cost, token, and **Requests per second** graphs, and on the top models, providers, and keys by requests, errors, or cost.

<span data-docs-fragment-alias={"customize-chart-display"} aria-hidden="true" data-pagefind-ignore="" style={{ display: "block", height: 0, scrollMarginTop: "5rem" }} />

## Arrange and display

Hover a graph to move, resize, or remove it:

- Drag the handle at its top-left corner to move it. On wide screens, drag its right edge to change its width.
- **Expand chart** gives it more room and **Collapse chart** shrinks it back. **Remove chart** takes it off the view.
- To undo your moves and resizes, click **Reset chart layout** (the undo icon in the toolbar), then **Reset layout**. Your graphs stay.

Click **Display** to change how graphs are drawn. These settings don't change the data.

| Setting | What it does |
| --- | --- |
| **Granularity** | The time bucket. It appears only for ranges of three hours or less, where you pick **Minutely** or **Hourly**. Ranges up to two days use hourly buckets, and longer ranges use daily ones. |
| **Compare mode** | On by default. Compares the range with the previous period of the same length. Unavailable for custom ranges. |
| **Chart type** | **Line** or **Bar**. |
| **X-axis major grids**, **Y-axis major grids**, **Tick lines** | Show or hide grid lines and axis ticks. |
| **Smooth graph** | Curved lines instead of straight segments. Line charts only. |

To keep graphs up to date, open the auto-refresh menu (the arrow next to **New graph**) and pick **Every 1 minute**, **Every 3 minutes**, **Every 5 minutes**, or **Every 10 minutes**. Pick **Off** to stop. Auto-refresh needs a preset range: turning it on during a custom range switches to **Today**, and picking a custom range pauses it.

## Saved views

Views are the tabs above your graphs. Each view keeps its own graphs, layout, filters, environment, time range, granularity, chart style, and auto-refresh, and saves changes on its own. Next to the tabs you see **Saving...**, **Saved**, or **Save failed**; click **Save failed** to retry.

- **Create a view:** click the **New view** icon next to the tabs, type a name, and press Enter.
- **Manage a view:** right-click its tab for **Copy view URL**, **Duplicate view**, **Edit view**, or **Delete view**.

The first tab, **Default**, is saved in this browser only. To keep a setup across browsers or share it, save it as a view.

## Export graph data

Click the download icon (**Export graph data**, or press **E**), add an optional **Export name**, leave **File type** on **CSV**, and click **Download CSV**. You get one row per time bucket with requests, errors, cost, tokens, and latency for the current time range, environment, and filters.

## Charts from the SQL editor

The [SQL editor](/docs/documentation/features/observe/sql-editor) no longer has **Add to dashboard**. To query in a view, open **Query with SQL** above the graphs: a query that runs shows its table in place of the view's graphs. To chart a metric next to other graphs, use **New graph**.

Charts added from the SQL editor before November 19, 2026 hold ClickHouse SQL, which no longer runs. They show the error with "Edit the chart and save it to run it on RQL." To fix one, click **Edit graph config** and save it, or remove it.
