opentelemetry-specification icon indicating copy to clipboard operation
opentelemetry-specification copied to clipboard

Clarify per-message attributes usage in batching scenarios

Open lmolkova opened this issue 3 years ago • 4 comments

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 clarifies that per-message attributes should be set on links when the corresponding span represents a batching operation. It introduced breaking changes (attribute renames)

  • messaging.message_id to messaging.message.id
  • messaging.conversation_id to messaging.message.conversation_id
  • messaging.message_payload_size_bytes to messaging.message.payload_size_bytes
  • messaging.message_payload_compressed_size_bytes to messaging.message.payload_compressed_size_bytes.

Going forward, we'd like to reserve messaging.message. namespace for other possible per-message attributes.

It also adds the messaging.batch_size attribute which intends to:

  • denote a bathing 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

lmolkova avatar Aug 30 '22 21:08 lmolkova

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

github-actions[bot] avatar Sep 27 '22 03:09 github-actions[bot]

Not stale

joaopgrassi avatar Sep 27 '22 08:09 joaopgrassi

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

github-actions[bot] avatar Oct 07 '22 03:10 github-actions[bot]

Not stale

joaopgrassi avatar Oct 08 '22 09:10 joaopgrassi

Also, I support moving this PR out of draft and asking for reviews from the community so we can progress towards merging this.

blumamir avatar Nov 16 '22 13:11 blumamir

Thanks everyone for the review! Per discussion at the last SIG meeting, I'm going to close this one and open a new PR - #2957 (to simplify final review process).

lmolkova avatar Nov 16 '22 20:11 lmolkova