# Topline Alerts

Topline Alerts watch an event or metric you choose and notify you when its value crosses a fixed threshold or changes beyond an amount you set. Use them to catch shifts in metrics like P90 latency or usage as they happen, and route notifications to email, the Statsig Console, and Slack.

{% callout type="info" %}
Contact Statsig to enable Topline Alerts for your project.
{% /callout %}

Topline Alerts are available in Statsig Cloud and Statsig Warehouse Native with support available for three types of Topline Alerts:

| Alert Condition Type | When to Use                                                             | Example                                                     |
| -------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------- |
| **Threshold**        | Use when you want to stay above or below a fixed number.                | “Alert me when P90 latency spikes above 15 seconds.”        |
| **Change**           | Use when the absolute size of the change matters.                       | “Alert me when hourly P90 latency increases by 10 seconds.” |
| **Change (%)**       | Use when the relative size of the change matters more than raw numbers. | “Alert me when hourly P90 latency increases by 50%.”        |

## Creating a topline alert

{% steps %}
{% step title="Navigate to Topline Alerts" %}
Go to **Analytics → Topline Alerts** in the product menu.
{% /step %}

{% step title="Create a New Alert" %}
Click **+Create** and give the new alert a name.
{% /step %}

{% step title="Select the Event or Metric Source" %}
Pick the data you want to monitor.

- **On Statsig Warehouse Native**: Select a Metric Source, filter, and group by the dimensions you want.
- **On Statsig Cloud**: Select the event, aggregation, filters, and group-by conditions for this alert.

{% callout type="info" %}
This example sets up an alert to monitor P90 latency for `mex_query` events, filtering out internal employee queries and grouping by the `hadGroupBy` dimension.
{% /callout %}

{% figure %}
![Select events or metrics for a Topline Alert](https://docs.statsig.com/images/infra-analytics/topline-alerts-choose-events.png)
{% /figure %}
{% /step %}

{% step title="Review the Alert Preview" %}
The preview shows how your metric is trending with the current setup. Confirm values look correct, or open the metric in [Metrics Explorer](https://docs.statsig.com/product-analytics/drilldown) for deeper analysis.

{% figure %}
![Topline Alert preview showing trending metric](https://docs.statsig.com/images/infra-analytics/topline-alerts-preview.png)
{% /figure %}
{% /step %}

{% step title="Set Alert Conditions" %}
The preview updates along with each change. Define the:

- Condition type (threshold, change, change %)
- Directionality
- _Alert_ and _Warn_ values
- Evaluation window

{% callout type="warning" %}
On Warehouse Native: Define the evaluation frequency, lookback, and max delay. These values directly influence warehouse compute costs.
{% /callout %}

{% figure %}
![Configure alert conditions for a Topline Alert](https://docs.statsig.com/images/infra-analytics/topline-alerts-conditions.png)
{% /figure %}
{% /step %}

{% step title="Add Notifications" %}
Notifications go to email, the Statsig Console, and Slack (if connected). Project-wide defaults live in Settings.

- Draft a clear, actionable message subscribers receive when the alert fires.
- Add subscribers.
- Set alert priority.
- Configure re-notification rules if alerts should resend while conditions hold.

{% /step %}

{% step title="Save and Monitor" %}
After saving, triggered alerts appear at the top of the page. From here you can:

- View samples of the event.
- Open the trend in [Metrics Explorer](https://docs.statsig.com/product-analytics/drilldown).
- Mute the alert temporarily if it's noisy or already under investigation.

{% figure %}
![Topline Alerts table with active alerts](https://docs.statsig.com/images/product-analytics/topline-alerts-overview.png)
{% /figure %}
{% /step %}
{% /steps %}

## Diagnostics

Navigate to the **Diagnostics** tab to review alert history, inspect samples, open Metrics Explorer, or mute noisy alerts.

{% figure %}
![Diagnostics tab showing alert history](https://docs.statsig.com/images/product-analytics/topline-alerts-diagnostics.png)
{% /figure %}

---

## Related resources

- [Create a Topline Alert on log lines](https://docs.statsig.com/infra-analytics/topline-alerts-logs)
- [Set up team Slack notifications](https://docs.statsig.com/integrations/slack/#team-notifications)
