Skip to content

Commit

Permalink
Change OTel attribute messaging.operation to messaging.operation.type
Browse files Browse the repository at this point in the history
  • Loading branch information
iinuwa committed Oct 30, 2024
1 parent 195059c commit efe9862
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions projects/RabbitMQ.Client/Impl/RabbitMQActivitySource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -90,7 +90,7 @@ public static class RabbitMQActivitySource
if (activity != null && activity.IsAllDataRequested)
{
activity
.SetTag(MessagingOperation, "receive")
.SetTag(MessagingOperationType, "receive")
.SetTag(MessagingDestination, "amq.default");
}

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit efe9862

Please sign in to comment.