DebugBundle
CLI

Alert Management

Configure alert channels and conditions with the DebugBundle CLI.

The CLI provides CRUD operations for alert rules. Alerts notify your team through various channels when incident conditions are met.

Manual incident capture works with alerts. If your application calls captureException() or another incident-driving SDK method, the resulting incident can trigger new_incident alerts the same way as an unhandled exception.

Channels

ChannelDescriptionConfig Required
emailEmail notification to one recipientto
slackSlack channel messageslack_destination_id or webhook_url
discordDiscord webhook messagewebhook_url
webhookGeneric alert webhooktarget_url

Condition Types

ConditionTrigger
new_incidentA new incident is created.
incident_regressedA previously resolved incident regressed.
error_spikeAn unusual spike in incident occurrences is detected.
severity_thresholdAn incident's severity meets or exceeds the configured minimum.
regression_after_deployA regression is correlated to a deployment.

List Alerts

debugbundle alert list --project-id proj_01HXYZ...

Output:

{
  "alerts": [
    {
      "alert_id": "alt_01HABC...",
      "project_id": "proj_01HXYZ...",
      "channel": "slack",
      "condition_type": "new_incident",
      "service_id": null,
      "severity_min": "high",
      "cooldown_seconds": 86400,
      "is_enabled": true,
      "config": {
        "slack_destination_id": "11111111-1111-4111-8111-111111111111"
      }
    }
  ]
}
FlagTypeDefaultDescription
--project-idstringRequired. Project to list alerts for.
--limitnumber20Maximum number of alerts to return.
--auth-filestring~/.debugbundle/auth.jsonPath to auth state file.
--jsonbooleanfalseOutput as JSON.

Create Alert

Email Alert

debugbundle alert create \
  --project-id proj_01HXYZ... \
  --channel email \
  --condition new_incident \
  --severity-min high \
  --cooldown 86400 \
  --config-json '{"to": "oncall@mycompany.com"}'

Slack Alert

debugbundle alert create \
  --project-id proj_01HXYZ... \
  --channel slack \
  --condition error_spike \
  --config-json '{"slack_destination_id": "11111111-1111-4111-8111-111111111111"}'

Discord Alert

debugbundle alert create \
  --project-id proj_01HXYZ... \
  --channel discord \
  --condition severity_threshold \
  --severity-min critical \
  --config-json '{"webhook_url": "https://discord.com/api/webhooks/..."}'

Generic Webhook Alert

debugbundle alert create \
  --project-id proj_01HXYZ... \
  --channel webhook \
  --condition regression_after_deploy \
  --severity-min high \
  --config-json '{"target_url": "https://myapp.com/alerts"}'

Create Options

FlagTypeDefaultDescription
--project-idstringRequired. Project to create the alert for.
--channelstringRequired. Alert channel: email, slack, discord, webhook.
--conditionstringRequired. Condition type: new_incident, incident_regressed, error_spike, severity_threshold, regression_after_deploy.
--service-idstringScope alert to a specific service.
--severity-minstringMinimum severity to trigger: low, medium, high, critical.
--cooldownnumber0Notification cooldown in seconds. Use 0 to disable suppression; maximum is 604800 (7 days).
--config-jsonstringRequired. Channel-specific configuration as JSON string.
--is-enabledbooleantrueWhether the alert is active.
--auth-filestring~/.debugbundle/auth.jsonPath to auth state file.
--jsonbooleanfalseOutput as JSON.

--severity-min high does not match low-confidence opaque browser-native captures by default: opaque window_error infers low, and opaque resource_error infers medium.

Update Alert

debugbundle alert update alt_01HABC... \
  --project-id proj_01HXYZ... \
  --severity-min critical \
  --cooldown 0 \
  --is-enabled true

Partial update — only the specified fields are changed.

FlagTypeDescription
--project-idstringRequired. Project that owns the alert.
--channelstringUpdate channel type.
--conditionstringUpdate condition type.
--service-idstringUpdate service scope (use null to clear).
--severity-minstringUpdate minimum severity (use null to clear).
--cooldownnumberUpdate notification cooldown in seconds. Use 0 to disable suppression.
--config-jsonstringUpdate channel configuration (use null to clear).
--is-enabledbooleanEnable or disable the alert.
--auth-filestringPath to auth state file.
--jsonbooleanOutput as JSON.

Delete Alert

debugbundle alert delete alt_01HABC... --project-id proj_01HXYZ...

Permanently removes the alert rule. No further notifications are sent.

Channel Configuration Reference

Email

{
  "to": "oncall@mycompany.com"
}

Each email alert rule targets a single recipient. Create additional rules if more people should receive email notifications. Email deliveries are batched into 10-second per-project, per-recipient digests so sudden incident bursts send one summary email instead of one message per incident.

Notification Cooldowns

Alert rules can set a notification cooldown so repeated matches for the same notification key do not send immediately again. The CLI flag is --cooldown <seconds>, where 0 disables suppression and the maximum is 604800 seconds (7 days). Cooldowns suppress notifications only; they do not merge incidents or change incident grouping.

Slack

Preferred connected destination configuration:

{
  "slack_destination_id": "11111111-1111-4111-8111-111111111111"
}

Direct webhook configuration is still available for automation that intentionally manages its own Slack webhook:

{
  "webhook_url": "https://hooks.slack.com/services/T.../B.../xxx"
}

For the simplest setup, use debugbundle slack connect-url to complete Slack OAuth in a browser, then reference the returned destination ID in alert rules.

Slack Destinations

Connected Slack destinations let agents and developers reuse the same Slack channel without exposing webhook URLs in alert configuration.

debugbundle slack connect-url --project-id proj_01HXYZ...
debugbundle slack list --project-id proj_01HXYZ...
debugbundle slack test 11111111-1111-4111-8111-111111111111 --project-id proj_01HXYZ...
debugbundle slack delete 11111111-1111-4111-8111-111111111111 --project-id proj_01HXYZ...

slack connect-url prints a browser URL for Slack OAuth and channel selection. slack delete remains available after downgrade and only succeeds once no alert rule or weekly report still references the destination. slack list remains readable after a downgrade to Free so preserved destination setup is still visible while Slack delivery stays paused.

Discord

{
  "webhook_url": "https://discord.com/api/webhooks/..."
}

Webhook

{
  "target_url": "https://myapp.com/alerts"
}

Next Steps

On this page