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

BREAKING: Remove messaging.consumer.id, make messaging.client_id generic #3336

Merged

Conversation

pyohannes
Copy link
Contributor

Fixes #2015

Changes

Based on discussions in the messaging workgroup and in issue #2015, this PR proposes to remove messaging.consumer.id, and to replace both messaging.kafka.client_id and messaging.rocketmq.client_id with a generic messaging.client_id.

messaging.consumer.id is defined to always be set to the client_id of the used messaging system, except for Kafka, where it was defined to be a combination of messaging.kafka.client_id and messaging.kafka.consumer.group, or just the latter if messaging.kafka.client_id is not available. With this definition, the semantics of consumer.id are different between messaging systems, and even different for different Kafka scenarios.

The proposed messaging.client_id has consistent semantics ("an unique client id, when it is available"), and can be used instead of messaging.consumer.id in almost all cases.

In addition to have consistent semantics, this also simplifies the semantic conventions, as instead of

messaging.consumer.id
messaging.kafka.client_id
messaging.rocketmq.client_id

there is now just:

messaging.client_id.

@pyohannes pyohannes marked this pull request as ready for review March 23, 2023 00:35
@pyohannes pyohannes requested review from a team March 23, 2023 00:35
@pyohannes pyohannes marked this pull request as draft March 23, 2023 16:01
@arminru arminru added semconv:messaging spec:trace Related to the specification/trace directory area:semantic-conventions Related to semantic conventions labels Mar 28, 2023
@github-actions
Copy link

github-actions bot commented Apr 5, 2023

This PR was marked stale due to lack of activity. It will be closed in 7 days.

@github-actions github-actions bot added the Stale label Apr 5, 2023
@github-actions
Copy link

Closed as inactive. Feel free to reopen if this PR is still being worked on.

@github-actions github-actions bot closed this Apr 13, 2023
@lmolkova lmolkova reopened this Apr 13, 2023
@lmolkova lmolkova removed the Stale label Apr 13, 2023
@pyohannes pyohannes marked this pull request as ready for review April 13, 2023 14:35
@pyohannes pyohannes force-pushed the messaging_attributes_client_id branch from 521d14a to 9ec400b Compare April 13, 2023 19:36
@pyohannes
Copy link
Contributor Author

@Oberon00 Could you please have a look whether this resolves #2015, and possibly approve?

@pyohannes pyohannes requested a review from a team April 20, 2023 18:17
@Oberon00
Copy link
Member

Thanks, I think this should indeed solve #2015.

@carlosalberto
Copy link
Contributor

CHANGELOG entry, please ;)

@pyohannes pyohannes force-pushed the messaging_attributes_client_id branch from cafb8a2 to 2c970cd Compare April 24, 2023 16:43
@pyohannes
Copy link
Contributor Author

CHANGELOG entry, please ;)

@carlosalberto Done.

@carlosalberto carlosalberto merged commit 9c1dd07 into open-telemetry:main Apr 24, 2023
carlosalberto pushed a commit to carlosalberto/opentelemetry-specification that referenced this pull request Oct 31, 2024
…generic (open-telemetry#3336)

Fixes open-telemetry#2015

## Changes

Based on discussions in the messaging workgroup and in issue open-telemetry#2015, this
PR proposes to remove `messaging.consumer.id`, and to replace both
`messaging.kafka.client_id` and `messaging.rocketmq.client_id` with a
generic `messaging.client_id`.

`messaging.consumer.id` is defined to always be set to the `client_id`
of the used messaging system, except for Kafka, where it was defined to
be a combination of `messaging.kafka.client_id` and
`messaging.kafka.consumer.group`, or just the latter if
`messaging.kafka.client_id` is not available. With this definition, the
semantics of `consumer.id` are different between messaging systems, and
even different for different Kafka scenarios.

The proposed `messaging.client_id` has consistent semantics ("an unique
client id, when it is available"), and can be used instead of
`messaging.consumer.id` in almost all cases.

In addition to have consistent semantics, this also simplifies the
semantic conventions, as instead of

`messaging.consumer.id`
`messaging.kafka.client_id`
`messaging.rocketmq.client_id`

there is now just:

`messaging.client_id`.
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 semconv:messaging spec:trace Related to the specification/trace directory
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Messaging consumer/client (group) ID could be made more generic
7 participants