File tree Expand file tree Collapse file tree 1 file changed +1
-17
lines changed
packages/@contentlayer/utils/src/tracing-effect Expand file tree Collapse file tree 1 file changed +1
-17
lines changed Original file line number Diff line number Diff line change @@ -34,23 +34,7 @@ export const makeTracingSpanExporter = M.gen(function* (_) {
3434 const spanExporter = yield * _ (
3535 pipe (
3636 T . succeedWith ( ( ) => new OTLPTraceExporter ( config ) ) ,
37- // NOTE Unfortunately this workaround/"hack" is currently needed since Otel doesn't yet provide a graceful
38- // way to shutdown.
39- //
40- // Related issue: https://github.com/open-telemetry/opentelemetry-js/issues/987
41- M . make ( ( p ) =>
42- T . gen ( function * ( _ ) {
43- while ( 1 ) {
44- yield * _ ( T . sleep ( 0 ) )
45- const promises = p [ '_sendingPromises' ] as any [ ]
46- if ( promises . length > 0 ) {
47- yield * _ ( T . result ( T . promise ( ( ) => Promise . all ( promises ) ) ) )
48- } else {
49- break
50- }
51- }
52- } ) ,
53- ) ,
37+ M . make ( ( exporter ) => T . promise ( ( ) => exporter . shutdown ( ) ) ) ,
5438 ) ,
5539 )
5640
You can’t perform that action at this time.
0 commit comments