Skip to content

Commit

Permalink
Update span operation names to comply with OTel semantic conventions
Browse files Browse the repository at this point in the history
  • Loading branch information
iinuwa authored and lukebakken committed Oct 31, 2024
1 parent 3d708a8 commit f71273b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions projects/RabbitMQ.Client/Impl/RabbitMQActivitySource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,14 @@ public static class RabbitMQActivitySource

Activity? activity = linkedContext == default
? s_publisherSource.StartRabbitMQActivity(
UseRoutingKeyAsOperationName ? $"{routingKey} publish" : "publish",
UseRoutingKeyAsOperationName ? $"{routingKey} send" : "send",
ActivityKind.Producer)
: s_publisherSource.StartLinkedRabbitMQActivity(
UseRoutingKeyAsOperationName ? $"{routingKey} publish" : "publish",
UseRoutingKeyAsOperationName ? $"{routingKey} send" : "send",
ActivityKind.Producer, linkedContext);
if (activity != null && activity.IsAllDataRequested)
{
PopulateMessagingTags("publish", routingKey, exchange, 0, bodySize, activity);
PopulateMessagingTags("send", routingKey, exchange, 0, bodySize, activity);
}

return activity;
Expand Down Expand Up @@ -128,11 +128,11 @@ public static class RabbitMQActivitySource

// Extract the PropagationContext of the upstream parent from the message headers.
Activity? activity = s_subscriberSource.StartLinkedRabbitMQActivity(
UseRoutingKeyAsOperationName ? $"{routingKey} deliver" : "deliver",
UseRoutingKeyAsOperationName ? $"{routingKey} process" : "process",
ActivityKind.Consumer, ContextExtractor(basicProperties));
if (activity != null && activity.IsAllDataRequested)
{
PopulateMessagingTags("deliver", routingKey, exchange,
PopulateMessagingTags("process", routingKey, exchange,
deliveryTag, basicProperties, bodySize, activity);
}

Expand Down

0 comments on commit f71273b

Please sign in to comment.