diff --git a/plugins/node/instrumentation-amqplib/src/amqplib.ts b/plugins/node/instrumentation-amqplib/src/amqplib.ts index 5d51a3dde5..643fea0fbc 100644 --- a/plugins/node/instrumentation-amqplib/src/amqplib.ts +++ b/plugins/node/instrumentation-amqplib/src/amqplib.ts @@ -451,7 +451,7 @@ export class AmqplibInstrumentation extends InstrumentationBase { msg[MESSAGE_STORED_SPAN] = span; } - context.with(trace.setSpan(context.active(), span), () => { + context.with(trace.setSpan(parentContext, span), () => { onMessage.call(this, msg); });