Skip to content

Conversation

@Arunodoy18
Copy link

Context propagation was not working correctly for batch messages in RocketMQ 5.0+ because all messages in a batch were sharing the same receive span context instead of each message having its own context extracted from message properties.

Changes:

  • Modified ReceiveSpanFinishingCallback to extract individual context for each message in the batch using MessageMapGetter to read trace headers
  • Each message now gets its own properly linked context for correct tracing
  • Re-enabled testRocketmqProduceAndBatchConsume test for latest dependencies

This fixes the issue where batch message consumers would not properly propagate trace context from producers, breaking distributed tracing for RocketMQ batch message processing in versions 5.3.4+.

Resolves the disabled test from #15512

Context propagation was not working correctly for batch messages in RocketMQ 5.0+
because all messages in a batch were sharing the same receive span context instead
of each message having its own context extracted from message properties.

Changes:
- Modified ReceiveSpanFinishingCallback to extract individual context for each
  message in the batch using MessageMapGetter to read trace headers
- Each message now gets its own properly linked context for correct tracing
- Re-enabled testRocketmqProduceAndBatchConsume test for latest dependencies

This fixes the issue where batch message consumers would not properly propagate
trace context from producers, breaking distributed tracing for RocketMQ batch
message processing in versions 5.3.4+.

Resolves the disabled test from open-telemetry#15512
@Arunodoy18 Arunodoy18 requested a review from a team as a code owner December 6, 2025 16:46
@trask
Copy link
Member

trask commented Dec 6, 2025

Moving to draft, please move back to ready to review once the tests are passing.

@trask trask marked this pull request as draft December 6, 2025 20:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants