Sentry alerting
You can configure Grafana alerting rules that query the Sentry data source to receive notifications when error rates, event counts, or other Sentry metrics cross defined thresholds.
Before you begin
- Configure the Sentry data source.
- Understand Grafana Alerting.
Supported query types for alerting
Alert rules work with Sentry query types that return numeric or time-series data. The following query types are compatible with alerting:
Create an alert rule
To create an alert rule using the Sentry data source:
- Navigate to Alerting > Alert rules.
- Click New alert rule.
- Enter a name for the alert rule.
- Select the Sentry data source.
- Select a query type and configure the query fields. For example, select Events Stats and set a Y-axis field such as
count()to alert on event volume. - Define the alert condition using expressions. For example, use a Reduce expression to calculate the mean, then a Threshold expression to trigger when the value exceeds a limit.
- Configure the evaluation interval and pending period.
- Add labels and notifications as needed.
- Click Save rule and exit.
Alert rule examples
The following examples show common alerting scenarios with the Sentry data source.
Alert on high error event volume
Monitor for spikes in error events across your projects:
- Select Events Stats as the query type.
- Set Y-axis to
count(). - Set Query to
event.type:error. - Add a Reduce expression with function Last.
- Add a Threshold expression to alert when the value is above your desired limit.
Alert on unresolved issue count
Get notified when the number of unresolved issues exceeds a threshold:
- Select Issues as the query type.
- Set Query to
is:unresolved. - Set Limit high enough to capture all matching issues (for example,
100). - Add a Reduce expression with function Count to count the number of returned rows.
- Add a Threshold expression to alert when the count exceeds your limit.
Alert on slow transactions
Monitor for p95 latency regressions in a specific transaction:
- Select Events Stats as the query type.
- Set Y-axis to
p95(). - Set Query to
event.type:transaction transaction:<TRANSACTION_NAME>. - Add a Reduce expression with function Last.
- Add a Threshold expression to alert when the p95 value exceeds an acceptable duration in milliseconds.
Alert on crash rate changes
Monitor session crash rates using the Metrics query type:
- Select Metrics as the query type.
- Set Field to
session.crash_rate. - Optionally set Group By to
projectto monitor per-project crash rates. - Add a Reduce expression with function Last.
- Add a Threshold expression to alert when the crash rate exceeds an acceptable level (for example,
0.01for 1%).
Alert on declining crash-free session rate
Monitor when crash-free rates drop below a target:
- Select Metrics as the query type.
- Set Field to
session.crash_free_rate. - Add a Reduce expression with function Last.
- Add a Threshold expression to alert when the value drops below your target (for example,
0.995for 99.5%).
Alert on organization quota usage
Monitor organization-level event consumption to avoid quota overages:
- Select Stats as the query type.
- Set Field to
sum(quantity). - Set Category Filter to
error. - Add a Reduce expression with function Last.
- Add a Threshold expression to alert when usage approaches your quota limit.
Limitations
- Alert evaluation depends on the Sentry API response time. If the Sentry API is slow or rate-limited, alert evaluation may be delayed.
- Sentry API rate limits apply to alert rule evaluations. Set evaluation intervals that avoid exceeding rate limits, especially when multiple alert rules query the same Sentry data source.
- Issues, Events, and Spans queries return tabular data. To create numeric alert conditions from these, use Reduce expressions with functions like Count, Min, Max, or Mean.
For more information, refer to Grafana Alerting.


