Commit 019fecb
Fix AppSec/IAST context dropped when trace.propagation.behavior.extract=ignore/restart (#11666)
Fix AppSec/IAST context dropped when trace.propagation.behavior.extract=ignore/restart
With IGNORE or RESTART, CoreSpanBuilder nulls the remote TagContext parent before
buildSpanContext reaches the instanceof TagContext branch that copies
requestContextDataAppSec/requestContextDataIast. The AppSec context is lost and
GatewayBridge callbacks no-op, silently bypassing WAF/RASP for all inbound requests
in AppSec-enabled services configured to ignore distributed tracing extraction.
Fix: promote the AppSec/IAST data from the TagContext into the builder fields before
nulling the parent. The builder-field path in buildSpanContext applies these after
the parent is gone, preserving the request context while still correctly dropping
trace identifiers and sampling priority.
Fixes: APMSP-3198
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Apply spotless formatting
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Merge branch 'master' into dougqh/fix-appsec-context-extract-ignore
Co-authored-by: devflow.devflow-routing-intake <devflow.devflow-routing-intake@kubernetes.us1.ddbuild.io>1 parent 2489b79 commit 019fecb
2 files changed
Lines changed: 46 additions & 0 deletions
File tree
- dd-trace-core/src
- main/java/datadog/trace/core
- test/java/datadog/trace/core
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1790 | 1790 | | |
1791 | 1791 | | |
1792 | 1792 | | |
| 1793 | + | |
| 1794 | + | |
| 1795 | + | |
| 1796 | + | |
| 1797 | + | |
| 1798 | + | |
| 1799 | + | |
| 1800 | + | |
| 1801 | + | |
| 1802 | + | |
| 1803 | + | |
| 1804 | + | |
1793 | 1805 | | |
1794 | 1806 | | |
1795 | 1807 | | |
| |||
Lines changed: 34 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
422 | 422 | | |
423 | 423 | | |
424 | 424 | | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
425 | 459 | | |
426 | 460 | | |
427 | 461 | | |
| |||
0 commit comments