Add shared messaging process topology#19268
Conversation
Pull request dashboard statusStatus last refreshed: 2026-07-21 20:05:34 UTC.
This automated status or its linked feedback items may be incorrect. If something looks wrong, report it with the result you expected. |
ff11314 to
338dab6
Compare
338dab6 to
468e026
Compare
There was a problem hiding this comment.
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. |
321d485 to
3e750e6
Compare
3e750e6 to
13e5678
Compare
There was a problem hiding this comment.
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));
13e5678 to
1632d29
Compare
46d230b to
e001fa6
Compare
e001fa6 to
582a12e
Compare
c55a4fb to
02ef2b3
Compare
02ef2b3 to
0c903bd
Compare
There was a problem hiding this comment.
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 itstraceparenthave 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())
0c903bd to
dc68fa8
Compare
dc68fa8 to
a08723a
Compare
a08723a to
b41153e
Compare
b41153e to
9b5ec57
Compare
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:checklifecycle.