- Ensure this application is running (
make serve-typescript
ormake serve-python
) and has been installed on your organization in Sentry. - Select an organization's kanban to view
- Trigger the
issue.created
webhook by clicking 'Send Error to Sentry'- Use the input field to change the name of the error. If the name is changed, a new issue shall be created, rather than adding an event to the same issue.
- Note: You may need to disable your adblocker for this button to work as intended!
- Soon after, you can refresh the kanban to see a new item appear from the webhook firing.
- Open Sentry, and navigate to Issues
- Filter by selecting the project you created to this app's DSN (See README, Step 2)
- Find and select the new error you triggered ('Test Error #1' by default)
- Trigger the
issue.assigned
webhook by selecting an assignee in the dropdown- Note: These webhooks only fire on the transition from Unassigned -> Assigned, not a change of assignee
- Refresh the kanban to verify that they now appear assigned to a user
- Trigger the
issue.resolved
webhook by clicking the resolve button - Refresh the kanban to verify that the item's column has now been shifted to 'Done'
- Trigger the
issue.ignored
webhook by clicking the ignore button - Refresh one last time to verify the item appears translucent in the kanban.
If you monitor server logs during the above issue webhook suite test, you should see something similar to the following:
# When an issue appears in Sentry for the first time
Authorized: Verified request came from Sentry
Received 'issue.created' webhook from Sentry
Created linked Sentry issue
# When a Sentry issue transitions from Unassigned to Assigned
Authorized: Verified request came from Sentry
Received 'issue.assigned' webhook from Sentry
Found linked Sentry issue
Assigned to existing user: name@example.com
# When a Sentry issue is marked as resolved
Authorized: Verified request came from Sentry
Received 'issue.resolved' webhook from Sentry
Found linked Sentry issue
Updated item's column to DONE
# When a Sentry issue is ignored
Authorized: Verified request came from Sentry
Received 'issue.ignored' webhook from Sentry
Found linked Sentry issue
Marked item as ignored
Broadly, the steps in handling these webhooks are as follows:
- Verify the signature. The authorization comes from verifying the request signature with the shared secret
- Logging the type of webhook the application is receiving before handling it. This is helpful just for debugging and sanity checking.
- Pass the webhook along to a dedicated handler to keep the webhook endpoint clean
- Check if the issue exists in our application
- In this example, it's checking if we already have a ticket for the issue, and creating one if not
- Act on the webhook
- You can perform the whatever actions make sense for your application based on the webhook
- In this reference implementation, we're changing the properties of the tickets in the kanban board
- Respond with an appropriate status code
- The integration dashboard in Sentry will reflect these status codes for more debugging help
We haven't added any functionality for the error.created
webhook in this application due to the volume at which it can trigger. If enabled for your integration, you will see the following logs and nothing else:
Received 'error.created' webhook from Sentry
If you choose to use these webhooks, keep in mind that both you the integrator, and any users installing your integration, will require at least a Business plan. These webhooks trigger on every occurance of every issue processed by Sentry, so keep that in mind when building out your app-specific features.