From 3d708a8b118e5305be0aec060f4f83c7db07e489 Mon Sep 17 00:00:00 2001 From: Isaiah Inuwa Date: Wed, 30 Oct 2024 10:56:58 -0500 Subject: [PATCH] Change OTel attribute messaging.operation to messaging.operation.type --- projects/RabbitMQ.Client/Impl/RabbitMQActivitySource.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/projects/RabbitMQ.Client/Impl/RabbitMQActivitySource.cs b/projects/RabbitMQ.Client/Impl/RabbitMQActivitySource.cs index 66a3830932..94ad1124eb 100644 --- a/projects/RabbitMQ.Client/Impl/RabbitMQActivitySource.cs +++ b/projects/RabbitMQ.Client/Impl/RabbitMQActivitySource.cs @@ -15,7 +15,7 @@ public static class RabbitMQActivitySource // https://opentelemetry.io/docs/specs/semconv/messaging/messaging-spans/#messaging-attributes internal const string MessageId = "messaging.message.id"; internal const string MessageConversationId = "messaging.message.conversation_id"; - internal const string MessagingOperation = "messaging.operation"; + internal const string MessagingOperationType = "messaging.operation.type"; internal const string MessagingSystem = "messaging.system"; internal const string MessagingDestination = "messaging.destination.name"; internal const string MessagingDestinationRoutingKey = "messaging.rabbitmq.destination.routing_key"; @@ -90,7 +90,7 @@ public static class RabbitMQActivitySource if (activity != null && activity.IsAllDataRequested) { activity - .SetTag(MessagingOperation, "receive") + .SetTag(MessagingOperationType, "receive") .SetTag(MessagingDestination, "amq.default"); } @@ -174,7 +174,7 @@ private static void PopulateMessagingTags(string operation, string routingKey, s ulong deliveryTag, int bodySize, Activity activity) { activity - .SetTag(MessagingOperation, operation) + .SetTag(MessagingOperationType, operation) .SetTag(MessagingDestination, string.IsNullOrEmpty(exchange) ? "amq.default" : exchange) .SetTag(MessagingDestinationRoutingKey, routingKey) .SetTag(MessagingBodySize, bodySize);