Skip to content

Conversation

@laurit
Copy link
Contributor

@laurit laurit commented Dec 2, 2025

Context propagation doesn't seem to work with rocketmq-client:5.3.4 for batch messages. @aaron-ai @steverao if you care about this you are welcome to debug it and work with the rocketmq community if this turns out to be a bug in the rocketmq client.

@laurit laurit requested a review from a team as a code owner December 2, 2025 09:14
Copy link
Contributor

@steverao steverao left a comment

Choose a reason for hiding this comment

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

@Cirilla-zmh Could you help to debug this problem?

@laurit laurit enabled auto-merge (squash) December 2, 2025 09:32
@laurit laurit merged commit 68b7715 into open-telemetry:main Dec 2, 2025
85 checks passed
@laurit laurit deleted the rocketmq-batch-disable branch December 2, 2025 11:37
@Cirilla-zmh
Copy link
Member

@Cirilla-zmh Could you help to debug this problem?

Sure. Please assign this to me.

123liuziming pushed a commit to 123liuziming/opentelemetry-java-instrumentation that referenced this pull request Dec 3, 2025
@trask
Copy link
Member

trask commented Dec 3, 2025

opened #15526, if you comment on that issue then github will allow me to assign it to you

Arunodoy18 added a commit to Arunodoy18/opentelemetry-java-instrumentation that referenced this pull request Dec 4, 2025
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 added a commit to Arunodoy18/opentelemetry-java-instrumentation that referenced this pull request Dec 6, 2025
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
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.

4 participants