@@ -154,48 +154,3 @@ fn main() {
154154 }
155155 } ) ;
156156}
157-
158- /// Initializes Sentry error tracking if configured.
159- ///
160- /// Sentry must be initialized before the tokio runtime starts to ensure proper
161- /// Hub inheritance for spawned threads. Returns a guard that must be kept alive
162- /// for the duration of the program to ensure events are flushed on shutdown.
163- fn initialize_sentry (
164- sentry_config : & Option < util:: config:: SentryConfig > ,
165- ) -> Option < sentry:: ClientInitGuard > {
166- let config = match sentry_config {
167- Some ( cfg) => cfg,
168- None => return None ,
169- } ;
170-
171- let dsn = match config. get_dsn ( ) {
172- Some ( dsn) if !dsn. is_empty ( ) => dsn,
173- _ => return None ,
174- } ;
175-
176- let environment = config. get_environment ( ) ;
177- let sample_rate = config. get_sample_rate ( ) ;
178-
179- let guard = sentry:: init ( (
180- dsn,
181- sentry:: ClientOptions {
182- release : sentry:: release_name!( ) ,
183- environment : environment. map ( std:: borrow:: Cow :: Owned ) ,
184- sample_rate,
185- ..Default :: default ( )
186- } ,
187- ) ) ;
188-
189- if guard. is_enabled ( ) {
190- println ! (
191- "Sentry initialized (environment: {}, sample_rate: {})" ,
192- config. get_environment( ) . unwrap_or_else( || "default" . to_string( ) ) ,
193- sample_rate
194- ) ;
195-
196- // Send a test message to verify Sentry is configured correctly
197- sentry:: capture_message ( "VSS server started - Sentry integration test" , sentry:: Level :: Info ) ;
198- }
199-
200- Some ( guard)
201- }
0 commit comments