From 381b29dfc9465034e48c690cd74a65c34fa476ef Mon Sep 17 00:00:00 2001 From: Isaiah Inuwa Date: Wed, 30 Oct 2024 11:20:26 -0500 Subject: [PATCH] Update span operation names to comply with OTel semantic conventions --- .../RabbitMQ.Client/Impl/RabbitMQActivitySource.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/projects/RabbitMQ.Client/Impl/RabbitMQActivitySource.cs b/projects/RabbitMQ.Client/Impl/RabbitMQActivitySource.cs index 94ad1124e..f82b856a0 100644 --- a/projects/RabbitMQ.Client/Impl/RabbitMQActivitySource.cs +++ b/projects/RabbitMQ.Client/Impl/RabbitMQActivitySource.cs @@ -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; @@ -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); }