Skip to content

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

Draft
ValentinZakharov wants to merge 1 commit into
masterfrom
vzakharov/guidewire
Draft

Propagate trace context across Guidewire WSI SOAP worker threads#12125
ValentinZakharov wants to merge 1 commit 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

datadog-prod-us1-5 Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 57.88% (-0.02%)

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

@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 13.97 s 13.99 s [-0.8%; +0.5%] (no difference)
startup:insecure-bank:tracing:Agent 12.94 s 12.98 s [-1.1%; +0.5%] (no difference)
startup:petclinic:appsec:Agent 16.89 s 16.63 s [+0.7%; +2.5%] (maybe worse)
startup:petclinic:iast:Agent 16.94 s 16.35 s [-0.8%; +8.0%] (no difference)
startup:petclinic:profiling:Agent 16.82 s 16.94 s [-1.9%; +0.5%] (no difference)
startup:petclinic:sca:Agent 16.82 s 16.61 s [+0.2%; +2.4%] (maybe worse)
startup:petclinic:tracing:Agent 16.14 s 16.13 s [-0.7%; +0.9%] (no difference)

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

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.

1 participant