Closed lmolkova closed 4 days ago
I'm in favor of making this a generic attribute (outside the kafka
namespace).
I have no strong opinion whether it should be messaging.offset
or messaging.message.offset
. I'd have a slight preference for messaging.offset
because it's shorter.
Related: #1036
Did some research on the terminology used by different messaging systems:
message.properties.headers["x-stream-offset"]
Based on this, I would prefer messaging.kafka.offset
, messaging.eventhubs.offset
(future), messaging.rabbitmq.offset
(if needed)
Discussed in the workgroup meeting, we will go with the proposal from @lmolkova in the previous comment.
Kafka settlement is offset-based.
When reporting settlement, we'd want to include
messaging.kafka.message.offset
on the settlement span as shown in https://github.com/open-telemetry/semantic-conventions/pull/1155. But that span does not have to be reported per message (it can be done in the background periodically, for each 1000th message, etc).It looks weird to have the offset attribute in the message namespace as it's not just a message property, but also a thing on its own. Someone may also want to create a metric for the offset (e.g. latest published offset vs latest consumed offset would show the size of the queue). In this case it's rather a property of the topic/consumer group.
Suggesting
messaging.kafka.offset
or even a more generic onemessaging.offset
since offset concept is popular in messaging world.