Skip to content

Propagate trace context across Guidewire WSI SOAP worker threads - #12125

Open
ValentinZakharov wants to merge 2 commits into
masterfrom
vzakharov/guidewire
Open

Propagate trace context across Guidewire WSI SOAP worker threads#12125
ValentinZakharov wants to merge 2 commits into
masterfrom
vzakharov/guidewire

Conversation

@ValentinZakharov

Copy link
Copy Markdown
Contributor

What Does This Do

Adds a guidewire instrumentation so outbound SOAP calls keep their trace context.

Guidewire runs every SOAP call on its own raw thread (AsyncResponseImpl$WebserviceInvocationThread, shown as "WSI-Invocation"). We grab the current context when that thread is created and restore it when it runs, so the SOAP http.request span stays attached to its parent instead of starting a new trace

Motivation

The agent propagates context for thread pools, but not for a plain new Thread().start() - which is exactly how Guidewire makes SOAP calls. So the SOAP spans lost their parent (parent_id=0).
We can't instrument java.lang.Thread directly (it's on the agent's ignore list and loads before the agent), so we instrument Guidewire's own thread subclass instead

Additional Notes

  • Self-contained: it both captures (in the constructor) and re-activates (in run()), so it works on its own. If the default runnable instrumentation also wraps run(), that's safe - the context is only consumed once.
  • Narrow match: only Guidewire's WSI worker (AsyncResponseImpl$… that extends Thread). Normal thread-pool workers are not touched.
  • Verified on three customer profiles (PolicyCenter, BillingCenter, Commercial-Lines PolicyCenter) - same class everywhere.
  • New config: DD_TRACE_GUIDEWIRE_ENABLED (on by default)

Contributor Checklist

Jira ticket: [PROJ-IDENT]

@datadog-prod-us1-5

This comment has been minimized.

@ValentinZakharov
ValentinZakharov force-pushed the vzakharov/guidewire branch 6 times, most recently from 1d2498c to 6db4a35 Compare August 3, 2026 12:46
@dd-octo-sts

dd-octo-sts Bot commented Aug 3, 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.04 s 14.07 s [-1.0%; +0.7%] (no difference)
startup:insecure-bank:tracing:Agent 12.98 s 12.96 s [-0.6%; +0.9%] (no difference)
startup:petclinic:appsec:Agent 17.07 s 16.97 s [-0.4%; +1.6%] (no difference)
startup:petclinic:iast:Agent 17.05 s 16.99 s [-0.5%; +1.3%] (no difference)
startup:petclinic:profiling:Agent 16.69 s 16.96 s [-2.6%; -0.6%] (maybe better)
startup:petclinic:sca:Agent 17.03 s 16.91 s [-0.3%; +1.7%] (no difference)
startup:petclinic:tracing:Agent 16.10 s 16.04 s [-0.7%; +1.4%] (no difference)

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

@ValentinZakharov
ValentinZakharov force-pushed the vzakharov/guidewire branch 2 times, most recently from 939ccf2 to eefb670 Compare August 3, 2026 13:34
@ValentinZakharov ValentinZakharov self-assigned this Aug 19, 2026
@ValentinZakharov ValentinZakharov added tag: ai generated Largely based on code generated by an AI or LLM inst: guidewire labels Aug 19, 2026
@ValentinZakharov

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: eefb670331

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@ValentinZakharov
ValentinZakharov marked this pull request as ready for review August 19, 2026 21:39
@ValentinZakharov
ValentinZakharov requested review from a team as code owners August 19, 2026 21:39
@ValentinZakharov
ValentinZakharov requested review from sarahchen6 and ygree and removed request for a team August 19, 2026 21:39
@dd-octo-sts

dd-octo-sts Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Hi! 👋 Thanks for your pull request! 🎉

To help us review it, please make sure to:

  • Add at least one type, and one component or instrumentation label to the pull request

If you need help, please check our contributing guidelines.

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

Datadog Autotest: FAIL

A Guidewire worker can be created under an active span and never run. The constructor then keeps a trace continuation open, so the trace can remain unreported.

Open Bits AI session

🤖 Datadog Autotest · Commit eefb670 · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest

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

Looks good from the LP side! Though I think you'll need to add the new DD_TRACE_GUIDEWIRE_ENABLED to https://feature-parity.us1.prod.dog/configurations?viewType=configurations to address the failing validate_supported_configurations_v2_local_file job.

@ValentinZakharov
ValentinZakharov force-pushed the vzakharov/guidewire branch 2 times, most recently from 00b498e to 47aed56 Compare August 24, 2026 18:24

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

Has this instrumentations been tested with a real Guidewire impl?

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

Approving, assuming it has been tested with a real Guidewire dependency.

@ValentinZakharov
ValentinZakharov added this pull request to the merge queue Sep 1, 2026
@dd-octo-sts

dd-octo-sts Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

/merge

@gh-worker-devflow-routing-ef8351

gh-worker-devflow-routing-ef8351 Bot commented Sep 1, 2026

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-09-01 12:15:36 UTC ℹ️ Start processing command /merge


2026-09-01 12:15:42 UTC ℹ️ MergeQueue: pull request added to the queue

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


2026-09-01 12:40:54 UTCMergeQueue: The build pipeline contains failing jobs for this merge request

Build pipeline has failing jobs for 0e3662f:

⚠️ Do NOT retry failed jobs directly (why?).

What to do next?

  • Investigate the failures and when ready, re-add your pull request to the queue!
  • If your PR checks are green, try to rebase/merge. It might be because the CI run is a bit old.
  • Any question, go check the FAQ.
Details

Since those jobs are not marked as being allowed to fail, the pipeline will most likely fail.
Therefore, and to allow other builds to be processed, this merge request has been rejected and the pipeline got canceled.

@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Sep 1, 2026
@ValentinZakharov
ValentinZakharov force-pushed the vzakharov/guidewire branch 5 times, most recently from e0589af to 7ebdaef Compare September 2, 2026 13:47
@ValentinZakharov
ValentinZakharov added this pull request to the merge queue Sep 2, 2026
@dd-octo-sts

dd-octo-sts Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

/merge

@gh-worker-devflow-routing-ef8351

gh-worker-devflow-routing-ef8351 Bot commented Sep 2, 2026

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-09-02 17:40:05 UTC ℹ️ Start processing command /merge
Use /merge -c to cancel this operation!


2026-09-02 17:40:10 UTC ℹ️ MergeQueue: pull request added to the queue

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

Use /merge -c to cancel this operation!


⏳ Building merge commit 539a62f38c in pipeline 1220640332081307931...

@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

inst: guidewire tag: ai generated Largely based on code generated by an AI or LLM type: feature request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants