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 {
180
180
181
181
this . flushSentSpanCache ( ) ;
182
182
const sentSpans = this . _maybeSend ( finishedSpans ) ;
183
- for ( const span of finishedSpans ) {
184
- this . _sentSpans . set ( span . spanContext ( ) . spanId , Date . now ( ) + DEFAULT_TIMEOUT * 1000 ) ;
185
- }
186
183
187
184
const sentSpanCount = sentSpans . size ;
188
185
const remainingOpenSpanCount = finishedSpans . length - sentSpanCount ;
@@ -191,7 +188,10 @@ export class SentrySpanExporter {
191
188
`SpanExporter exported ${ sentSpanCount } spans, ${ remainingOpenSpanCount } spans are waiting for their parent spans to finish` ,
192
189
) ;
193
190
191
+ const expirationDate = Date . now ( ) + DEFAULT_TIMEOUT * 1000 ;
192
+
194
193
for ( const span of sentSpans ) {
194
+ this . _sentSpans . set ( span . spanContext ( ) . spanId , expirationDate ) ;
195
195
const bucketEntry = this . _spansToBucketEntry . get ( span ) ;
196
196
if ( bucketEntry ) {
197
197
bucketEntry . spans . delete ( span ) ;
You can’t perform that action at this time.
0 commit comments