Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unique consumer identifier span attribute for messaging #1796

Closed
kenfinnigan opened this issue Jul 6, 2021 · 0 comments · Fixed by #1810
Closed

Unique consumer identifier span attribute for messaging #1796

kenfinnigan opened this issue Jul 6, 2021 · 0 comments · Fixed by #1810
Assignees
Labels
area:semantic-conventions Related to semantic conventions spec:trace Related to the specification/trace directory

Comments

@kenfinnigan
Copy link
Member

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 and messaging.kafka.client_id to uniquely identify a consumer of a message, but there is nothing at the messaging. 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 is CONSUMER. 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.

@kenfinnigan kenfinnigan added the spec:trace Related to the specification/trace directory label Jul 6, 2021
@Oberon00 Oberon00 added the area:semantic-conventions Related to semantic conventions label Jul 7, 2021
kenfinnigan added a commit to kenfinnigan/opentelemetry-specification that referenced this issue Jul 9, 2021
kenfinnigan added a commit to kenfinnigan/opentelemetry-specification that referenced this issue Jul 15, 2021
kenfinnigan added a commit to kenfinnigan/opentelemetry-specification that referenced this issue Aug 5, 2021
carlosalberto pushed a commit that referenced this issue Aug 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:semantic-conventions Related to semantic conventions spec:trace Related to the specification/trace directory
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants