Skip to main content

What is a Sentry DSN?

Issue

I want to know what a Sentry Data Source Name (DSN) is, what the parts mean, and whether it changes when I transfer a project.

Applies To

  • All SaaS Customers and Self-Hosted Users

  • SDK Setup

  • Client Keys (DSN)

Resolution

A DSN tells the Sentry SDK where to send events so they end up in the right project. You can find it under Project Settings → Client Keys (DSN), or in the setup snippet when you first create a project.

A DSN looks like this:

{PROTOCOL}://{PUBLIC_KEY}:{SECRET_KEY}@{HOST}{PATH}/{PROJECT_ID}

For Sentry SaaS, the host will often look like o123456.ingest.sentry.io, or a regional host such as o123456.ingest.de.sentry.io. The number after o is the organization ID.

The secret key part is optional and deprecated, so modern DSNs usually don't include it.

If you move a project to another organization, copy the DSN again from Client Keys in the destination organization. The public key and project ID will often stay the same, but if the host contains o…, the organization ID needs to match the new parent organization. It's best not to manually edit the host unless you're certain what the new organization ID should be.

For more details, see Data Source Name (DSN). If you're concerned about a DSN being publicly visible, see My DSN key is publicly visible….

Did this answer your question?