File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 11console . log ( `process uptime: ${ Math . round ( process . uptime ( ) * 1000 ) } ms` ) ;
22console . time ( 'startup' ) ;
33console . time ( 'instrumentation' ) ;
4+ console . time ( 'imports instrumentation' ) ;
45import { DiagConsoleLogger , DiagLogLevel , diag } from '@opentelemetry/api' ;
56import {
67 BatchSpanProcessor ,
78 SimpleSpanProcessor ,
89} from '@opentelemetry/sdk-trace-base' ;
910import * as Sentry from '@sentry/node' ;
11+ console . timeEnd ( 'imports instrumentation' ) ;
1012
13+ console . time ( 'instrumentation setup' ) ;
1114if ( process . env . NODE_ENV === 'production' ) {
1215 if ( process . env . OTEL_DEBUG_LOGGING ) {
1316 diag . setLogger ( new DiagConsoleLogger ( ) , DiagLogLevel . DEBUG ) ;
1417 } else {
1518 diag . setLogger ( new DiagConsoleLogger ( ) , DiagLogLevel . INFO ) ;
1619 }
1720}
21+ console . timeEnd ( 'instrumentation setup' ) ;
1822
23+ console . time ( 'sentry instrumentation' ) ;
1924if ( process . env . SENTRY_DSN ) {
2025 const sentryClient = Sentry . init ( {
2126 dsn : process . env . SENTRY_DSN ,
@@ -47,6 +52,7 @@ if (process.env.SENTRY_DSN) {
4752 ) ;
4853 }
4954}
55+ console . timeEnd ( 'sentry instrumentation' ) ;
5056
5157export function spanWrapper < TArgs extends unknown [ ] , TReturn > (
5258 fn : ( ...args : TArgs ) => TReturn ,
You can’t perform that action at this time.
0 commit comments