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

Refactor messaging attributes and specify per-message attributes #2957

Merged

Conversation

lmolkova
Copy link
Contributor

@lmolkova lmolkova commented Nov 16, 2022

The final round of #2763

Changes

Messaging instrumentation SIG is working on spec changes and this change is one of the first steps to bring the consensus we reached in SIG to the spec.

This change introduces different namespace for different kinds of attributes:

  • messaging.message for message properties (e.g. message id or payload size)
  • messaging.destination for producers to describe publish operations (e.g. queue name)
  • messaging.source for consumers to describe receive/deliver/process operations (e.g. queue name)
  • messaging.batch for to describe batch properties (e.g. message count)
  • messaging.consumer for to describe consumer properties (e.g. consumer id)

It also introduces guidance for specific systems on namespaces.

Here's the list of breaking changes (attribute renames):

  • messaging.protocol: net.app.protocol.name
  • messaging.protocol_version: net.app.protocol.version
  • messaging.destination: messaging.destination.name
  • messaging.temp_destination: messaging.destination.temporary
  • messaging.destination_kind: messaging.destination.kind
  • messaging.message_id: messaging.message.id
  • messaging.conversation_id: messaging.message.conversation_id
  • messaging.message_payload_size_bytes: messaging.message.payload_size_bytes
  • messaging.message_payload_compressed_size_bytes: messaging.message.payload_compressed_size_bytes
  • messaging.rabbitmq.routing_key: messaging.rabbitmq.message.routing_key
  • messaging.kafka.message_key: messaging.kafka.message.key
  • messaging.kafka.partition: messaging.kafka.message.partition
  • messaging.kafka.tombstone: messaging.kafka.message.tombstone
  • messaging.rocketmq.message_type: messaging.rocketmq.message.type
  • messaging.rocketmq.message_tag: messaging.rocketmq.message.tag
  • messaging.rocketmq.message_keys: messaging.rocketmq.message.keys

It also adds the messaging.batch.message_count attribute which intends to:

  • denote a batching operation
  • record number of messages sent/received/processed - since links can be dropped or there can be some other links not describing messages, link count is not a reliable indicator of batch size. Assuming a high-scale scenario, users might want to opt-out from per-message tracing, but then batch_size would still be useful

Related OTEP(s) #

@arminru arminru added semconv:messaging area:semantic-conventions Related to semantic conventions spec:trace Related to the specification/trace directory labels Nov 21, 2022
@lmolkova lmolkova force-pushed the messaging-batching-attributes branch 3 times, most recently from bb6e939 to 57ec5e8 Compare November 22, 2022 01:42
Copy link
Member

@joaopgrassi joaopgrassi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did a first pass on the yaml file, looking great! I will take a look at the rest later and submit a new review then.

semantic_conventions/trace/messaging.yaml Outdated Show resolved Hide resolved
semantic_conventions/trace/messaging.yaml Outdated Show resolved Hide resolved
semantic_conventions/trace/messaging.yaml Outdated Show resolved Hide resolved
semantic_conventions/trace/messaging.yaml Outdated Show resolved Hide resolved
semantic_conventions/trace/messaging.yaml Outdated Show resolved Hide resolved
semantic_conventions/trace/messaging.yaml Outdated Show resolved Hide resolved
semantic_conventions/trace/messaging.yaml Outdated Show resolved Hide resolved
semantic_conventions/trace/messaging.yaml Outdated Show resolved Hide resolved
semantic_conventions/trace/messaging.yaml Outdated Show resolved Hide resolved
semantic_conventions/trace/messaging.yaml Outdated Show resolved Hide resolved
Copy link
Member

@joaopgrassi joaopgrassi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to do another pass before the meeting, but only got around it today.

specification/trace/semantic_conventions/messaging.md Outdated Show resolved Hide resolved
specification/trace/semantic_conventions/messaging.md Outdated Show resolved Hide resolved
specification/trace/semantic_conventions/messaging.md Outdated Show resolved Hide resolved
specification/trace/semantic_conventions/messaging.md Outdated Show resolved Hide resolved
specification/trace/semantic_conventions/messaging.md Outdated Show resolved Hide resolved
specification/trace/semantic_conventions/messaging.md Outdated Show resolved Hide resolved
specification/trace/semantic_conventions/messaging.md Outdated Show resolved Hide resolved
specification/trace/semantic_conventions/messaging.md Outdated Show resolved Hide resolved
specification/trace/semantic_conventions/messaging.md Outdated Show resolved Hide resolved
@pyohannes
Copy link
Contributor

@lmolkova Can you please rebase? This should fix the failing markdown-link build job.

@lmolkova lmolkova force-pushed the messaging-batching-attributes branch 2 times, most recently from 307ede1 to b896623 Compare December 1, 2022 20:50
@lmolkova lmolkova force-pushed the messaging-batching-attributes branch from 7fe171c to 084d6db Compare December 22, 2022 02:32
@carlosalberto carlosalberto merged commit 52a3589 into open-telemetry:main Dec 22, 2022
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.

10 participants