How to migrate from Sentry to GlitchTip
Import the Sentry organisation, move each DSN one service at a time, point source map uploads at GlitchTip, rebuild alerts and cron checks, then close Sentry.
In short
- GlitchTip accepts events from the Sentry SDKs, so each application keeps its code and changes the DSN it reports to, one service at a time.
- GlitchTip’s import command copies the Sentry organisation, members, teams and projects with their client keys; issue history and alert rules stay behind.
- Session Replay, profiling, release health and Crons check-ins are ignored at ingest, and heartbeat monitors take the place of cron checks.
- Source map uploads move to glitchtip-cli or keep sentry-cli with its URL pointed at GlitchTip, and a deliberate error in staging proves the stack trace resolves.
On this page (9)
Moving from Sentry to GlitchTip is a re-pointing of clients, not a data migration. GlitchTip accepts events from the Sentry SDKs, so no application changes its instrumentation: each one changes the DSN it reports to. What moves around that is configuration. An import command copies the organisation, its people and projects; source map uploads in CI are pointed at the new host; alert rules and cron checks are rebuilt by hand. Issue history stays in Sentry. This guide covers the order we run it in, and the places it usually goes wrong.
Why teams move from Sentry to GlitchTip
Sentry is a strong product, and the teams that leave it usually do so for three reasons.
- What an error event carries. A stack trace comes with URLs, headers, user identifiers, breadcrumbs and sometimes the values of local variables. With GlitchTip on your own machines, those events are stored in the country you choose, and ingest scrubbing can redact secrets and card numbers before anything is written.
- A smaller system to run. GlitchTip is a Django application on PostgreSQL, with Valkey as an optional cache and queue. Self-hosted Sentry, the closer match on features, runs Kafka, ClickHouse, Snuba and Relay among dozens of containers.
- A licence without conditions. GlitchTip is MIT-licensed, with no paid edition and no bill per event once you run it yourself. Sentry’s server is source-available under the Functional Source License, which allows internal use.
What you give up is real. Session Replay, profiling and release health have no counterpart and are ignored at ingest. Crons check-ins give way to heartbeat monitors. Alerts are simpler: GlitchTip counts events per issue, with no metric alerts on error rates or response times. If your teams rely on replay or profiling, self-hosted Sentry is the closer fit. And someone has to run GlitchTip, which is the part Pilae takes on.
Step 1: list projects, DSNs and alerts in Sentry
The import brings the structure across. Everything around it has to be listed first, and Sentry’s API does most of the listing. Create a personal token from the Personal Tokens page under the account menu, with read access to the organisation, its projects, members, teams and alerts.
- Projects:
GET /api/0/organizations/{org}/projects/lists every project. - Client keys:
GET /api/0/projects/{org}/{project}/keys/returns each project’s keys with their DSNs. Record which DSN each service and environment uses today; it is the list step 4 works through. - Alerts and monitors: on sentry.io, the Monitors & Alerts API lists alerts with Fetch Alerts (
GET /api/0/organizations/{org}/workflows/) and monitors with Fetch an Organization’s Monitors (GET /api/0/organizations/{org}/detectors/). Each alert comes back with its triggers, conditions and actions. Cron monitors are in the Crons API, under Retrieve Monitors for an Organization. - Teams and members: List an Organization’s Teams and List a Team’s Members give the ownership the import should reproduce.
- In the code and CI: where each service sets its DSN, its sample rates, which SDK features it turns on (tracing, Session Replay, profiling, cron check-ins), and every pipeline step that runs
sentry-clior a Sentry bundler plugin with aSENTRY_AUTH_TOKEN. - Integrations: the Slack workspaces, issue trackers and webhooks Sentry posts to.
| Sentry | GlitchTip |
|---|---|
| Organisation, teams, members | Organisation, teams, members, through the import command |
| Project and client keys (DSN) | Project and client keys, IDs kept by the import command |
| Errors and issues | Errors and issues |
| Tracing | Performance: transactions and their spans |
| Logs | Logs, from the Sentry SDK or over OpenTelemetry |
| User Feedback | User reports |
| Releases and deploys | Releases and deploys, through glitchtip-cli or sentry-cli |
| Source maps and debug files | Source maps, artifact bundles with debug IDs, debug files |
| Issue alerts | Project alerts: a number of events per issue in a timespan |
| Metric alerts | No equivalent |
| Uptime monitors | Uptime monitors: Ping, GET, POST, TCP port and SSL |
| Crons | Heartbeat monitors |
| Release health (sessions) | Ignored at ingest |
| Session Replay and profiling | Ignored at ingest |
| Issue history | Stays in Sentry |
Step 2: import the organisation into a scratch instance
GlitchTip’s import management command reads Sentry’s API and creates the organisation, its members with user accounts, its projects with their client keys, and its teams with their members and projects. Run it as a server administrator, in the GlitchTip container:
# On a scratch instance first. The token is a Sentry personal token
# with read access to the organisation; keep it out of shell history.
./manage.py import https://sentry.example.com "$SENTRY_TOKEN" acme
The arguments are the Sentry address, the token and the organisation slug. The command first checks the token against the root of Sentry’s API and stops with “Bad auth token” if it is not tied to a user. Run this way, each project keeps its ID and its client keys, so a DSN should change only in its host. GlitchTip’s changelog points to this command for exactly that reason: organisation admins can also import through GlitchTip’s API, but projects imported that way get new IDs and keys, so every DSN changes.
Two limits shape how we use it. Upstream verified the command against an older self-hosted Sentry, not sentry.io, so it runs first on a scratch instance, and we compare the members, projects, keys and team memberships it created with the lists from step 1 before running it for real on an empty production instance. Earlier GlitchTip releases could not bring members across with this command, so run it on a current release and check that every member is there. And it copies structure only: no events, issues, alert rules, releases, source maps, integrations or passwords. If your Sentry is self-hosted on a private network, GlitchTip refuses to call internal addresses unless GLITCHTIP_ALLOW_PRIVATE_IPS is set.
Step 3: set up sign-in, alerts and monitors
Sign-in. GlitchTip signs people in through django-allauth, and its documentation names Keycloak as an identity provider to configure through OpenID Connect. In the Django admin, under /admin/socialaccount/socialapp/, add a social application with the provider OpenID Connect, a provider ID, the name people will see on the button, the client ID and secret from your identity provider, and in Settings a JSON object whose server_url is the provider’s discovery URL. The callback to register in Keycloak is allauth’s, /accounts/oidc/<provider-id>/login/callback/ on your GlitchTip host. Then close self-registration with ENABLE_USER_REGISTRATION=False, and set ENABLE_SOCIAL_APPS_USER_REGISTRATION=True if colleagues who were not in Sentry should get an account on their first sign-in through the identity provider: by default it follows the first setting. Imported accounts carry an email address and a name, never a Sentry password, so check with one imported account that its first sign-in through the identity provider lands on that account, with its teams, before telling everyone.
Alerts. A GlitchTip project alert fires when an issue receives at least a set number of events within a set number of minutes, once per issue, optionally only for the environments you name. It can also fire when one of the project’s uptime monitors fails. Rebuild each Sentry alert from the step 1 list in those terms. Recipients can be email, Slack, Discord, Microsoft Teams, Google Chat, Zulip, ntfy, Feishu or a generic webhook, which covers Mattermost and Rocket.Chat. An alert with no recipient sends email, so the instance needs a working mail relay from the first day. Webhooks to internal services, such as a Mattermost on your network, need GLITCHTIP_ALLOW_PRIVATE_IPS, because GlitchTip blocks private addresses by default.
Monitors. Sentry’s uptime checks become GlitchTip uptime monitors, of type Ping (a HEAD request), GET or POST against a URL, or TCP Port or SSL. Sentry Crons become heartbeat monitors: GlitchTip shows a URL when the monitor is created, and the job sends a POST to it at the end of each successful run. The SDK’s own check-ins are ignored, so remove them from the job rather than leave them looking like they work. Link each monitor to a project whose alerts have uptime notifications switched on, or nobody hears that it went down.
Step 4: move the DSNs one service at a time
A Sentry SDK is initialised with one DSN, so an event goes to one place. The parallel run therefore moves by environment and by service rather than sending everything twice: staging first, then production one service at a time, each one moving with its alerts already in place in GlitchTip.
# Before: the DSN Sentry issued for the project
SENTRY_DSN=https://<public-key>@o<org-id>.ingest.sentry.io/<project-id>
# After: GlitchTip's host; check the key and project ID in the project's settings
SENTRY_DSN=https://<public-key>@errors.acme.ch/<project-id>
- Change configuration, not code. Server-side SDKs, Python’s among them, read the
SENTRY_DSNenvironment variable when no DSN is set in code. Where it is hard-coded, move it into configuration on the way. - Set sample rates first. GlitchTip’s SDK documentation advises a low trace sample rate in production to save disk space. Lower
traces_sample_rateortracesSampleRatebefore production traffic arrives, not after the first bad deploy, and switch off what GlitchTip ignores: its own JavaScript setup turns off session tracking. - Browsers and mobile apps report from the internet, so GlitchTip’s ingest endpoint has to be reachable from there. A mobile build carries its DSN inside it, so versions already installed keep reporting to Sentry until people update.
- Check each move with a real event in GlitchTip, from the service itself or with
glitchtip-cli send-event.
Step 5: point source map uploads and releases at GlitchTip
Without source maps, a minified JavaScript stack trace is unreadable, so every pipeline that uploads to Sentry changes in the same release as the DSN. GlitchTip reads Sentry’s artifact bundles and debug IDs, so with the debug IDs injected before the upload, source maps resolve without a release name.
- Keep sentry-cli. Set
SENTRY_URLto the GlitchTip host, as Sentry documents for self-hosted servers, andSENTRY_AUTH_TOKENto a GlitchTip token from Profile, Auth Tokens, with theproject:releasesscope.SENTRY_ORGmust be the organisation slug exactly as GlitchTip shows it: the upload routes match it case for case. - Or switch to glitchtip-cli, GlitchTip’s own MIT-licensed tool, which the project marks as beta. It reads the same
SENTRY_*variables and.sentryclircfiles, and covers source maps, releases, deploys and debug files. - Bundler plugins, such as Sentry’s Vite or webpack plugin, take the GlitchTip host in their
urloption or fromSENTRY_URL.
# CI step after the build
export SENTRY_URL=https://errors.acme.ch/
export SENTRY_AUTH_TOKEN="$GLITCHTIP_TOKEN" SENTRY_ORG=acme SENTRY_PROJECT=web-frontend
glitchtip-cli releases new "$GIT_SHA"
glitchtip-cli sourcemaps inject ./dist
glitchtip-cli sourcemaps upload ./dist --release "$GIT_SHA"
glitchtip-cli releases finalize "$GIT_SHA"
Then throw a deliberate error from staging and check that GlitchTip shows the original file and line. Once every pipeline has moved, revoke the Sentry tokens stored in CI.
Step 6: run both, then close Sentry
From the first DSN to a closed organisation
- Staging: Staging environments report to GlitchTip first, and source maps are proven there.
- Services: Production services move one by one, each triaged in GlitchTip from the day its DSN changes.
- Stragglers: Sentry projects that still receive events show what has not moved, such as an old mobile build or a forgotten job.
- Lookups: Sentry stays open for reading old issues until the last useful one has aged out.
- Close: Integrations and tokens are removed, the subscription cancelled and the organisation deleted.
Before the organisation goes, export anything you want to keep: Sentry’s API lists a project’s issues, and that list is the only record of them once Sentry deletes the data. Deleting a Sentry organisation does not cancel its subscription, so cancel first, under Settings, Subscription, Manage Plan, Cancel Subscription. Then an owner removes the organisation with Remove Organization at the bottom of its settings page. Sentry emails the scheduled date, the organisation can be restored until then, and after it the deletion is irreversible.
Running GlitchTip in production
GlitchTip is light, but a production instance still needs care in a few places.
- PostgreSQL holds issues, events, users and uptime checks, partitioned by date, so expiring old events drops a partition instead of running a long delete.
- Valkey is optional. Without it, PostgreSQL carries the task queue, cache and sessions, more slowly.
- Object storage for source maps, debug files and, with cold storage on, events archived as Parquet files.
- Retention, agreed before the first event: it decides the disk.
- A mail relay, because alerts and invitations go out by email.
- Upgrades read from the changelog. Migrations run on start, and releases rename settings: a retired retention variable is ignored with a warning, retention falls back to its default, and the next maintenance run deletes anything older.
Pilae operates GlitchTip this way: PostgreSQL with Valkey beside it and a bucket in the same region, ingest scrubbing on, sign-up closed and sign-in through Keycloak or your own identity provider over OpenID Connect. Only the ingest endpoints are published through the gate, for browsers and mobile apps, and the interface answers on your private network. PostgreSQL and the bucket are backed up together daily, encrypted, to an offsite location in the country your contract names, and on Enterprise a restore test every month is recorded in the console. Probes check the ingest endpoint every 60 seconds. The Pilae Agent tries each release on a copy and applies it in your window once you approve. It runs on your premises or on dedicated machines in Pilae Cloud.
Let Pilae run the move
Pilae runs Sentry to GlitchTip migrations at a fixed price: the inventory, the organisation import and its check, sign-in through your identity provider, alerts and monitors rebuilt, the DSN move service by service, the CI changes for source maps, the parallel run and the closing of the Sentry organisation. Then we operate GlitchTip for you under a contract that, from the Business plan, includes a monthly availability commitment with service credits. See migration services for what the fixed price covers, or tell us which services report to Sentry today and we will scope it.
Questions
Do our applications need new SDKs?
Does our issue history come across?
Do our DSNs change?
What replaces Sentry Crons?
Is GlitchTip open source?
How long does a Sentry to GlitchTip migration take?
Let us run the move for you
An inventory, a parallel run and a cutover plan, at a fixed price. Then we operate the app.
- Go deeperSaaS migrationA fixed-scope migration off Google Workspace, Microsoft 365, Zapier, Airtable and ChatGPT to open-source apps, with a parallel run and a cutover plan.
- CheckManaged operationsPatching, daily encrypted backups, monitoring and incident response for your open-source apps, under an SLA with an availability commitment of up to 99.9%.
