Keys / Sentry

SENTRY_DSN

The address your app sends errors and traces to in one Sentry project. Sentry says it's safe to make public: it can only send events.

Expires
no expiry setting
API
create, disable and delete client keys, with an auth token

Get it

Create one on sentry.io/orgredirect/organizations/:orgslug/settings/projects/:projectId/keys. The steps aren't recorded yet.

Set it

SENTRY_DSN=...

The Python, Node.js, Go, Ruby, PHP and .NET SDKs read it from this variable when you don't pass a DSN. Java reads it when you call Sentry.init() with no options. Browser SDKs don't. Or keep it out of .env with keypin: keypin run -- npm run dev

Replace it

  1. In the project's Client Keys (DSN) settings, create a new key.
  2. Deploy its DSN everywhere that reads SENTRY_DSN.
  3. Check that nothing still sends with the old key, then disable or delete it.

Set rotate_every on the key in keypin.toml and a rotated date on its vault item, and keypin status shows when it's due.

Sources, checked 2026-11-16