| name | sentry-install-auth |
| description | Install and configure Sentry SDK authentication with DSN setup.
Use when setting up Sentry error tracking, configuring DSN,
or initializing Sentry in a Node.js or Python project.
Trigger with "install sentry", "setup sentry", "sentry auth",
"configure sentry DSN".
|
| allowed-tools | Read, Write, Edit, Bash(npm:*), Bash(pip:*), Grep |
| version | 1.51.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","sentry","monitoring","error-tracking"] |
| compatibility | Designed for Claude Code |
Sentry Install & Auth
Overview
Install the Sentry SDK, configure DSN-based authentication, and verify error tracking is operational. Covers Node.js (@sentry/node), browser (@sentry/browser), and Python (sentry-sdk) with environment-based configuration and auth token setup for CLI/CI workflows.
Prerequisites
Instructions
Step 1 — Install the SDK
Node.js / TypeScript:
npm install @sentry/node
npm install @sentry/profiling-node
Browser / Framework-specific:
npm install @sentry/browser
npm install @sentry/react
npm install @sentry/nextjs
npm install @sentry/vue
Python:
pip install sentry-sdk
Step 2 — Store the DSN securely
The DSN (Data Source Name) tells the SDK where to send events. It looks like https://<key>@<org>.ingest.sentry.io/<project-id>. Never hardcode it — use environment variables.
SENTRY_DSN=https://examplePublicKey@o0.ingest.sentry.io/0
SENTRY_ENVIRONMENT=development
SENTRY_RELEASE=1.0.0
For production, store the DSN in your secret manager (AWS Secrets Manager, GCP Secret Manager, Vault, etc.) and inject it at deploy time.
Step 3 — Initialize the SDK
Node.js (ESM) — create instrument.mjs at project root:
This file MUST be imported before any other modules. The --import flag ensures Sentry instruments HTTP, database, and framework integrations via monkey-patching at load time.
* ;
.({
: process..,
: process.. || ,
: process..,
: process.. === ? : ,
: process.. !== ,
: ,
: [
],
});