⏱ Estimated Time To Completion: 2 minutes

Add captureConsoleIntegration to your initialization

To automatically begin capturing console API calls, simply add Sentry.captureConsoleIntegration to your existing Sentry.init call.

sentry.client.config.ts
Sentry.init({
    // ... (existing setup)
    Sentry.captureConsoleIntegration(), // Add this to capture logs
});

You may pass a levels arg to captureConsoleIntegration in order to customize log levels that are captured.

sentry.client.config.ts
Sentry.init({
    // ... (existing setup)
    // Only capture warning and error-level logs.
    Sentry.captureConsoleIntegration({ levels: ['warn', 'error'] }),
});

That’s it! Decipher will automatically capture the configured logs and include them in session replays.