open-telemetry / open-telemetry/opentelemetry-java-instrumentation

Generalize messaging Create-span configuration

Open
#19,700 0 comments 1 reaction 2 assignees View on GitHub

@trask is already working on this.

Since Aug 19, 2026.

  • #20045 by @copilot-swe-agent — open
enhancement needs triage
Dominant language
Java
Stars
2.6k
Forks
1.2k
Avg merge
2d 16h
Merged PRs (30d)
214

Description

Is your feature request related to a problem? Please describe.

#19485 adds an AWS SDK option for per-message Create spans on SQS batch sends. The messaging semantic conventions recommend this opt-out for batch-oriented APIs, but a one-off setting can lead to inconsistent behavior across messaging instrumentations.

Describe the solution you'd like

Add the common flat property otel.instrumentation.common.messaging.experimental.message-create-spans.enabled and declarative path java.common.messaging.message_create_spans/development.enabled for per-message Create spans.

Allow instrumentation-specific overrides using otel.instrumentation.<name>.experimental.message-create-spans.enabled and java.<name>.message_create_spans/development.enabled. The specific value should take precedence over the common value, which should take precedence over the default. #19485 establishes the AWS SDK override as otel.instrumentation.aws-sdk.experimental.message-create-spans.enabled and java.aws_sdk.message_create_spans/development.enabled.

Apply this behavior consistently to instrumented APIs that send multiple messages in one operation, including RocketMQ where applicable. Cover system properties, declarative configuration, library builders, and metadata.

Describe alternatives you've considered

Keep only the AWS SDK setting. This avoids shared configuration now but allows batch producer instrumentation to drift.

Additional context

Follow-up to #19485 and #19415. The semantic conventions recommend both per-message Create spans and a configuration option to disable them for batch-oriented APIs: 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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.