Closed vmeunier closed 1 month ago
We do not follow those conventions by default because of Status: Experimental
.
However additional tags to whatever we have chosen by default would not harm.
In fact we had similar contribution in the past into Spring for Apache Kafka: https://github.com/spring-projects/spring-kafka/issues/2609.
So, feel free to raise respective PR and we will be more than happy to review and merge!
Ok, i'll try to send you a PR :)
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 exchangemessaging.rabbitmq.destination.routing_key
must be the name of the routingKeyEDIT :
We can also add somes tags for RabbitListenerObservationConvention :
messaging.destination.name
which will be the consumerQueuemessaging.rabbitmq.message.delivery_tag
the delivery tag of the message being processed