Skip to content

Ignore idle Synapse client callbacks - #13298

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 4 commits into
masterfrom
alexeyk/synapse-idle-client-callbacks
Nov 12, 2026
Merged

gh-worker-dd-mergequeue-cf854d[bot] merged 4 commits into
masterfrom
alexeyk/synapse-idle-client-callbacks

Conversation

@AlexeyKuznetsov-DD

Copy link
Copy Markdown
Contributor

What Does This Do

Ignore Synapse client callbacks that have no pending request or whose connection is not ready to submit a request. Skip request decoration when the entry advice did not create a scope.

Motivation

The transport can invoke requestReady repeatedly, including while a connection is idle or a request is already in progress. Our advice treated every callback as a new request, creating phantom spans and overwriting the real request's stored context. It also attempted propagation and request decoration when no request was available, causing suppressed null dereferences and incorrect trace linkage.

The guards now follow Synapse's request-submission conditions so only a pending request starts a client span or receives propagated headers.

Additional Notes

Observed instrumentation failure:

java.lang.NullPointerException
    at org.apache.synapse.transport.passthru.TargetHandler.requestReady(TargetHandler.java:140)

The exit advice dereferenced the missing request before closing its scope. Ignoring callbacks that cannot submit a request avoids this path and preserves the existing request context.

Validation: both complete Synapse naming-convention suites passed in 20 consecutive runs: 200 test executions, zero failures or skips. Each run used fresh test workers and disabled test-result caching.

Related precedent: #10892 addressed earlier Synapse propagation and span-tagging defects. The callback guards address a separate gap that predates that change.

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 issue-closing keywords when referencing an issue
  • Update CODEOWNERS on source file addition, migration, or deletion — not applicable
  • Update public documentation with new configuration flags or behaviors — not applicable
  • Once approved, use merge queue to merge the PR

Jira ticket: N/A

@AlexeyKuznetsov-DD AlexeyKuznetsov-DD added type: bug fix Bug fix tag: ai generated Largely based on code generated by an AI or LLM inst: synapse Synapse Instrumentation labels Nov 7, 2026
@datadog-datadog-prod-us1-2

datadog-datadog-prod-us1-2 Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

🎯 Code Coverage (details)
• Patch Coverage: 100.00%
• Overall Coverage: 68.82% (+9.05%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: d03e8b7 | Docs | Give us feedback!

@dd-octo-sts

dd-octo-sts Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

🟢 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.03 s 13.98 s [-0.2%; +0.9%] (no difference)
startup:insecure-bank:tracing:Agent 12.89 s 12.95 s [-1.2%; +0.3%] (no difference)
startup:petclinic:appsec:Agent 17.12 s 17.01 s [-0.2%; +1.6%] (no difference)
startup:petclinic:iast:Agent 17.00 s 17.06 s [-1.0%; +0.3%] (no difference)
startup:petclinic:profiling:Agent 16.69 s 16.84 s [-1.8%; +0.1%] (no difference)
startup:petclinic:sca:Agent 17.07 s 16.92 s [+0.1%; +1.7%] (maybe worse)
startup:petclinic:tracing:Agent 16.04 s 16.10 s [-1.3%; +0.5%] (no difference)

Commit: d03e8b7e · 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.

@AlexeyKuznetsov-DD
AlexeyKuznetsov-DD marked this pull request as ready for review November 10, 2026 19:49
@AlexeyKuznetsov-DD
AlexeyKuznetsov-DD requested review from a team as code owners November 10, 2026 19:49
@AlexeyKuznetsov-DD
AlexeyKuznetsov-DD requested review from jbachorik and ygree and removed request for a team November 10, 2026 19:49
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-10T19:52:02.559197Z e062a5c Draft marked ready
🔒 Security Review ✅ Completed 2026-11-10T19:53:40.463107Z e062a5c Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@datadog-datadog-prod-us1-2 datadog-datadog-prod-us1-2 Bot 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.

Bits Code Review: PASS

More details

The guards consistently skip span creation and propagation when Synapse cannot submit a request, while exit advice safely handles a skipped entry. The completed static review identified no actionable regression.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit e062a5c

@ygree ygree 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.

IDM reviewed.

@AlexeyKuznetsov-DD

Copy link
Copy Markdown
Contributor Author

/merge

@gh-worker-devflow-routing-ef8351

gh-worker-devflow-routing-ef8351 Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-11-12 19:54:43 UTC ℹ️ Start processing command /merge


2026-11-12 19:54:47 UTC ℹ️ MergeQueue: pull request added to the queue

The expected merge time in master is approximately 1h (p90).


2026-11-12 20:47:59 UTC ℹ️ MergeQueue: This merge request was merged

@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot merged commit 2eecaf6 into master Nov 12, 2026
685 checks passed
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot deleted the alexeyk/synapse-idle-client-callbacks branch November 12, 2026 20:47
@github-actions github-actions Bot added this to the 1.69.0 milestone Nov 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

inst: synapse Synapse Instrumentation tag: ai generated Largely based on code generated by an AI or LLM type: bug fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants