---
title: Monitors & notifications
subtitle: Get an alert in email, Slack, Microsoft Teams, or a webhook when a metric crosses a threshold.
---

A monitor watches one metric, such as error rate, cost, latency, tokens, or volume, over a rolling window. When the metric crosses your threshold, Respan sends an alert to every destination you picked. To find a sensible threshold first, look at the trend in [Metrics](/docs/documentation/features/monitoring/metrics).

## Create a monitor

<Steps>
<Step title="Open Monitors">

Go to **Observability** › **Monitors** and click **New monitor**, or press **C**. Respan creates an **Untitled monitor** and opens it. To rename it later, open the row's **⋯** menu and choose **Edit title & description**.

<img src={"/docs/images/monitors/monitors-list-light.png"} className="block dark:hidden" alt="The Monitors list with name, tags, status (Deployed, Deployed v3, or Draft), version, last update, and author for each monitor" />
<img src={"/docs/images/monitors/monitors-list-dark.png"} className="hidden dark:block" alt="The Monitors list with name, tags, status (Deployed, Deployed v3, or Draft), version, last update, and author for each monitor" />

**Status** shows **Draft** until you deploy, and **Deployed** when the latest version is live. A version number, such as **Deployed v3**, means an older version is live and newer versions aren't deployed yet.

</Step>
<Step title="Set the trigger">

Under **Trigger**, the **When** row reads as a sentence: *metric* of *source*, *operator*, *threshold*, over *window*. The example below alerts when more than 5% of gpt-5.5 spans fail in a 15-minute window.

<img src={"/docs/images/monitors/monitor-editor-light.png"} className="block dark:hidden" alt="The monitor editor: When Error rate of spans ≥ 5% over 15m, Where Model is gpt-5.5, with Slack and email notifications, and Send test alert and Deploy in the top bar" />
<img src={"/docs/images/monitors/monitor-editor-dark.png"} className="hidden dark:block" alt="The monitor editor: When Error rate of spans ≥ 5% over 15m, Where Model is gpt-5.5, with Slack and email notifications, and Send test alert and Deploy in the top bar" />

| Control | Options |
| --- | --- |
| Metric | **Count**, **Errors** (error count or error rate), **Tokens**, **Cost**, and **Latency** (total, average, or peak, depending on the metric) |
| Source | **spans** or **full traces**. Cost monitors always count spans. |
| Operator | **≥**, **≤**, **=**, **≠**, or **rises by** / **drops by** a percentage vs the previous window. The percentage operators don't work with peak metrics or error rate. |
| Window | 5, 10, 15, or 30 minutes; 1, 4, or 12 hours; 1 or 7 days |

Cost thresholds are in dollars, latency in seconds, and error rate in percent.

Click **+** next to **Where** to count only matching spans or traces. You can filter by **API key**, **Model**, **Provider**, **Customer ID**, **Prompt**, **Behavior**, **Error issue**, **Error code**, **Fault domain**, or a custom metadata field.

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

<Step title="Choose where alerts go">

Under **Notifications**, pick a channel on the **Send** row, then its destination. Click **More** to add another destination.

<img src={"/docs/images/monitors/notification-channels-light.png"} width="560" className="block dark:hidden" alt="A notification row's channel menu with Email, Slack, Microsoft Teams, and Webhook" />
<img src={"/docs/images/monitors/notification-channels-dark.png"} width="560" className="hidden dark:block" alt="A notification row's channel menu with Email, Slack, Microsoft Teams, and Webhook" />

| Channel | Destination |
| --- | --- |
| **Email** | Pick an address, or choose **Create new** to add one. **Manage** lists every saved destination. |
| **Slack** | Click **Connect Slack** the first time, then pick a channel. See [Slack](/docs/integrations/slack). |
| **Microsoft Teams** | Click **Connect Microsoft Teams** the first time, then pick a team and a channel. See [Microsoft Teams](/docs/integrations/microsoft-teams). |
| **Webhook** | Paste a URL that starts with `http://` or `https://`. |

The preview below the destinations shows the alert Respan sends: the value that crossed the threshold, the totals for the window, and the top users, API keys, and models behind it. Error monitors also get a short summary of what failed. You can't edit the alert text.

</Step>
<Step title="Test and deploy">

Your edits save to a draft as you go. Click **Send test alert** to check that the alert reaches your destinations.

Click **Deploy** in the top bar, add an optional note in the **Deploy version** dialog, and click **Deploy**. **Deploy** stays disabled until the threshold is set and every destination is filled in.

</Step>
</Steps>

Once deployed, the monitor checks every window and sends at most one alert per window, so a 15-minute monitor alerts at most every 15 minutes.

You can also create a monitor from a chart in [Metrics](/docs/documentation/features/monitoring/metrics), an [error group](/docs/documentation/features/pulse/errors), or a [behavior](/docs/documentation/features/pulse/behaviors). Those monitors start as drafts, so review them and deploy.

## Pause, resume, or roll back

Every deploy saves a version. Click the **versions** button in the top bar (**⇧ H**) and select a version:

- On the live version, click **Pause** to stop alerts. Click **Resume** to turn them back on.
- On an older version, click **Deploy** to make it live again.

**⇧ D** deploys, pauses, or resumes the selected version. If you edit an old version while a draft exists, Respan asks before it overwrites the draft.

## Check a monitor's runs

Switch the **Editor** dropdown to **Metrics** to see each run of the monitor over time and open the spans behind it. **JSON** shows the workflow configuration the editor generates.

Monitor webhooks send alerts. To stream every span to your own endpoint instead, use [Data webhooks](/docs/documentation/admin/webhooks).
