Skip to content

Commit 5b71387

Browse files
committed
Set parent context of activity instead of linked context
1 parent 80f1d19 commit 5b71387

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

projects/RabbitMQ.Client/Impl/RabbitMQActivitySource.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public static class RabbitMQActivitySource
106106
// Extract the PropagationContext of the upstream parent from the message headers.
107107
Activity? activity = s_subscriberSource.StartLinkedRabbitMQActivity(
108108
UseRoutingKeyAsOperationName ? $"{routingKey} {MessagingOperationTypeReceive}" : MessagingOperationTypeReceive, ActivityKind.Consumer,
109-
ContextExtractor(readOnlyBasicProperties));
109+
parentContext: ContextExtractor(readOnlyBasicProperties));
110110
if (activity != null && activity.IsAllDataRequested)
111111
{
112112
PopulateMessagingTags(MessagingOperationTypeReceive, routingKey, exchange, deliveryTag, readOnlyBasicProperties,
@@ -127,7 +127,7 @@ public static class RabbitMQActivitySource
127127
// Extract the PropagationContext of the upstream parent from the message headers.
128128
Activity? activity = s_subscriberSource.StartLinkedRabbitMQActivity(
129129
UseRoutingKeyAsOperationName ? $"{routingKey} {MessagingOperationTypeProcess}" : MessagingOperationTypeProcess,
130-
ActivityKind.Consumer, ContextExtractor(basicProperties));
130+
ActivityKind.Consumer, parentContext: ContextExtractor(basicProperties));
131131
if (activity != null && activity.IsAllDataRequested)
132132
{
133133
PopulateMessagingTags(MessagingOperationTypeProcess, routingKey, exchange,

0 commit comments

Comments
 (0)