How do I authenticate a secret-enabled backend project with a Sentry SDK? #62
|
Is the generated DSN enough for a Bicho project created with |
Replies: 1 comment
|
A DSN alone is not enough for a secret-enabled project. Project creation returns For an existing Sentry.init({
dsn: project.sentry.dsn,
transportOptions: { headers: project.sentry.headers },
tracesSampleRate: 0,
sendClientReports: false,
});Keep the generated response in secure backend configuration. Project listings deliberately omit credentials, and creating another project does not recover the old project's credentials. Each creation call registers a separate project. If your SDK cannot send custom headers, use a public-key-only project or a backend transport that can supply the required secret. Do not work around this by embedding secrets in browser code or shipping them in a distributed client. Browser projects should be created without an ingest secret. The admin bearer token is a different credential. It authorizes investigation and administration, not SDK ingestion. Never put it in the DSN or transport options. Verify delivery by reading a known event back through authenticated MCP or API access. Documentation - Move from Sentry Documentation - Privacy and credentials |
A DSN alone is not enough for a secret-enabled project. Project creation returns
sentry.dsnandsentry.headers; the headers includeX-Bicho-Secret. Configure the SDK transport to send those headers on ingestion requests.For an existing
@sentry/nodeintegration, using the saved project-creation response:Keep the generated response in secure backend configuration. Project listings deliberately omit credentials, and creating another project does not recover the old project's credentials. Each creation call registers a separate project.
If …