From 3c59d9f6f93cbb5e8e963171237a9b8f479013d1 Mon Sep 17 00:00:00 2001 From: Rauno Viskus Date: Wed, 8 Jun 2022 14:51:49 +0300 Subject: [PATCH] fix: add propagators from `BasicTracerProvider` to `NodeTracerProvider` --- packages/opentelemetry-sdk-trace-node/src/NodeTracerProvider.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/opentelemetry-sdk-trace-node/src/NodeTracerProvider.ts b/packages/opentelemetry-sdk-trace-node/src/NodeTracerProvider.ts index 8e4575a390c..484ba4e773d 100644 --- a/packages/opentelemetry-sdk-trace-node/src/NodeTracerProvider.ts +++ b/packages/opentelemetry-sdk-trace-node/src/NodeTracerProvider.ts @@ -40,6 +40,7 @@ export class NodeTracerProvider extends BasicTracerProvider { string, PROPAGATOR_FACTORY >([ + ...BasicTracerProvider._registeredPropagators, [ 'b3', () => @@ -69,6 +70,7 @@ export class NodeTracerProvider extends BasicTracerProvider { } protected override _getPropagator(name: string): TextMapPropagator | undefined { + // TODO: remove this. Overwriting _registered* is sufficient return ( super._getPropagator(name) || NodeTracerProvider._registeredPropagators.get(name)?.()