Skip to content

Commit 51fb53a

Browse files
committed
cleanup batch span processor in the batch queue on stop
1 parent 58a7bca commit 51fb53a

File tree

1 file changed

+4
-0
lines changed
  • internal-packages/run-engine/src/batch-queue

1 file changed

+4
-0
lines changed

internal-packages/run-engine/src/batch-queue/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -503,6 +503,10 @@ export class BatchQueue {
503503
*/
504504
async close(): Promise<void> {
505505
await this.stop();
506+
507+
// Clean up any remaining batched spans (safety net for spans not cleaned up by consumer loops)
508+
this.batchedSpanManager.cleanupAll();
509+
506510
await this.fairQueue.close();
507511
await this.workerQueueManager.close();
508512
await this.completionTracker.close();

0 commit comments

Comments
 (0)