Skip to content

Commit

Permalink
fix(amqplib): use extracted context for message consuming
Browse files Browse the repository at this point in the history
- fixes baggage propagation
  • Loading branch information
nerumo committed Jan 12, 2023
1 parent 8b8bfeb commit 908cabb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/node/instrumentation-amqplib/src/amqplib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ export class AmqplibInstrumentation extends InstrumentationBase<typeof amqp> {
msg[MESSAGE_STORED_SPAN] = span;
}

context.with(trace.setSpan(context.active(), span), () => {
context.with(trace.setSpan(parentContext, span), () => {
onMessage.call(this, msg);
});

Expand Down

0 comments on commit 908cabb

Please sign in to comment.