Skip to content

Make reactor-core / reactive-streams context propagation Context-first#11578

Open
amarziali wants to merge 1 commit into
masterfrom
andrea.marziali/redesign-reactor
Open

Make reactor-core / reactive-streams context propagation Context-first#11578
amarziali wants to merge 1 commit into
masterfrom
andrea.marziali/redesign-reactor

Conversation

@amarziali
Copy link
Copy Markdown
Contributor

What Does This Do

Reworks the reactor-core-3.1 and reactive-streams-1.0 instrumentations to propagate the full Context (instead of just AgentSpan). The new behaviour refactor only a bit the code and should not add major changes.
The context is only propagated on the reactor chain - the user can only infer a SpanContext but not a full one since Context is not part of the public API.
Also, we used instanceOf to identify Reactor's context-aware types on the hot-path. This has been changed by type matching at transform time that will be more efficient.

Additional tests have been added for the full context propagation cases and also to avoid reintroducing perf regressions because of reading the reactor context each time in the hot path.

Motivation

Additional Notes

Contributor Checklist

  • Format the title according to the contribution guidelines
  • Assign the type: and (comp: or inst:) labels in addition to any other useful labels
  • Avoid using close, fix, or any linking keywords when referencing an issue
    Use solves instead, and assign the PR milestone to the issue
  • Update the CODEOWNERS file on source file addition, migration, or deletion
  • Update public documentation with any new configuration flags or behaviors
  • Add your completed PR to the merge queue by commenting /merge. You can also:
    • Customize the commit message associated with the merge with /merge --commit-message "..."
    • Remove your PR from the merge queue with /merge -c
    • Skip all merge queue checks with /merge -f --reason "reason"; please use this judiciously, as some checks do not run at the PR-level (note: the PR still needs to be mergeable, this will only skip the pre-merge build)
    • Get more information in this doc

Jira ticket: [PROJ-IDENT]

@amarziali amarziali requested a review from a team as a code owner June 5, 2026 10:48
@amarziali amarziali requested review from ygree and removed request for a team June 5, 2026 10:48
@amarziali amarziali added type: refactoring inst: reactor Reactor instrumentation labels Jun 5, 2026
@amarziali amarziali requested a review from mcculls June 5, 2026 10:48
@dd-octo-sts
Copy link
Copy Markdown
Contributor

dd-octo-sts Bot commented Jun 5, 2026

🟢 Java Benchmark SLOs — All performance SLOs passed

Suite Status
Startup 🟢 pass

SLO thresholds are defined here based on automatically generated metrics. A warning is raised when results are within 5% of the threshold.

PR vs. master results
Scenario Candidate master Δ (95% CI of mean)
startup:insecure-bank:iast:Agent 14.04 s 13.89 s [+0.2%; +2.1%] (maybe worse)
startup:insecure-bank:tracing:Agent 12.87 s 12.93 s [-1.6%; +0.7%] (no difference)
startup:petclinic:appsec:Agent 16.41 s 16.33 s [-0.5%; +1.5%] (no difference)
startup:petclinic:iast:Agent 15.91 s 16.71 s [-13.1%; +3.4%] (unstable)
startup:petclinic:profiling:Agent 16.60 s 16.52 s [-1.1%; +2.1%] (no difference)
startup:petclinic:tracing:Agent 15.85 s 15.83 s [-1.3%; +1.5%] (no difference)

Commit: 9126140b · CI Pipeline · Benchmarking Platform UI


Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion.

@PerfectSlayer PerfectSlayer added the tag: concurrency Virtual Threads, Coroutines, Async, RX, Executors label Jun 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

inst: reactor Reactor instrumentation tag: concurrency Virtual Threads, Coroutines, Async, RX, Executors type: refactoring

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants