Move from Sentry
Point an app that sends to Sentry at Error Tracking by changing its DSN and its auth token, and see what stays behind.
The Sentry SDKs need no other change than the DSN. For source maps, sentry-cli and
withSentryConfig need only a new SENTRY_AUTH_TOKEN.
Prerequisites
- A project (see Create a project), which needs
errors:CreateProject. - For source maps, a token (see Upload source maps), which needs
iam:CreateAccessKeyanderrors:UploadSourceMaps.
Switch the app
- Replace the DSN in
Sentry.init({ dsn }), or inSENTRY_DSN, with the project's DSN. - For source maps, put a token from the project's Setup tab into
SENTRY_AUTH_TOKEN. The token carries the Error Tracking URL and your organization, sosentry-cliandwithSentryConfigsend to Deutsche Cloud withoutSENTRY_URL. Yourorgandprojectsettings may stay as they are. - (Optional) In
withSentryConfig, setsentryUrlto the Sentry URL (sentry-cli) the Setup tab shows. Uploads work without it; with it, the bundler plugin also stops sending its own telemetry to sentry.io.
An app deployed on Deutsche Cloud can skip all three: connect it instead (see Connect an app).
A tunnel route (an app that forwards browser envelopes through its own server, including
withSentryConfig({ tunnelRoute })) keeps working: the DSN has no path, so the envelope endpoint
derived from it, https://errors.<domain>/api/<project number>/envelope/, is right. The ingest also
reads the DSN from the envelope's own header, which is how a tunnel forwards it.
Send to both while you compare
To compare before switching, send every browser envelope to a second client as well:
import * as Sentry from '@sentry/nextjs';
Sentry.init({ dsn: process.env.SENTRY_DSN }); // your Sentry project, unchanged
const second = new Sentry.BrowserClient({
dsn: process.env.NEXT_PUBLIC_ERRORS_DSN, // this project's DSN
transport: Sentry.makeFetchTransport,
stackParser: Sentry.defaultStackParser,
integrations: [],
});
Sentry.getClient()?.on('beforeEnvelope', (envelope) => void second.getTransport()?.send(envelope));What does not come over
- History. Existing issues, their resolved or ignored state, assignees and comments stay in Sentry. Issues start fresh here. Grouping follows Sentry's rules closely but not exactly, so one Sentry issue may become two here or the other way round (see Issues and grouping).
- Inbound filters and server-side data scrubbing of error events: scrub in
beforeSendand keepsendDefaultPii: false. - Data of kinds not supported yet, such as Session Replay, cron check-ins and logs (see Not supported). The ingest answers those items with a one-hour rate limit for their category, so the SDK stops spending CPU and bandwidth on them.