This document will show you how to test this application's usage of the Sentry API and it's ability to refresh tokens.
- 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
- Link a Sentry issue with a kanban item
- This can be done via the issue webhooks or issue linking
- Once linked, refresh the kanban app.
- The linked issue should appear with a
SHORT-ID
instead of the numerical ID we save to the database- This is replaced on the frontend by using the API Token that has been issued to our installation
- To test token refreshing, modify the row in your database to manually expire the token.
- E.g. Postgres DB Client >
sentrydemo
(default) >sentry_installations
>expires_at
- E.g. Postgres DB Client >
- Now refresh the kanban app.
- If the
SHORT-ID
still appears as a badge, our token was successfully refreshed.
If you monitor server logs during the above install-uninstall test, you should see something similar to the following:
Token for leander-test has expired.
Token for 'leander-test' has been refreshed.
These logs are created as part of the primitive Sentry API Client we've included in the repository. Here is where you'll find the code responsible for token refresh as well. - Python Sentry API Client - TypeScript Sentry API Client
The only endpoint we enrich with Sentry API data is /api/items
, which populates the items in the kanban app.
- Python Sentry Data Usage
- TypeScript Sentry Data Usage