Skip to content

Add shared messaging process topology#19268

Draft
trask wants to merge 3 commits into
open-telemetry:mainfrom
trask:messaging-v1-43-topology
Draft

Add shared messaging process topology#19268
trask wants to merge 3 commits into
open-telemetry:mainfrom
trask:messaging-v1-43-topology

Conversation

@trask

@trask trask commented Jul 19, 2026

Copy link
Copy Markdown
Member

Depends on #19267.

Dependency baseline: 71cd7a78a22054d7e337169311c2d60c48b52c6d.
Review only: 71cd7a78a22054d7e337169311c2d60c48b52c6d..9b5ec57607668f417ce57a15c2281897fcb3f774.

Exactly one topology commit. Stable process spans avoid parent-equal links by IDs, preserve the original ambient Span object, and retain propagated non-span context.

Validated across default/stable/dual modes plus the full instrumentation-api-incubator:check lifecycle.

@opentelemetry-pr-dashboard

opentelemetry-pr-dashboard Bot commented Jul 19, 2026

Copy link
Copy Markdown

Pull request dashboard status

Status last refreshed: 2026-07-21 20:05:34 UTC.

  • Waiting on: Author
  • Next step: Move out of draft to request review.

This automated status or its linked feedback items may be incorrect. If something looks wrong, report it with the result you expected.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds shared messaging process-span topology while preserving legacy receive behavior.

Changes:

  • Preserves ambient parents, otherwise extracts producer context.
  • Centralizes process instrumenter construction and producer links.
  • Tests ambient-parent and producer-fallback behavior.

Reviewed changes

Copilot reviewed 30 out of 30 changed files in this pull request and generated 1 comment.

File Description
MessagingProcessContextCustomizer.java Selects ambient or producer context.
MessagingProcessInstrumenterFactory.java Builds compatible process topology.
MessagingProcessContextCustomizerTest.java Tests context selection.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 31 out of 31 changed files in this pull request and generated no new comments.

@trask
trask force-pushed the messaging-v1-43-topology branch from 321d485 to 3e750e6 Compare July 19, 2026 20:31
@trask
trask requested a review from Copilot July 19, 2026 20:31

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 31 out of 31 changed files in this pull request and generated no new comments.

@trask
trask force-pushed the messaging-v1-43-topology branch from 3e750e6 to 13e5678 Compare July 21, 2026 01:52
@trask
trask requested a review from Copilot July 21, 2026 02:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 31 out of 31 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

instrumentation-api-incubator/src/main/java/io/opentelemetry/instrumentation/api/incubator/semconv/messaging/internal/MessagingProcessInstrumenterFactory.java:29

  • [General] In stable mode this link extractor always adds the propagated producer context before the customizer runs. When there is no valid ambient parent, the customizer then selects that same producer context as the span parent, so the resulting process span records its parent again as a link. Add the producer as a link only when an ambient parent is actually retained (and the contexts differ), and cover the stable/no-ambient case in the factory test.
      builder.addSpanLinksExtractor(new PropagatorBasedSpanLinksExtractor<>(propagator, getter));

@trask
trask force-pushed the messaging-v1-43-topology branch from 13e5678 to 1632d29 Compare July 21, 2026 04:15
@trask
trask requested a review from Copilot July 21, 2026 04:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 31 out of 31 changed files in this pull request and generated no new comments.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 31 out of 31 changed files in this pull request and generated no new comments.

@trask
trask force-pushed the messaging-v1-43-topology branch from 46d230b to e001fa6 Compare July 21, 2026 05:04
@trask
trask requested a review from Copilot July 21, 2026 05:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 31 out of 31 changed files in this pull request and generated no new comments.

@trask
trask force-pushed the messaging-v1-43-topology branch from e001fa6 to 582a12e Compare July 21, 2026 05:15
@trask
trask requested a review from Copilot July 21, 2026 05:22

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 31 out of 31 changed files in this pull request and generated 1 comment.

@trask
trask force-pushed the messaging-v1-43-topology branch 2 times, most recently from c55a4fb to 02ef2b3 Compare July 21, 2026 05:36
@trask
trask requested a review from Copilot July 21, 2026 06:22
@trask
trask force-pushed the messaging-v1-43-topology branch from 02ef2b3 to 0c903bd Compare July 21, 2026 06:30

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 31 out of 31 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

instrumentation-api-incubator/src/main/java/io/opentelemetry/instrumentation/api/incubator/semconv/messaging/internal/MessagingProcessInstrumenterFactory.java:39

  • [General] SpanContext.equals() also compares properties such as the remote flag, so a local ambient parent and the context extracted from its traceparent have the same span identity but are not equal. This then adds the parent span itself as a link, contrary to the intended parent-equal link suppression. Compare trace/span IDs instead, and cover the local-parent case in the regression test.
                && (!producerSpanContext.getTraceId().equals(parentSpanContext.getTraceId())

@trask
trask force-pushed the messaging-v1-43-topology branch from 0c903bd to dc68fa8 Compare July 21, 2026 06:38
@trask
trask requested a review from Copilot July 21, 2026 06:50

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 31 out of 31 changed files in this pull request and generated 1 comment.

@trask
trask force-pushed the messaging-v1-43-topology branch from dc68fa8 to a08723a Compare July 21, 2026 06:56
@trask
trask force-pushed the messaging-v1-43-topology branch from a08723a to b41153e Compare July 21, 2026 07:01
@trask
trask requested a review from Copilot July 21, 2026 07:03

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 31 out of 31 changed files in this pull request and generated no new comments.

@trask
trask force-pushed the messaging-v1-43-topology branch from b41153e to 9b5ec57 Compare July 21, 2026 17:42
@trask
trask requested a review from Copilot July 21, 2026 17:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 31 out of 31 changed files in this pull request and generated no new comments.

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