From 9f2833bbd0f0c0a8a2f6484532365a64a4f41f88 Mon Sep 17 00:00:00 2001 From: Siim Kallas Date: Thu, 29 Aug 2024 11:29:52 +0300 Subject: [PATCH] remove otel bsp delay workaround --- src/tracing/options.ts | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/src/tracing/options.ts b/src/tracing/options.ts index d3821713..f3577d27 100644 --- a/src/tracing/options.ts +++ b/src/tracing/options.ts @@ -317,16 +317,6 @@ export function consoleSpanExporterFactory(): SpanExporter { return new ConsoleSpanExporter(); } -// Temporary workaround until https://github.com/open-telemetry/opentelemetry-js/issues/3094 is resolved -function getBatchSpanProcessorConfig() { - // OTel uses its own parsed environment, we can just use the default env if the BSP delay is unset. - if (getNonEmptyEnvVar('OTEL_BSP_SCHEDULE_DELAY') !== undefined) { - return undefined; - } - - return { scheduledDelayMillis: 500 }; -} - export function defaultSpanProcessorFactory(options: Options): SpanProcessor[] { let exporters = options.spanExporterFactory(options); @@ -334,10 +324,7 @@ export function defaultSpanProcessorFactory(options: Options): SpanProcessor[] { exporters = [exporters]; } - return exporters.map( - (exporter) => - new SplunkBatchSpanProcessor(exporter, getBatchSpanProcessorConfig()) - ); + return exporters.map((exporter) => new SplunkBatchSpanProcessor(exporter)); } // eslint-disable-next-line @typescript-eslint/no-unused-vars