- Ensure this application is running (
make serve-typescript
ormake serve-python
) and has been installed on your organization in Sentry. - Link a Sentry issue with a kanban item
- This can be done via the issue webhooks or issue linking
- Once linked, open the issue details page in Sentry
- Go to the 'Activity' tab
- Trigger the
comment.created
webhook by leaving a comment on the activity log - Switch to the kanban app and refresh to see the new comment.
- Trigger the
comment.updated
webhook by hovering your comment, clicking the 'Edit' button, and submitting a change. - Refresh again to see the modification to the comment.
- Trigger the
comment.deleted
webhook by hovering your comment,clicking the 'Remove' button, and confirming. - Refresh one last time to verify that the comment has been deleted.
If you monitor server logs during the above issue webhook suite test, you should see something similar to the following:
Authorized: Verified request came from Sentry
Received 'comment.created' webhook from Sentry
Added new comment from Sentry issue
Received 'comment.updated' webhook from Sentry
Updated comment from Sentry issue
Received 'comment.deleted' webhook from Sentry
Deleted comment from Sentry issue
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, we drop comments that occur on Sentry issues that haven't been linked, with log similar to
Ignoring comment for unlinked Sentry issue
- In this example, we drop comments that occur on Sentry issues that haven't been linked, with log similar to
-
Act on the webhook
- Acting on every one of these webhooks in your application for a linked issue can create a 'comment-sync' experience for your user
- Leverage linking the issue as soon as it appears in Sentry via issue and alert. If you need more custom data, see the Alert Rule Action UI Component docs
-
Respond with an appropriate status code
- The integration dashboard in Sentry will reflect these status codes for more debugging help