diff --git a/packages/opentelemetry-sdk-trace-base/src/export/BatchSpanProcessorBase.ts b/packages/opentelemetry-sdk-trace-base/src/export/BatchSpanProcessorBase.ts index 0b5fe50c37..5cb29e33e4 100644 --- a/packages/opentelemetry-sdk-trace-base/src/export/BatchSpanProcessorBase.ts +++ b/packages/opentelemetry-sdk-trace-base/src/export/BatchSpanProcessorBase.ts @@ -235,7 +235,7 @@ export abstract class BatchSpanProcessorBase } this._isFlushInProgress = true; this._clearTimer(); - + const spans = this._finishedSpans.splice(0, this._maxExportBatchSize); this._export(spans) .then(() => { diff --git a/packages/opentelemetry-sdk-trace-base/test/common/export/TestExporterWithDelay.ts b/packages/opentelemetry-sdk-trace-base/test/common/export/TestExporterWithDelay.ts index d903e40abc..19e0620d5c 100644 --- a/packages/opentelemetry-sdk-trace-base/test/common/export/TestExporterWithDelay.ts +++ b/packages/opentelemetry-sdk-trace-base/test/common/export/TestExporterWithDelay.ts @@ -22,7 +22,7 @@ import { InMemorySpanExporter, ReadableSpan } from '../../../src'; */ export class TestExporterWithDelay extends InMemorySpanExporter { private _exporterCreatedSpans: ReadableSpan[] = []; - private _delayMs: number; + private _delayMs: number; constructor(delayMs: number) { super(); @@ -33,7 +33,7 @@ export class TestExporterWithDelay extends InMemorySpanExporter { spans: ReadableSpan[], resultCallback: (result: ExportResult) => void ): void { - setTimeout(() => super.export(spans,resultCallback), this._delayMs); + setTimeout(() => super.export(spans, resultCallback), this._delayMs); } override shutdown(): Promise {