Unique consumer identifier span attribute for messaging #1796
Labels
area:semantic-conventions
Related to semantic conventions
spec:trace
Related to the specification/trace directory
What are you trying to achieve?
Currently, the semantic conventions for messaging don't define a unique identifier for a consumer. There is a unique identifier specifically for Kafka, but a messaging-wide attribute would be preferable.
Without such an identifier, reprocessing the same message will result in identical span details, potentially all the way down to runtime and process details on the Resource.
What did you expect to see?
The Kafka messaging semantic conventions define
messaging.kafka.consumer_group
andmessaging.kafka.client_id
to uniquely identify a consumer of a message, but there is nothing at themessaging.
level for it. This causes any messaging system other than Kafka to not have a unique way to identify the id of the consumer processing a message.My proposal would be to add
messaging.consumer_id
which is only required when kind isCONSUMER
. We can define it to be constructed from the existing Kafka attributes, for Kafka, in a format of "{messaging.kafka.consumer_group}" or "{messaging.kafka.consumer_group} - {messaging.kafka.client_id}" when the client id is also known.For brokers such as RabbitMQ and Artemis, I believe it would represent just a Client ID of the consumer, as that is sufficiently unique.
I'm happy to work on a PR for this change.
The text was updated successfully, but these errors were encountered: