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.

The alert rule is the important part
Sentry’s issue webhooks only send a title and a file name. Alert rules send the full error: the stack trace and the lines of code around each frame, which is what the investigation needs to find the root cause.

Before you start

  • Connect GitHub and add the project the errors come from (Connect GitHub).
  • In Second Shift, open Settings → Integrations, click the Sentry card, and choose the project under Webhook 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

  1. 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.

  2. Fill in the details
    FieldValue
    NameSecond Shift
    Webhook URLThe Webhook URL from Second Shift’s Sentry settings (it includes your organization and project)
    Alert ActionOn
    PermissionsIssue & Event: Read. Everything else: No Access
    WebhooksIssues: Created and Unresolved
  3. Save, then copy the Client Secret

    Click Save Changes. At the bottom of the page, under Credentials, copy the Client Secret. The Client ID isn’t needed.

  4. Paste the secret into Second Shift

    In Second Shift’s Sentry settings, paste it as Client Secret from Sentry and save. Sentry signs every request with it, and Second Shift rejects anything not signed with it.

2. Create the alert rule

  1. New issue alert

    In Sentry: Alerts → Create Alert → Issues, for the project to watch.

  2. When and then

    When: A new event is captured. If: Any event (or narrow it, for example to production only). Then: Send a notification via your Second Shift integration.

  3. Throttle to 5 minutes

    Set Action Throttle to 5 minutes, so a burst of the same error sends one webhook instead of hundreds. Repeats join the same incident either way.

  4. Test it

    Send Test Notification sends Sentry’s sample error. Within seconds an incident appears in Second Shift, and the Sentry row in Settings shows Receiving. Then save the rule with Create 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 SentryIn Second Shift
Alert rule firesOpens 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 archivedIgnored: those are people handling it

Check that it works

  • In Sentry: the integration’s Dashboard tab lists every webhook and Second Shift’s answer. 200 means received; 401 means 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.