Is your feature request related to a problem? Please describe.
RocketMQ 4.8 exposes the explicit DefaultMQProducer.send(Collection<Message>) batch API. The instrumentation currently creates one producer send span and propagates its context to every message. The stable-semconv batch test consequently asserts multiple identical consumer links to that shared producer context instead of one distinct creation context per message.
Describe the solution you'd like
For RocketMQ 4.8 batch sends, emit one message-creation span per eligible message, inject its context into that message, and make the batch send span link to every message creation context. Preserve custom creation contexts when present.
Use the common otel.instrumentation.messaging.batch-send.message-creation-spans.enabled setting to control the additional per-message spans. Keep single-message sends unchanged.
Describe alternatives you've considered
Keep propagating the shared batch send context. This preserves propagation but prevents consumers from identifying the individual message creation context represented by each link.
Additional context
The current test demonstrates the duplicate-link behavior: https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/instrumentation/rocketmq/rocketmq-client-4.8/testing/src/main/java/io/opentelemetry/instrumentation/rocketmqclient/v4_8/AbstractRocketMqClientTest.java
Configuration design is tracked in #19700. The SQS implementation is #19485. Messaging semantic conventions recommend one Create span per message for batch-oriented APIs and a configuration option to disable them: https://opentelemetry.io/docs/specs/semconv/messaging/messaging-spans/#producer-spans
Tip
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.
Is your feature request related to a problem? Please describe.
RocketMQ 4.8 exposes the explicit
DefaultMQProducer.send(Collection<Message>)batch API. The instrumentation currently creates one producer send span and propagates its context to every message. The stable-semconv batch test consequently asserts multiple identical consumer links to that shared producer context instead of one distinct creation context per message.Describe the solution you'd like
For RocketMQ 4.8 batch sends, emit one message-creation span per eligible message, inject its context into that message, and make the batch send span link to every message creation context. Preserve custom creation contexts when present.
Use the common
otel.instrumentation.messaging.batch-send.message-creation-spans.enabledsetting to control the additional per-message spans. Keep single-message sends unchanged.Describe alternatives you've considered
Keep propagating the shared batch send context. This preserves propagation but prevents consumers from identifying the individual message creation context represented by each link.
Additional context
The current test demonstrates the duplicate-link behavior: https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/instrumentation/rocketmq/rocketmq-client-4.8/testing/src/main/java/io/opentelemetry/instrumentation/rocketmqclient/v4_8/AbstractRocketMqClientTest.java
Configuration design is tracked in #19700. The SQS implementation is #19485. Messaging semantic conventions recommend one
Createspan per message for batch-oriented APIs and a configuration option to disable them: https://opentelemetry.io/docs/specs/semconv/messaging/messaging-spans/#producer-spansTip
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding
+1orme too, to help us triage it. Learn more here.