Alert Rules
Configure Sentry alert rule actions to automatically create BlameTrail incidents with custom severity, service targeting, and environment filters.
Sentry alert rules can trigger BlameTrail incident creation automatically. When a Sentry alert fires, BlameTrail creates an incident on the configured service with the severity and context you specify. This gives you fine-grained control over which Sentry conditions translate into BlameTrail incidents.
How it works
- You create an alert rule in Sentry with conditions that matter to your team (e.g., "new issue with 100+ events in 1 hour").
- In the alert rule's actions, you add the BlameTrail action.
- When the alert fires, Sentry sends a webhook to BlameTrail with the alert details and the configured action parameters.
- BlameTrail creates an incident on the specified service with the configured severity.
Adding a BlameTrail action to an alert rule
- In Sentry, go to Alerts and create or edit an alert rule.
- In the Actions section, click Add action.
- Select BlameTrail from the list of available actions.
- Configure the action:
| Field | Description | Default |
|---|---|---|
| Target Service | The BlameTrail service to create the incident on | Required |
| Severity | Override the incident severity | auto |
| Auto-create incidents | Whether to create incidents automatically | Enabled |
| Notes | Optional notes attached to the incident | Empty |
| Environment filter | Only create incidents for specific environments | All environments |
- Save the alert rule.
Severity options
The severity field controls the severity level assigned to the BlameTrail incident:
| Setting | Behavior |
|---|---|
auto | BlameTrail determines severity based on the alert level and event count |
critical | Always creates a critical-severity incident |
error | Always creates an error-severity incident |
warning | Always creates a warning-severity incident |
info | Always creates an info-severity incident |
Use explicit severity overrides when you know certain alert rules always represent a specific severity level. Use auto when you want BlameTrail to infer severity from the alert context.
Environment filter
The environment filter restricts which environments trigger incident creation. For example:
- Set to
productionto only create incidents for production alerts. - Leave empty to create incidents for all environments.
- Set to
production,staging(comma-separated) to match multiple environments.
The environment is extracted from the Sentry alert payload. If the alert does not include environment information, the filter is skipped and the incident is created regardless.
Auto-create toggle
When auto-create is enabled (the default), BlameTrail creates an incident every time the alert fires. When disabled:
- The alert webhook is received and logged.
- No incident is created automatically.
- The alert data is available for manual review.
This is useful for informational alerts where you want a record in BlameTrail without creating an actionable incident.
Notes field
The optional notes field attaches context to the incident. Use it to provide:
- Runbook links for the on-call team
- Context about why this alert matters
- Escalation instructions
Notes appear on the incident detail page in BlameTrail.
Example configurations
Critical production errors
Create an alert rule for new issues with more than 50 events in 10 minutes:
- Severity:
critical - Environment filter:
production - Notes:
High-volume error spike. Check application logs and recent deploys.
Warning-level regressions
Create an alert rule for regressed issues:
- Severity:
warning - Environment filter: (empty -- all environments)
- Notes:
Previously resolved issue has resurfaced.
Informational staging alerts
Create an alert rule for new issues in staging:
- Severity:
info - Environment filter:
staging - Auto-create: Disabled
- Notes:
Staging-only. Review before next production deploy.
Relationship to project mappings
Alert rule actions and project mappings are independent routing mechanisms:
- Project mappings route Sentry issue webhooks to BlameTrail services based on the Sentry project.
- Alert rule actions route Sentry alert triggers to BlameTrail services based on the action configuration.
You can use both together. For example, project mappings handle general issue tracking while alert rules handle specific high-severity conditions with custom severity overrides.