Description
Expected Behavior
There are several fields in the semantic convention for RabbitMQ and RabbitTemplate is missing the one named messaging.rabbitmq.destination.routing_key
.
Current Behavior
At the moment, in RabbitTemplate, the observationContext concatenates "exchange/routingKey" in the field messaging.destination.name
Context
If we want to be fully "OpenTelemetry compliant" then we should use all the fields we can with the information we have.
IMO it is a mistake to concatenate two different strings in one, it makes the research or filtering in traces/metrics afterwards more complicated.
messaging.destination.name
must be the name of the exchange
messaging.rabbitmq.destination.routing_key
must be the name of the routingKey
In RabbitMQ, the destination is defined by an exchange and a routing key. messaging.destination.name MUST be set to the name of the exchange. This will be an empty string if the default exchange is used.
EDIT :
We can also add somes tags for RabbitListenerObservationConvention :
messaging.destination.name
which will be the consumerQueue
messaging.rabbitmq.message.delivery_tag
the delivery tag of the message being processed