Implementation Guide
Step 1: Capture Test Error
import * as Sentry from '@sentry/node';
try {
throw new Error('Hello Sentry! This is a test error.');
} catch (error) {
Sentry.captureException(error);
console.log('Error sent to Sentry');
}Step 2: Capture Test Message
Sentry.captureMessage('Hello from Sentry SDK!', 'info');Step 3: Verify in Dashboard
- Open https://sentry.io
- Navigate to your project
- Check Issues tab for the test error
- Verify event details are correct
Step 4: Add Context
Sentry.setUser({ id: 'test-user', email: 'test@example.com' });
Sentry.setTag('test_run', 'hello-world');
Sentry.captureMessage('Test with context');