From c26b3e19a01ec42fa85605c37aa044248ec08a4f Mon Sep 17 00:00:00 2001 From: danstarns Date: Sat, 15 Jun 2024 20:56:32 +0100 Subject: [PATCH 1/2] docs: add SimpleSpanProcessor warning --- .../src/export/SimpleSpanProcessor.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/opentelemetry-sdk-trace-base/src/export/SimpleSpanProcessor.ts b/packages/opentelemetry-sdk-trace-base/src/export/SimpleSpanProcessor.ts index 463e8376bd..0be82582af 100644 --- a/packages/opentelemetry-sdk-trace-base/src/export/SimpleSpanProcessor.ts +++ b/packages/opentelemetry-sdk-trace-base/src/export/SimpleSpanProcessor.ts @@ -33,6 +33,8 @@ import { Resource } from '@opentelemetry/resources'; * to {@link ReadableSpan} and passes it to the configured exporter. * * Only spans that are sampled are converted. + * + * @warning This may not be the preferred processor to use in production. See https://github.com/open-telemetry/opentelemetry-js/issues/4741 */ export class SimpleSpanProcessor implements SpanProcessor { private _shutdownOnce: BindOnceFuture; From 813df144d1ec6d506512c23c8d9f46fcc46d80ce Mon Sep 17 00:00:00 2001 From: Daniel Starns Date: Tue, 18 Jun 2024 11:20:05 +0100 Subject: [PATCH 2/2] Update packages/opentelemetry-sdk-trace-base/src/export/SimpleSpanProcessor.ts Co-authored-by: Marc Pichler --- .../src/export/SimpleSpanProcessor.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/opentelemetry-sdk-trace-base/src/export/SimpleSpanProcessor.ts b/packages/opentelemetry-sdk-trace-base/src/export/SimpleSpanProcessor.ts index 0be82582af..d332530473 100644 --- a/packages/opentelemetry-sdk-trace-base/src/export/SimpleSpanProcessor.ts +++ b/packages/opentelemetry-sdk-trace-base/src/export/SimpleSpanProcessor.ts @@ -34,7 +34,7 @@ import { Resource } from '@opentelemetry/resources'; * * Only spans that are sampled are converted. * - * @warning This may not be the preferred processor to use in production. See https://github.com/open-telemetry/opentelemetry-js/issues/4741 + * NOTE: This {@link SpanProcessor} exports every ended span individually instead of batching spans together, which causes significant performance overhead with most exporters. For production use, please consider using the {@link BatchSpanProcessor} instead. */ export class SimpleSpanProcessor implements SpanProcessor { private _shutdownOnce: BindOnceFuture;