Integrations
How to setup Sentry integrations. Integrations connect the Sentry server with other services.
When working on integration development locally, your database contains important configuration that makes integrations work properly. If you run make reset-db
or need to delete your local environment, you lose all this setup and have to configure integrations from scratch. There are two scripts that help you backup and restore your local Sentry integration configuration and setup data.
These scripts allow you to:
- Backup: Save your current integration state to a JSON file
- Restore: Load the integration state back into a clean database
The scripts handle the following Sentry models in the correct dependency order:
IdentityProvider
- Authentication provider configurationsIntegration
- Integration instances and settingsIdentity
- User identity mappingsOrganizationIntegration
- Organization-specific integration configurations
- Sentry development environment set up locally
- Python environment with Sentry dependencies installed
- Access to your local Sentry database
There are two scripts (exist in sentry
and getsentry
):
save_integration_data
- Backs up integration dataload_integration_data
- Restores integration data
Before running make reset-db
or making any destructive changes, backup your current integration state:
# Navigate to your Sentry project directory
cd /path/to/sentry # or /path/to/getsentry
# Run the save script
bin/save_integration_data --output-file integration_backup.json
After your database is reset and ready, restore your integration configuration:
# Basic restore (preserves original organization IDs)
bin/load_integration_data --input-file integration_backup.json
Or, if you need to change the organization ID:
# Restore and update organization ID for OrganizationIntegration objects
bin/load_integration_data --input-file integration_backup.json --org-id 123
After restoring, all the previous integration data will be restored and you can start using the integration for local development again.
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").