> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://respan.ai/docs/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://respan.ai/docs/_mcp/server.

# Metrics

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).

![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](/docs/_fern-img/17d0628173cb0b0cbc8f8ba353dd37078f5221e3fae6780771f271fc1b6c7340.webp)![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](/docs/_fern-img/552180fc6a5078ab36f6797aa830c0b779ded4214daf735da7c510fbb87fa021.webp)

> **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.

## Read the dashboard

#### 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.

#### 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/observe/custom-ids) (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.

#### 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.

> **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.

## Add a graph

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

#### Template

![The Select graphs dialog on the Template tab, with sections from Models to Metadata and graph cards marked as added or ready to add](/docs/_fern-img/a0367bf770662d4a5e1d7544dd806ef2fb52f579c704c6d814fd68fd16295278.webp)![The Select graphs dialog on the Template tab, with sections from Models to Metadata and graph cards marked as added or ready to add](/docs/_fern-img/6a586235b7872e475435a0df5b1a9857d4b00e907c729adc4c79888eba5c9acf.webp)

#### 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.

#### 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.

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

#### Custom

![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](/docs/_fern-img/8df4b31a7451697df0ed121f8f20ff26a10ddc083070a010a6bcf641ae1d0484.webp)![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](/docs/_fern-img/54e22002f193e3a17adcfc4d48e2b39e0aa73341eb60e2144c86d56f4d8e157c.webp)

#### Name the graph

Enter a **Title**. It starts as "New chart".

#### 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.

#### 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**.

#### Create it

Check the preview, then click **Create**.

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/customer-identifier).

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).

![The Errors graph on hover, with the drag handle and the Create a monitor, Remove chart, and Expand chart icons](/docs/_fern-img/e4a4676370034005aecddd96b6286974697d783cd53e0f8f74c0251c0f29f2a2.webp)![The Errors graph on hover, with the drag handle and the Create a monitor, Remove chart, and Expand chart icons](/docs/_fern-img/6294614ed9647e76288bef1d24aca9ea9149e9dbe55d764e6f26ade0b77ef424.webp)

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.

## 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

In the [SQL editor](/docs/documentation/features/observe/sql-editor), run a query whose result can be charted, click **Add to dashboard**, and pick a Metrics view. The chart joins that view's graphs. You can move, resize, or remove it on Metrics, but you can't edit it there.