Skip to content

Discord ​

ErrLens posts to Discord using a channel webhook. The URL points at one channel in one server; ErrLens sends one embed per alert.

What it looks like ​

Each delivery becomes one embed:

  • Title — New issue in <project>: <title> (linked to the ErrLens issue page)
  • Side colour — level-coded (red for error/fatal, amber for warning, blue for info, grey for debug)
  • Description — culprit in monospace
  • Inline fields — Level, Times seen, Environment, Release
  • Footer — Project <name> · ErrLens <event-kind>
  • Timestamp — the occurred_at field

The message's username is set to ErrLens so it's distinguishable from other webhook bots in the same channel.

Create the Discord webhook ​

  1. Open the channel the alerts should land in → click the ⚙️ next to the channel name → Integrations.
  2. Webhooks → New Webhook.
  3. Name it ErrLens (or whatever). Pick the channel (auto-filled).
  4. Click Copy Webhook URL. The URL looks like https://discord.com/api/webhooks/123456789/abcDEF....

Add it to ErrLens ​

  1. Open Org alerts (or a project's Alerts tab).
  2. Click Add destination → pick Discord.
  3. Paste the webhook URL → set a destination name → save.
  4. Click Send test event to confirm the embed renders in the right channel.

Quirks ​

  • Embed limits: Discord truncates field values at 1024 characters and the embed title at 256. ErrLens columns are well within these in practice, but a pathological culprit string can be cut.
  • Rate limiting: Discord allows ~30 requests/minute per webhook with per-channel global limits. The dispatcher backs off on 429 automatically.
  • No HMAC signing. Discord webhooks don't validate custom signature headers; ErrLens omits X-ErrLens-Signature for this kind.

Troubleshooting ​

  • No message arrives: try Send test event first. Discord's webhook URLs are public-shareable but channel-bound — if someone deleted the webhook, the URL 404s. Re-create it in Integrations → Webhooks.
  • Wrong server / channel: webhook URLs are channel-scoped at creation time. Moving the destination is "create new webhook → replace URL in ErrLens".