@@ -9,6 +9,7 @@ import * as Sentry from '@sentry/node';
99import { extensions } from 'vscode' ;
1010
1111import { ExtensionId } from './constants' ;
12+ import { Logger } from './logger' ;
1213import { RovodevStaticConfig } from './rovo-dev/api/rovodevStaticConfig' ;
1314
1415export interface SentryConfig {
@@ -49,11 +50,16 @@ export class SentryService {
4950 * @param config - Sentry configuration
5051 */
5152 public async initialize ( config : SentryConfig , analyticsCallback ?: ( error : string ) => void ) : Promise < void > {
53+ Logger . info ( 'Sentry trying to be initialized for Node.js environment.' ) ;
54+
5255 // If not enabled, silently return without initializing
5356 if ( ! config . enabled || ! config . dsn || ! config . featureFlagEnabled ) {
57+ Logger . info (
58+ 'Sentry not enabled or missing configuration, skipping initialization.' ,
59+ JSON . stringify ( config ) ,
60+ ) ;
5461 return ;
5562 }
56-
5763 this . analyticsCallback = analyticsCallback ;
5864
5965 try {
@@ -67,10 +73,12 @@ export class SentryService {
6773 tracesSampleRate : 0 , // Disable transaction tracing
6874 } ) ;
6975 this . sentryClient = Sentry ;
76+ Logger . info ( 'Sentry initialized for Node.js environment.' ) ;
7077
7178 this . initialized = true ;
7279 } catch ( error ) {
7380 // Silently fail - don't break extension startup
81+ Logger . info ( new Error ( 'Failed to initialize Sentry:' ) , error ) ;
7482 console . error ( 'Failed to initialize Sentry:' , error ) ;
7583 this . initialized = false ;
7684 }
0 commit comments