From c0e856692a21cc8006f5ae5f0f25777bd7790a75 Mon Sep 17 00:00:00 2001 From: Francesco Novy Date: Fri, 29 Nov 2024 13:04:47 +0100 Subject: [PATCH] better docs --- packages/opentelemetry/src/propagator.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/opentelemetry/src/propagator.ts b/packages/opentelemetry/src/propagator.ts index 7c7baf07328e..66f0624ed1de 100644 --- a/packages/opentelemetry/src/propagator.ts +++ b/packages/opentelemetry/src/propagator.ts @@ -198,7 +198,8 @@ export function getInjectionData(context: Context): { } { const span = trace.getSpan(context); - // If we have a remote span, we need to ensure to use the span as parentSpanId, not spanId itself + // If we have a remote span, the spanId should be considered as the parentSpanId, not spanId itself + // Instead, we use a virtual (generated) spanId for propagation if (span && span.spanContext().isRemote) { const spanContext = span.spanContext(); const dynamicSamplingContext = getDynamicSamplingContextFromSpan(span);