Skip to main content

Notifications

Get alerted when errors occur so you can respond quickly.

Notification Channels

Slack

Connect your Slack workspace:
  1. Go to Settings > Integrations
  2. Click “Add to Slack”
  3. Choose a channel
  4. Configure alert rules
Example Slack message:
🔴 New Error in production

PaymentError: Card declined
in app/services/payment_service.rb:45

Occurrences: 5 in last hour
Users affected: 3

View in Reflex →

Email

Configure email alerts:
  1. Go to Settings > Notifications
  2. Add email addresses
  3. Choose frequency:
    • Instant - Every new error
    • Hourly digest - Summary every hour
    • Daily digest - Summary every day

Webhooks

Send to any HTTP endpoint:
{
  "event": "error.created",
  "error": {
    "id": "err_123",
    "title": "PaymentError: Card declined",
    "url": "https://reflex.brainzlab.ai/errors/123",
    "occurrences": 5,
    "users_affected": 3,
    "environment": "production"
  }
}

PagerDuty

For on-call alerting:
  1. Go to Settings > Integrations
  2. Add PagerDuty integration key
  3. Configure severity mapping

Alert Rules

Create rules to control when alerts fire:

By Error Count

trigger: occurrences
threshold: 10
window: 1 hour
action: notify slack

By User Impact

trigger: users_affected
threshold: 5
window: 15 minutes
action: page oncall

By Environment

environment: production
trigger: any new error
action: notify slack, email

By Error Type

exception: PaymentError
trigger: any occurrence
action: page oncall

Alert Frequency

Control how often you’re notified:
SettingBehavior
Every occurrenceAlert on each error
Once per errorAlert only on first occurrence
ThresholdAlert when count exceeds threshold
DigestSummarize at intervals

Cooldown Period

Prevent alert fatigue:
cooldown: 30 minutes
# After alerting, wait 30 min before alerting again
# for the same error

Smart Alerts

Reflex can detect anomalies:

Spike Detection

Alert when error rate is abnormally high:
trigger: spike
baseline: last 7 days
threshold: 3x normal
action: notify

New Error Detection

Alert only on truly new errors:
trigger: new error
# Ignores known errors, only alerts on new ones
action: notify

Regression Detection

Alert when resolved errors recur:
trigger: regression
action: page assignee

Routing

Route alerts based on error attributes:
rules:
  - match:
      tags.team: payments
    notify: #payments-alerts

  - match:
      tags.team: auth
    notify: #auth-alerts

  - match:
      environment: staging
    notify: #staging-alerts

  - default:
    notify: #engineering-alerts

Muting

Temporarily disable alerts:

Mute All

During maintenance:
  1. Go to Settings > Notifications
  2. Click “Mute All”
  3. Set duration

Mute Specific Error

For known issues:
  1. Click on error
  2. Click “Mute”
  3. Set duration

Scheduled Mutes

For regular maintenance windows:
mute:
  schedule: "0 2 * * *"  # 2 AM daily
  duration: 1 hour
  reason: "Nightly maintenance"

Testing

Test your notification setup:
  1. Go to Settings > Notifications
  2. Click “Send Test”
  3. Verify you receive the alert

Audit Log

View notification history:
  • When alerts were sent
  • Which channel received them
  • Delivery status
  • Click-through rate