Alert sources
Connect Sentry
Errors Sentry captures become incidents in Second Shift, investigated within seconds. You create one internal integration in Sentry and one alert rule. Takes about 10 minutes.
Before you start
- Connect GitHub and add the project the errors come from (Connect GitHub).
- In Second Shift, open
Settings → Integrations, click theSentrycard, and choose the project underWebhook URLs for project. Keep this page open: you’ll copy the webhook URL from it and paste the secret into it.
1. Create the integration in Sentry
- Open custom integrations
In Sentry:
Settings → Custom Integrations → Create New Integration → Internal Integration.Choose Internal, not Public. An internal integration is installed in your organization automatically; a public one sends nothing until it is installed.
- Fill in the details
Field Value Name Second Shift Webhook URL The Webhook URL from Second Shift’s Sentry settings (it includes your organization and project) Alert Action On Permissions Issue & Event: Read. Everything else: No Access Webhooks Issues: Created and Unresolved - Save, then copy the Client Secret
Click
Save Changes. At the bottom of the page, underCredentials, copy the Client Secret. The Client ID isn’t needed. - Paste the secret into Second Shift
In Second Shift’s Sentry settings, paste it as
Client Secret from Sentryand save. Sentry signs every request with it, and Second Shift rejects anything not signed with it.
2. Create the alert rule
- New issue alert
In Sentry:
Alerts → Create Alert → Issues, for the project to watch. - When and then
When:
A new event is captured. If:Any event(or narrow it, for example to production only). Then:Send a notification viayour Second Shift integration. - Throttle to 5 minutes
Set
Action Throttleto 5 minutes, so a burst of the same error sends one webhook instead of hundreds. Repeats join the same incident either way. - Test it
Send Test Notificationsends Sentry’s sample error. Within seconds an incident appears in Second Shift, and the Sentry row in Settings showsReceiving. Then save the rule withCreate Alert.
3. Recommended: turn on data scrubbing
Sentry events can include your end users’ details (email, IP address) and request data. Second Shift drops all of that when an alert arrives and keeps only the error and its stack trace (see Your data), but less leaving Sentry is better. In each Sentry project, open Settings → Security & Privacy and turn onData Scrubber and Use Default Scrubbers.
What opens an incident
| From Sentry | In Second Shift |
|---|---|
| Alert rule fires | Opens an incident, or joins the open one for the same Sentry issue |
| New issue (Issues: Created) | Opens an incident |
| Issue comes back (Unresolved) | Opens an incident again if the previous one was resolved |
| Issue resolved, assigned or archived | Ignored: those are people handling it |
Check that it works
- In Sentry: the integration’s
Dashboardtab lists every webhook and Second Shift’s answer.200means received;401means the Client Secret in Second Shift doesn’t match this integration. - In Second Shift: the Sentry row shows
Receiving · last event 2m ago. More in Troubleshooting.