Documentation menu

Discord

An embed — title, body, severity colour and a link back to the incident — in a Discord channel for every alert that fires. Suited to a team that keeps its operations in Discord.

This is a notification channel for the metrics module, and a Business plan feature. Event destinations are a separate feature.

Connecting

Two ways, under Metrics → Channels:

  • Connect Discord — opens Discord's own picker; choose the channel and Discord creates the webhook and hands it back. Nothing to copy. Available when the deployment has configured a Discord application (SPM_DISCORD_CLIENT_ID / SPM_DISCORD_CLIENT_SECRET with the webhook.incoming scope and the /api/v1/discord/callback redirect).
  • Add a channel → Discord — paste a webhook URL yourself: channel's Edit → Integrations → Webhooks → New Webhook → Copy Webhook URL. The URL looks like https://discord.com/api/webhooks/… and is stored in the vault, never shown again.

The webhook URL is the credential — anyone who has it can post to that channel — so whichever way it arrives it is envelope-encrypted, and a delivery only ever names the channel row it was sent for.

The message

{
  "content": "",
  "embeds": [{
    "title": "◆ Alert firing: API latency",
    "description": "p95 of api.request.duration is above 500 (currently 912.50)…",
    "url": "https://saaspro.dev/o/acme/apps/site/metrics/incidents",
    "color": 15684432,
    "footer": { "text": "Severity critical · SaaS Pro Max" }
  }]
}

One embed per notification: the severity glyph in the title, the body as the description (cut at Discord's 4096-character limit), the incident as the embed link, and the accent colour taken from the severity — blue, amber or red.

Verifying

Press Send test. A "Test notification" embed arrives in the channel. A failed delivery records the HTTP status — HTTP 401 for a deleted webhook, HTTP 404 for a URL that is no longer valid — and is retried by nothing: the alert moves on to its other channels.

Limitations

  • Discord caps webhook posts at about 30 per minute per channel; a noisy rule is better routed to a signed webhook.
  • The webhook posts as the name and avatar chosen when it was created — SaaS Pro Max does not override them.