Implementation Guide
Step 1: Install SDK
# Node.js
npm install @sentry/node
# Browser/React
npm install @sentry/react
# Python
pip install sentry-sdkStep 2: Configure DSN
# Set environment variable
export SENTRY_DSN="https://key@org.ingest.sentry.io/project"
# Or create .env file
echo 'SENTRY_DSN=https://key@org.ingest.sentry.io/project' >> .envStep 3: Initialize Sentry
import * as Sentry from '@sentry/node';
Sentry.init({
dsn: process.env.SENTRY_DSN,
environment: process.env.NODE_ENV,
tracesSampleRate: 1.0,
});Step 4: Verify Connection
Sentry.captureMessage('Sentry test message');
console.log('Check Sentry dashboard for test message');