You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wonder if there is an easy or recommended way of adding custom propagators in NodeTraceProvider to the end (or start) of the default propagators list (_registeredPropagators) using NodeSDK.
I would like to add the CloudPropagator (link) but I don't want to opt-out from spec default propagators like tracecontext, baggage, b3 etc. that still could recognize the propagated context.
Is my only option to subclass NodeTraceProvider and override _registeredPropagators? But usage of it seems to be for propagators from env. I don't use them.
constsdk=newNodeSDK({spanProcessor: ... // is it needed in my scenario?traceExporter: undefined// don't want to exporttextMapPropagator: newCompositePropagator({propagators: [/*getDefaults without cast to get protected defaults?*/,newCustomPropagator()]})instrumentations: [getNodeAutoInstrumentations({'@opentelemetry/instrumentation-http': {},'@opentelemetry/instrumentation-pino': {},}),],});
My use case is that I want to allow for propagation between boundaries (http for now) and instrument the logs, but I don't care much about internal instrumentation and exporting. Just want to read the context in and propagate out.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
I wonder if there is an easy or recommended way of adding custom propagators in
NodeTraceProvider
to the end (or start) of the default propagators list (_registeredPropagators
) usingNodeSDK
.I would like to add the
CloudPropagator
(link) but I don't want to opt-out from spec default propagators liketracecontext
,baggage
,b3
etc. that still could recognize the propagated context.Is my only option to subclass
NodeTraceProvider
and override _registeredPropagators? But usage of it seems to be for propagators from env. I don't use them.My use case is that I want to allow for propagation between boundaries (http for now) and instrument the logs, but I don't care much about internal instrumentation and exporting. Just want to read the context in and propagate out.
Appreciate the help.
Beta Was this translation helpful? Give feedback.
All reactions