The source code, I believe incorrectly, only considers propagateContext if the value is truthy - see here
if (init?.opentelemetry?.propagateContext) {
return init.opentelemetry.propagateContext;
}
This should be more like this -
if (typeof init?.opentelemetry?.propagateContext === 'boolean') {
return init.opentelemetry.propagateContext;
}
This way, regardless of whether propagateContext is true or false, it will cause shouldPropagate to return early with the appropriate value, instead of only returning early when propagateContext is true.
The docs suggest that any individual
fetch
request can be overwritten to start/stop propagating contextExample usage of this argument below -
The source code, I believe incorrectly, only considers
propagateContext
if the value is truthy - see hereThis should be more like this -
This way, regardless of whether
propagateContext
istrue
orfalse
, it will causeshouldPropagate
to return early with the appropriate value, instead of only returning early whenpropagateContext
is true.