Paste a Discord channel webhook.
You want a Discord channel to hear about a new error without adding a bot. errclue posts to a channel webhook URL. This page is that URL, the three rules that decide when a message goes out, and what the message leaves off.
Sentry Discord alerts via webhook
This is not Sentry's Discord integration, and it is not a bot. errclue posts a channel webhook.
Create the webhook
In Discord, create a webhook for the channel under channel settings, then Integrations, then Webhooks. Server Settings, then Integrations, then Webhooks, creates the same URL.
Copy the URL. It starts with https://discord.com/api/webhooks/. On the project, open Notifications, choose Discord, and paste it.
This is the webhook URL. errclue does not use OAuth, and it does not add a bot.
The URL has to be https. Anything else is rejected with: Enter an https webhook URL. A private or local address is rejected when you save: That URL points at a private address. A username or password in the URL is rejected: Webhook URLs can't include a username or password.
A hostname that looks public is checked again when a message is sent. If it resolves to a private address, the message is not delivered.
What the channel receives
The message is three blocks: a first line, one sentence, then the link to the issue. The first line is the issue label, an optional prefix, and the issue title. A new issue has no prefix.
When the diagnosis succeeded, the sentence is that summary. When it failed, the sentence is the failure reason. When neither was saved, the sentence is: No diagnosis text was saved for this issue.
CK-12 NoMethodError
user.subscription is likely nil for users mid-signup — there's no null check before .plan on line 41. Add a guard, or eager-load the subscription.
https://<host>/app/<org>/<project>/issues/12Discord reads a single JSON field, content. errclue does not send an embed.
{
"content": "CK-12 NoMethodError\n\nuser.subscription is likely nil for users mid-signup — there's no null check before .plan on line 41. Add a guard, or eager-load the subscription.\n\nhttps://<host>/app/<org>/<project>/issues/12"
}What stays on the issue
The sentence in the message is the diagnosis summary, as one block of text.
The confidence score and the severity are not in the channel message. They stay on the issue page, with the file and the nearby lines. The card below is an illustration of that issue, not a recorded customer event.
user.subscription is likely nil for users mid-signup — there's no null check before .plan on line 41. Add a guard, or eager-load the subscription.
When a message is posted
Each project has three rules: New issue, Regression, and Event frequency. A rule stays off until you turn it on and save it.
You can save a rule before any webhook exists. Nothing is posted until a Slack or Discord webhook is saved under Notifications. Deleting those webhooks leaves the rules in place.
New issue posts the first diagnosis for an issue. Generate on an issue posts again while this rule is on, and that action does not filter by environment. A later automatic diagnosis, after one has already succeeded, does not post again.
Regression posts when a resolved issue is opened by an event that arrived after it was resolved. The prefix is Regressed, so the first line reads: CK-12 Regressed NoMethodError. The sentence is the diagnosis already saved, or: This resolved issue came back.
Event frequency posts once, when an unresolved issue reaches the count inside the window. The windows are 5 minutes, 15 minutes, 1 hour, 24 hours. The default is 10 events in 1 hour.
The prefix counts minutes, so the first line reads: CK-12 10 events in 60 minutes NoMethodError. The sentence is the saved diagnosis, or: This issue crossed the event threshold. The same issue does not post again for this rule.
Leave the environment list empty and the rule matches every environment. A filled-in name has to equal the event's environment, including case. If the list is set and the event has no environment, New issue and Regression do not post. Frequency only counts events whose environment is on the list. Generate ignores the list.
How to tell it worked
Turn on New issue, save one public https webhook, and send a test exception. The channel shows the label, the title, one sentence, and a link. Open that link for the score and the severity.
Create an account. Open the project, then Notifications, and save the webhook.
Related
Slack uses the same rules. Paste a Slack Incoming Webhook.
Changing the DSN is the other half. Migrate from Sentry.
JavaScript still needs an uploaded source map before the nearby lines exist. Upload source maps.
A webhook is the alert layer a small team usually wants. Read the Sentry self-hosted comparison.