You can now set observability alerts and get notified when model costs exceed limits, error rates climb, or eval scores drop. Send notifications to Slack, Discord, Microsoft Teams, email, webhooks, PagerDuty, or incident.io.
You can configure alerts for:
- Errors and volume: error rate, number of errors, total count of matching traces or spans.
- Latency: duration, time to first token, time to first chunk.
- Token usage: total, input, output, reasoning, cached tokens.
- Cost and eval scores: spend, the average score from a scorer you choose.
You could already create incident alerts in Mastra Platform to find out when a deploy failed or a service crashed. Observability alerts let you know when your agents' behavior falls outside the limits you set, even when the service is running normally. You get an alert before your bill gets too high or a user reports a problem.
Previously, you could watch the Metrics page yourself or export traces and build an alert in a tool like Datadog or Grafana. Now you can create alerts directly in Mastra Platform.
Get started
Set up your app to send traces to Mastra Platform. Run your agent and check that you can see its traces in your project.
Open the Mastra Platform dashboard and choose Alerts from the sidebar menu. Select New alert, then Observability alert, and choose a template.
For example, choose Tool failures to monitor how often each tool fails.
For your own alert, choose your project, set a threshold, and pick where to send notifications.
You can check the threshold across all matching traffic, or separately for each agent, tool, model, or user.
Use the Backtest chart to see when the rule would have opened and closed on recent traffic.
Adjust the threshold if needed, then select Create alert. Mastra checks enabled rules every five minutes.
To write your own query and condition from scratch, select Start blank instead of a template.
You can also create an alert from the Metrics dashboard. Just click the bell icon on a chart.
For more information and full configuration options, see:

