@@ -228,14 +228,12 @@ export const initSDK = (config: SDKConfig) => {
228228 //--------------------------------------------------
229229 // ------------------- LOGGER ----------------------
230230 //--------------------------------------------------
231- let _t = process . hrtime ( ) ;
232231 ui . text = 'Initializing OpenTelemetry Logger...' ;
233232 const _logger = new OtelLogger ( {
234233 detectResources : defaultDetectResources ,
235234 service : defaultServiceName ,
236235 } ) ;
237- const t0 = process . hrtime ( _t ) ;
238- ui . succeed ( `Initialized OpenTelemetry Logger in ${ hrtimeToMs ( t0 ) } ms` ) ;
236+ ui . succeed ( 'Initialized OpenTelemetry Logger' ) ;
239237 //--------------------------------------------------
240238
241239 // Health check
@@ -318,7 +316,13 @@ export const initSDK = (config: SDKConfig) => {
318316 ...( defaultSentryIntegrationEnabled
319317 ? [ new SentryNodeInstrumentation ( ) ]
320318 : [ ] ) ,
321- ...( defaultExceptionCapture ? [ new ExceptionInstrumentation ( ) ] : [ ] ) ,
319+ ...( defaultExceptionCapture
320+ ? [
321+ new ExceptionInstrumentation ( {
322+ _internalForceFlush : shutdown ,
323+ } ) ,
324+ ]
325+ : [ ] ) ,
322326 ...( config . additionalInstrumentations ?? [ ] ) ,
323327 ] ;
324328
@@ -350,8 +354,7 @@ export const initSDK = (config: SDKConfig) => {
350354 contextManager : contextManager ,
351355 } ) ;
352356
353- const t1 = process . hrtime ( _t ) ;
354- ui . succeed ( `Initialized instrumentations packages in ${ hrtimeToMs ( t1 ) } ms` ) ;
357+ ui . succeed ( 'Initialized instrumentations packages' ) ;
355358
356359 if ( defaultEnableInternalProfiling ) {
357360 ui . text = 'Enabling internal profiling...' ;
@@ -412,14 +415,11 @@ export const initSDK = (config: SDKConfig) => {
412415 }
413416 }
414417
415- _t = process . hrtime ( ) ;
416418 ui . text = 'Starting OpenTelemetry Node SDK...' ;
417419 sdk . start ( ) ;
418- const t2 = process . hrtime ( _t ) ;
419- ui . succeed ( `Started OpenTelemetry Node SDK in ${ hrtimeToMs ( t2 ) } ms` ) ;
420+ ui . succeed ( 'Started OpenTelemetry Node SDK' ) ;
420421
421422 if ( config . programmaticImports ) {
422- _t = process . hrtime ( ) ;
423423 ui . text = 'Repatching instrumentation packages...' ;
424424 for ( const instrumentation of allInstrumentations ) {
425425 const modules = ( instrumentation as any )
@@ -526,8 +526,7 @@ export const initSDK = (config: SDKConfig) => {
526526 }
527527 }
528528 }
529- const t3 = process . hrtime ( _t ) ;
530- ui . succeed ( `Repatched instrumentation packages in ${ hrtimeToMs ( t3 ) } ms` ) ;
529+ ui . succeed ( 'Repatched instrumentation packages' ) ;
531530 }
532531
533532 function handleTerminationSignal ( signal : string ) {
0 commit comments