For hybrid deployments, alerts are available starting with v0.0.72. The Slack integration is available starting with v1.1.29.
Create an alert
Enable the Slack integration before creating an alert to send to a Slack channel.
- Go to Settings.
- Under Project, select Alerts.
- Click + Alert.
- Enter alert name.
- Configure alert conditions:
- SQL filter: Query that defines which logs trigger the alert.
- Interval: How often to check for matching logs (5 min, 30 min, 1 hr, 4 hr, 12 hr, 24 hr).
- Select action type: Webhook or Slack.
- Configure the action (see below).
- Click Test alert to verify configuration.
- Click Save.
Configure webhooks
Send JSON payloads to custom endpoints:- Select Webhook as the action type.
- Enter your webhook URL.
- Optionally add custom headers for authentication.
Webhook payload
Alerts send this JSON structure:- Log alerts to monitoring systems
- Create tickets in issue trackers
- Send formatted messages to communication tools
- Trigger automated responses or remediation
Configure Slack
Send messages directly to Slack channels:- Enable the Slack integration in your organization settings.
- Select Slack as the action type.
-
Select a Slack channel using the searchable dropdown. The channel list refreshes automatically every 7 days. To trigger a manual refresh, click Refresh channels.
If your channel doesn’t appear, you can enter its channel ID manually. To find a channel ID in Slack:
- Right-click the channel name.
- Click View channel details.
- Scroll to the bottom and copy the channel ID.
Large workspaces
For workspaces with more than 100,000 channels, the channel list shows the most recently active channels. If your target channel doesn’t appear, use the manual channel ID entry option.Slack alert format
Slack alerts include:- Alert name and description.
- Number of matching logs.
- Time range.
- Link to view matching logs in Braintrust.
Write SQL filters
Filters define which logs trigger alerts. Use SQL to match specific conditions:Error alerts
Quality thresholds
High-cost requests
Specific users or features
Combined conditions
Test alerts
Before saving, test alerts to verify they work:- Click Test alert in the alert configuration.
- Braintrust runs the filter on recent logs.
- If matching logs exist, a test payload is sent.
- Check your webhook endpoint or Slack channel for the test message.
- Adjust your BTQL filter to match actual log patterns.
- Increase the alert interval to check more historical data.
- Verify logs are being sent to the project.
Common alert patterns
Error monitoring
Alert on any error in production:Quality degradation
Alert when average scores drop:Usage spikes
Alert when request volume exceeds normal levels. Use external systems to track historical rates and webhook alerts to capture spikes.Specific model issues
Alert on problems with a particular model:Next steps
- Manage data with export and retention automations
- View logs to understand alert triggers
- Monitor deployments with dashboards
- SQL reference for advanced filter queries