File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
packages/opentelemetry/src Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -180,9 +180,6 @@ export class SentrySpanExporter {
180180
181181 this . flushSentSpanCache ( ) ;
182182 const sentSpans = this . _maybeSend ( finishedSpans ) ;
183- for ( const span of finishedSpans ) {
184- this . _sentSpans . set ( span . spanContext ( ) . spanId , Date . now ( ) + DEFAULT_TIMEOUT * 1000 ) ;
185- }
186183
187184 const sentSpanCount = sentSpans . size ;
188185 const remainingOpenSpanCount = finishedSpans . length - sentSpanCount ;
@@ -191,7 +188,10 @@ export class SentrySpanExporter {
191188 `SpanExporter exported ${ sentSpanCount } spans, ${ remainingOpenSpanCount } spans are waiting for their parent spans to finish` ,
192189 ) ;
193190
191+ const expirationDate = Date . now ( ) + DEFAULT_TIMEOUT * 1000 ;
192+
194193 for ( const span of sentSpans ) {
194+ this . _sentSpans . set ( span . spanContext ( ) . spanId , expirationDate ) ;
195195 const bucketEntry = this . _spansToBucketEntry . get ( span ) ;
196196 if ( bucketEntry ) {
197197 bucketEntry . spans . delete ( span ) ;
You can’t perform that action at this time.
0 commit comments