Sentry
The PDC service can report unexpected errors to Sentry. It is off unless
SENTRY_DSN is set.
Configuring a Deployment
Set these on each deployment’s DigitalOcean app, as environment variables of
its service component:
SENTRY_DSN: the Sentry project’s client key.SENTRY_ENVIRONMENT: the deployment’s environment name, such as
productionorsandbox. Always set it alongsideSENTRY_DSN; without it,
reports are filed underproduction.
src/sentry.ts limits what Sentry collects. Sentry collects any kind of
data that file does not mention, so check Sentry’s release notes for new kinds
of data whenever @sentry/node is upgraded.
Local Development
Don’t set SENTRY_DSN locally. To see errors the way Sentry would, without
sending them anywhere, use Spotlight:
- Run
npx @spotlightjs/spotlightand openhttp://localhost:8969. - Set
SENTRY_SPOTLIGHT=1. - Run
npm run startornpm run migrateas usual.
Any new entry point must call initSentry() before doing anything else, as
src/index.ts does.
This content was automatically generated from GitHub. Any edits made on WordPress will be lost.