diff --git a/src/index.ts b/src/index.ts index f0f88a801..9281484c9 100644 --- a/src/index.ts +++ b/src/index.ts @@ -85,7 +85,6 @@ import * as v1 from './v1'; import { ObservabilityOptions, ensureInitialContextManagerSet, - ensureContextPropagation, } from './instrument'; // eslint-disable-next-line @typescript-eslint/no-var-requires @@ -378,7 +377,6 @@ class Spanner extends GrpcService { this._observabilityOptions?.enableEndToEndTracing ); ensureInitialContextManagerSet(); - ensureContextPropagation(); } /** diff --git a/src/instrument.ts b/src/instrument.ts index 2c7998733..e4cb8d283 100644 --- a/src/instrument.ts +++ b/src/instrument.ts @@ -27,7 +27,6 @@ import { Span, SpanStatusCode, context, - propagation, trace, INVALID_SPAN_CONTEXT, ROOT_CONTEXT, @@ -100,8 +99,6 @@ const { AsyncHooksContextManager, } = require('@opentelemetry/context-async-hooks'); -const {W3CTraceContextPropagator} = require('@opentelemetry/core'); - /* * This function ensures that async/await works correctly by * checking if context.active() returns an invalid/unset context @@ -121,14 +118,8 @@ function ensureInitialContextManagerSet() { } } -function ensureContextPropagation() { - propagation.setGlobalPropagator(new W3CTraceContextPropagator()); -} - export {ensureInitialContextManagerSet}; -export {ensureContextPropagation}; - /** * startTrace begins an active span in the current active context * and passes it back to the set callback function. Each span will