File tree Expand file tree Collapse file tree 3 files changed +4
-5
lines changed Expand file tree Collapse file tree 3 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ export const tracingSDK = new TracingSDK({
18
18
url : process . env . OTEL_EXPORTER_OTLP_ENDPOINT ?? "http://0.0.0.0:4318" ,
19
19
instrumentations : setupImportedConfig ?. instrumentations ?? [ ] ,
20
20
diagLogLevel : ( process . env . OTEL_LOG_LEVEL as TracingDiagnosticLogLevel ) ?? "none" ,
21
+ forceFlushTimeoutMillis : 5_000 ,
21
22
} ) ;
22
23
23
24
export const otelTracer : Tracer = tracingSDK . getTracer ( "trigger-dev-worker" , packageJson . version ) ;
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ export const tracingSDK = new TracingSDK({
18
18
diagLogLevel : ( process . env . OTEL_LOG_LEVEL as TracingDiagnosticLogLevel ) ?? "none" ,
19
19
forceFlushTimeoutMillis : process . env . OTEL_FORCE_FLUSH_TIMEOUT
20
20
? parseInt ( process . env . OTEL_FORCE_FLUSH_TIMEOUT , 10 )
21
- : undefined ,
21
+ : 5_000 ,
22
22
} ) ;
23
23
24
24
export const otelTracer : Tracer = tracingSDK . getTracer ( "trigger-prod-worker" , packageJson . version ) ;
Original file line number Diff line number Diff line change @@ -197,13 +197,11 @@ export class TracingSDK {
197
197
}
198
198
199
199
public async flush ( ) {
200
- await this . _traceProvider . forceFlush ( ) ;
201
- await this . _logProvider . forceFlush ( ) ;
200
+ await Promise . all ( [ this . _traceProvider . forceFlush ( ) , this . _logProvider . forceFlush ( ) ] ) ;
202
201
}
203
202
204
203
public async shutdown ( ) {
205
- await this . _traceProvider . shutdown ( ) ;
206
- await this . _logProvider . shutdown ( ) ;
204
+ await Promise . all ( [ this . _traceProvider . shutdown ( ) , this . _logProvider . shutdown ( ) ] ) ;
207
205
}
208
206
}
209
207
You can’t perform that action at this time.
0 commit comments