Commit 7a32081
committed
Fix RocketMQ context propagation for batch messages in version 5.3.4+
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#155121 parent ad6cc1b commit 7a32081
File tree
2 files changed
+7
-4
lines changed- instrumentation/rocketmq/rocketmq-client
- rocketmq-client-4.8/testing/src/main/java/io/opentelemetry/instrumentation/rocketmqclient/v4_8
- rocketmq-client-5.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/rocketmqclient/v5_0
2 files changed
+7
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
252 | 252 | | |
253 | 253 | | |
254 | 254 | | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | 255 | | |
259 | 256 | | |
260 | 257 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
| 53 | + | |
52 | 54 | | |
53 | | - | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
54 | 60 | | |
55 | 61 | | |
56 | 62 | | |
| |||
0 commit comments