Skip to content

[AAP] Trace tagging rules#8581

Merged
e-n-0 merged 7 commits into
masterfrom
flavien.darche/real-trace-tagging
May 12, 2026
Merged

[AAP] Trace tagging rules#8581
e-n-0 merged 7 commits into
masterfrom
flavien.darche/real-trace-tagging

Conversation

@e-n-0

@e-n-0 e-n-0 commented May 7, 2026

Copy link
Copy Markdown
Member

Summary of changes

Add support for AAP trace-tagging rules from WAF and ASM_DD config.

Reason for change

RFC-1034 lets AppSec rules attach trace attributes and request trace retention without creating an AppSec event. The tracer needs to preserve those WAF outputs and report them on the span with the right tag/metric types and sampling priority.

Follow up of #7332 and #7331 (incorrectly reporting the capabilities as they missed the implementation).

Implementation details

  • Parse WAF keep and attributes results, splitting schema attributes, fingerprint attributes, and trace-tagging span attributes.
  • Report trace-tagging attributes as tags or metrics based on their native type. Numeric-looking strings stay strings.
  • Preserve JValue scalar types when encoding WAF inputs.
  • Add rules_compat support for ASM_DD configs and advertise the ASM_DD multiconfig / trace-tagging capabilities.
  • Keep API Security schema traces sampled even when the WAF returns keep:false, while keep:false for plain trace-tagging rules does not force USER_KEEP.

Test coverage

  • Added unit tests for WAF result parsing, typed attribute reporting, keep / HasKeep, schema sampling, JValue encoding, RCM capabilities, and rules_compat.
  • Added an ASP.NET Core 5 integration snapshot for the four trace-tagging variants: keep/no keep, event/no event, tags/metrics, and sampling priority.
  • Validated locally the system tests.

https://datadoghq.atlassian.net/browse/APPSEC-63122

@dd-trace-dotnet-ci-bot

dd-trace-dotnet-ci-bot Bot commented May 7, 2026

Copy link
Copy Markdown

Execution-Time Benchmarks Report ⏱️

Execution-time results for samples comparing This PR (8581) and master.

✅ No regressions detected - check the details below

Full Metrics Comparison

FakeDbCommand

Metric Master (Mean ± 95% CI) Current (Mean ± 95% CI) Change Status
.NET Framework 4.8 - Baseline
duration73.02 ± (73.12 - 73.65) ms75.38 ± (75.28 - 75.85) ms+3.2%✅⬆️
.NET Framework 4.8 - Bailout
duration77.76 ± (77.64 - 78.04) ms78.53 ± (78.54 - 79.07) ms+1.0%✅⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1096.60 ± (1095.32 - 1101.43) ms1102.46 ± (1106.29 - 1117.68) ms+0.5%✅⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms22.38 ± (22.34 - 22.42) ms22.90 ± (22.84 - 22.97) ms+2.3%✅⬆️
process.time_to_main_ms83.98 ± (83.77 - 84.19) ms87.64 ± (87.32 - 87.95) ms+4.4%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.91 ± (10.91 - 10.92) MB10.92 ± (10.92 - 10.92) MB+0.0%✅⬆️
runtime.dotnet.threads.count12 ± (12 - 12)12 ± (12 - 12)+0.0%
.NET Core 3.1 - Bailout
process.internal_duration_ms22.58 ± (22.51 - 22.64) ms22.63 ± (22.58 - 22.68) ms+0.2%✅⬆️
process.time_to_main_ms88.13 ± (87.71 - 88.54) ms88.17 ± (87.89 - 88.45) ms+0.1%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.88 ± (10.87 - 10.88) MB10.94 ± (10.94 - 10.95) MB+0.6%✅⬆️
runtime.dotnet.threads.count13 ± (13 - 13)13 ± (13 - 13)+0.0%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms211.71 ± (210.84 - 212.58) ms213.31 ± (212.49 - 214.13) ms+0.8%✅⬆️
process.time_to_main_ms537.57 ± (536.26 - 538.88) ms540.77 ± (539.32 - 542.22) ms+0.6%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed47.95 ± (47.92 - 47.99) MB48.30 ± (48.27 - 48.34) MB+0.7%✅⬆️
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)-0.8%
.NET 6 - Baseline
process.internal_duration_ms21.70 ± (21.63 - 21.76) ms21.62 ± (21.56 - 21.67) ms-0.4%
process.time_to_main_ms76.71 ± (76.41 - 77.00) ms76.46 ± (76.16 - 76.76) ms-0.3%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.61 ± (10.60 - 10.61) MB10.63 ± (10.63 - 10.63) MB+0.2%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 6 - Bailout
process.internal_duration_ms21.26 ± (21.22 - 21.31) ms21.19 ± (21.15 - 21.24) ms-0.3%
process.time_to_main_ms75.51 ± (75.27 - 75.75) ms75.53 ± (75.30 - 75.75) ms+0.0%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.73 ± (10.73 - 10.73) MB10.74 ± (10.74 - 10.74) MB+0.1%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms378.40 ± (376.22 - 380.58) ms376.58 ± (374.33 - 378.83) ms-0.5%
process.time_to_main_ms538.17 ± (536.76 - 539.58) ms539.35 ± (538.15 - 540.55) ms+0.2%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed49.45 ± (49.43 - 49.47) MB49.91 ± (49.88 - 49.93) MB+0.9%✅⬆️
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)-0.6%
.NET 8 - Baseline
process.internal_duration_ms19.64 ± (19.59 - 19.69) ms19.82 ± (19.76 - 19.89) ms+0.9%✅⬆️
process.time_to_main_ms73.67 ± (73.43 - 73.91) ms75.57 ± (75.26 - 75.89) ms+2.6%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.65 ± (7.65 - 7.66) MB7.66 ± (7.66 - 7.67) MB+0.1%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 8 - Bailout
process.internal_duration_ms19.82 ± (19.76 - 19.88) ms20.00 ± (19.95 - 20.06) ms+0.9%✅⬆️
process.time_to_main_ms75.92 ± (75.66 - 76.18) ms77.48 ± (77.22 - 77.74) ms+2.0%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.71 ± (7.70 - 7.71) MB7.71 ± (7.70 - 7.72) MB+0.0%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms296.03 ± (293.79 - 298.26) ms294.67 ± (292.61 - 296.74) ms-0.5%
process.time_to_main_ms497.28 ± (496.08 - 498.49) ms499.03 ± (497.86 - 500.21) ms+0.4%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed36.63 ± (36.60 - 36.66) MB36.85 ± (36.82 - 36.88) MB+0.6%✅⬆️
runtime.dotnet.threads.count27 ± (27 - 27)27 ± (27 - 27)-0.2%

HttpMessageHandler

Metric Master (Mean ± 95% CI) Current (Mean ± 95% CI) Change Status
.NET Framework 4.8 - Baseline
duration189.94 ± (190.01 - 190.62) ms189.83 ± (189.81 - 190.59) ms-0.1%
.NET Framework 4.8 - Bailout
duration193.39 ± (193.21 - 193.58) ms193.14 ± (193.05 - 193.42) ms-0.1%
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1157.87 ± (1157.64 - 1163.05) ms1159.97 ± (1161.27 - 1167.49) ms+0.2%✅⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms186.69 ± (186.30 - 187.08) ms184.56 ± (184.30 - 184.82) ms-1.1%
process.time_to_main_ms81.25 ± (80.94 - 81.56) ms79.95 ± (79.77 - 80.13) ms-1.6%
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.10 ± (16.07 - 16.12) MB16.09 ± (16.02 - 16.15) MB-0.1%
runtime.dotnet.threads.count20 ± (19 - 20)20 ± (20 - 20)+0.4%✅⬆️
.NET Core 3.1 - Bailout
process.internal_duration_ms187.60 ± (187.23 - 187.97) ms183.97 ± (183.75 - 184.19) ms-1.9%
process.time_to_main_ms83.38 ± (83.21 - 83.55) ms81.26 ± (81.17 - 81.35) ms-2.5%
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.22 ± (16.20 - 16.25) MB16.16 ± (16.13 - 16.18) MB-0.4%
runtime.dotnet.threads.count21 ± (21 - 21)21 ± (20 - 21)-0.3%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms379.98 ± (378.54 - 381.42) ms375.51 ± (374.14 - 376.89) ms-1.2%
process.time_to_main_ms521.18 ± (520.11 - 522.25) ms515.85 ± (514.92 - 516.78) ms-1.0%
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed56.83 ± (56.73 - 56.93) MB57.19 ± (57.12 - 57.25) MB+0.6%✅⬆️
runtime.dotnet.threads.count30 ± (30 - 30)30 ± (30 - 30)+0.3%✅⬆️
.NET 6 - Baseline
process.internal_duration_ms192.90 ± (192.42 - 193.37) ms191.83 ± (191.47 - 192.18) ms-0.6%
process.time_to_main_ms71.50 ± (71.34 - 71.67) ms71.37 ± (71.11 - 71.63) ms-0.2%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.40 ± (16.37 - 16.42) MB16.05 ± (15.90 - 16.20) MB-2.1%
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)-1.8%
.NET 6 - Bailout
process.internal_duration_ms193.17 ± (192.69 - 193.64) ms189.38 ± (189.10 - 189.66) ms-2.0%
process.time_to_main_ms72.40 ± (72.22 - 72.58) ms71.34 ± (71.20 - 71.47) ms-1.5%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.31 ± (16.22 - 16.39) MB15.85 ± (15.68 - 16.01) MB-2.8%
runtime.dotnet.threads.count20 ± (20 - 20)19 ± (19 - 19)-4.7%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms589.73 ± (587.06 - 592.41) ms590.03 ± (587.50 - 592.57) ms+0.1%✅⬆️
process.time_to_main_ms531.94 ± (530.59 - 533.29) ms520.99 ± (520.06 - 521.92) ms-2.1%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed60.93 ± (60.83 - 61.03) MB61.43 ± (61.34 - 61.53) MB+0.8%✅⬆️
runtime.dotnet.threads.count31 ± (31 - 31)31 ± (31 - 31)-0.1%
.NET 8 - Baseline
process.internal_duration_ms198.55 ± (198.16 - 198.94) ms189.56 ± (189.34 - 189.78) ms-4.5%
process.time_to_main_ms73.82 ± (73.57 - 74.07) ms70.54 ± (70.37 - 70.72) ms-4.4%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.61 ± (11.60 - 11.63) MB11.83 ± (11.80 - 11.85) MB+1.8%✅⬆️
runtime.dotnet.threads.count18 ± (18 - 18)18 ± (18 - 18)-0.7%
.NET 8 - Bailout
process.internal_duration_ms195.34 ± (194.84 - 195.84) ms185.69 ± (185.49 - 185.89) ms-4.9%
process.time_to_main_ms73.58 ± (73.40 - 73.76) ms70.12 ± (70.05 - 70.20) ms-4.7%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.70 ± (11.67 - 11.72) MB11.72 ± (11.62 - 11.83) MB+0.3%✅⬆️
runtime.dotnet.threads.count19 ± (19 - 19)18 ± (18 - 19)-4.3%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms516.64 ± (513.71 - 519.56) ms513.06 ± (510.58 - 515.54) ms-0.7%
process.time_to_main_ms495.96 ± (495.00 - 496.91) ms475.40 ± (474.66 - 476.15) ms-4.1%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed50.46 ± (50.42 - 50.50) MB50.63 ± (50.59 - 50.66) MB+0.3%✅⬆️
runtime.dotnet.threads.count30 ± (30 - 30)29 ± (29 - 29)-2.1%
Comparison explanation

Execution-time benchmarks measure the whole time it takes to execute a program, and are intended to measure the one-off costs. Cases where the execution time results for the PR are worse than latest master results are highlighted in **red**. The following thresholds were used for comparing the execution times:

  • Welch test with statistical test for significance of 5%
  • Only results indicating a difference greater than 5% and 5 ms are considered.

Note that these results are based on a single point-in-time result for each branch. For full results, see the dashboard.

Graphs show the p99 interval based on the mean and StdDev of the test run, as well as the mean value of the run (shown as a diamond below the graph).

Duration charts
FakeDbCommand (.NET Framework 4.8)
gantt
    title Execution time (ms) FakeDbCommand (.NET Framework 4.8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8581) - mean (76ms)  : 71, 80
    master - mean (73ms)  : 69, 77

    section Bailout
    This PR (8581) - mean (79ms)  : 75, 83
    master - mean (78ms)  : 75, 81

    section CallTarget+Inlining+NGEN
    This PR (8581) - mean (1,112ms)  : 1028, 1195
    master - mean (1,098ms)  : 1055, 1142

Loading
FakeDbCommand (.NET Core 3.1)
gantt
    title Execution time (ms) FakeDbCommand (.NET Core 3.1)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8581) - mean (118ms)  : 111, 125
    master - mean (113ms)  : 109, 118

    section Bailout
    This PR (8581) - mean (118ms)  : 113, 123
    master - mean (118ms)  : 112, 124

    section CallTarget+Inlining+NGEN
    This PR (8581) - mean (792ms)  : 766, 817
    master - mean (784ms)  : 758, 810

Loading
FakeDbCommand (.NET 6)
gantt
    title Execution time (ms) FakeDbCommand (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8581) - mean (105ms)  : 98, 111
    master - mean (105ms)  : 99, 111

    section Bailout
    This PR (8581) - mean (103ms)  : 99, 107
    master - mean (103ms)  : 98, 109

    section CallTarget+Inlining+NGEN
    This PR (8581) - mean (948ms)  : 909, 987
    master - mean (945ms)  : 903, 987

Loading
FakeDbCommand (.NET 8)
gantt
    title Execution time (ms) FakeDbCommand (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8581) - mean (104ms)  : 98, 109
    master - mean (101ms)  : 97, 105

    section Bailout
    This PR (8581) - mean (105ms)  : 100, 111
    master - mean (104ms)  : 98, 109

    section CallTarget+Inlining+NGEN
    This PR (8581) - mean (825ms)  : 783, 867
    master - mean (824ms)  : 779, 869

Loading
HttpMessageHandler (.NET Framework 4.8)
gantt
    title Execution time (ms) HttpMessageHandler (.NET Framework 4.8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8581) - mean (190ms)  : 186, 194
    master - mean (190ms)  : 187, 193

    section Bailout
    This PR (8581) - mean (193ms)  : 191, 195
    master - mean (193ms)  : 192, 195

    section CallTarget+Inlining+NGEN
    This PR (8581) - mean (1,164ms)  : 1120, 1209
    master - mean (1,160ms)  : 1122, 1199

Loading
HttpMessageHandler (.NET Core 3.1)
gantt
    title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8581) - mean (273ms)  : 269, 276
    master - mean (277ms)  : 270, 283

    section Bailout
    This PR (8581) - mean (273ms)  : 271, 276
    master - mean (279ms)  : 274, 285

    section CallTarget+Inlining+NGEN
    This PR (8581) - mean (931ms)  : 909, 952
    master - mean (941ms)  : 920, 961

Loading
HttpMessageHandler (.NET 6)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8581) - mean (272ms)  : 266, 278
    master - mean (273ms)  : 266, 280

    section Bailout
    This PR (8581) - mean (269ms)  : 265, 274
    master - mean (274ms)  : 268, 280

    section CallTarget+Inlining+NGEN
    This PR (8581) - mean (1,141ms)  : 1104, 1179
    master - mean (1,152ms)  : 1101, 1202

Loading
HttpMessageHandler (.NET 8)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8581) - mean (270ms)  : 267, 274
    master - mean (283ms)  : 276, 290

    section Bailout
    This PR (8581) - mean (265ms)  : 263, 268
    master - mean (279ms)  : 271, 288

    section CallTarget+Inlining+NGEN
    This PR (8581) - mean (1,022ms)  : 977, 1066
    master - mean (1,044ms)  : 994, 1094

Loading

@pr-commenter

pr-commenter Bot commented May 7, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-05-12 13:10:16

Comparing candidate commit 8e5d062 in PR branch flavien.darche/real-trace-tagging with baseline commit 4b9ebf8 in branch master.

Found 0 performance improvements and 1 performance regressions! Performance is the same for 26 metrics, 0 unstable metrics, 58 known flaky benchmarks, 29 flaky benchmarks without significant changes.

Explanation

This is an A/B test comparing a candidate commit's performance against that of a baseline commit. Performance changes are noted in the tables below as:

  • 🟩 = significantly better candidate vs. baseline
  • 🟥 = significantly worse candidate vs. baseline

We compute a confidence interval (CI) over the relative difference of means between metrics from the candidate and baseline commits, considering the baseline as the reference.

If the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD), the change is considered significant.

Feel free to reach out to #apm-benchmarking-platform on Slack if you have any questions.

More details about the CI and significant changes

You can imagine this CI as a range of values that is likely to contain the true difference of means between the candidate and baseline commits.

CIs of the difference of means are often centered around 0%, because often changes are not that big:

---------------------------------(------|---^--------)-------------------------------->
                              -0.6%    0%  0.3%     +1.2%
                                 |          |        |
         lower bound of the CI --'          |        |
sample mean (center of the CI) -------------'        |
         upper bound of the CI ----------------------'

As described above, a change is considered significant if the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD).

For instance, for an execution time metric, this confidence interval indicates a significantly worse performance:

----------------------------------------|---------|---(---------^---------)---------->
                                       0%        1%  1.3%      2.2%      3.1%
                                                  |   |         |         |
       significant impact threshold --------------'   |         |         |
                      lower bound of CI --------------'         |         |
       sample mean (center of the CI) --------------------------'         |
                      upper bound of CI ----------------------------------'

scenario:Benchmarks.Trace.DbCommandBenchmark.ExecuteNonQuery net472

  • 🟥 throughput [-22412.417op/s; -19521.326op/s] or [-6.312%; -5.498%]

Known flaky benchmarks

These benchmarks are marked as flaky and will not trigger a failure. Modify FLAKY_BENCHMARKS_REGEX to control which benchmarks are marked as flaky.

scenario:Benchmarks.Trace.ActivityBenchmark.StartStopWithChild net472

  • 🟥 throughput [-7830.764op/s; -7422.653op/s] or [-9.285%; -8.801%]

scenario:Benchmarks.Trace.ActivityBenchmark.StartStopWithChild netcoreapp3.1

  • 🟥 throughput [-6801.261op/s; -5642.581op/s] or [-6.915%; -5.737%]

scenario:Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • 🟥 execution_time [+318.005ms; +322.305ms] or [+157.805%; +159.939%]
  • 🟥 throughput [-65.271op/s; -52.756op/s] or [-11.744%; -9.492%]

scenario:Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces net6.0

  • 🟥 execution_time [+376.852ms; +378.626ms] or [+297.736%; +299.138%]
  • 🟩 throughput [+99.330op/s; +103.410op/s] or [+13.096%; +13.634%]

scenario:Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces netcoreapp3.1

  • 🟥 execution_time [+392.440ms; +395.058ms] or [+347.295%; +349.611%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleMoreComplexBody net472

  • 🟥 allocated_mem [+1.308KB; +1.308KB] or [+27.529%; +27.541%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleMoreComplexBody net6.0

  • 🟥 allocated_mem [+471 bytes; +472 bytes] or [+9.977%; +9.987%]
  • 🟩 execution_time [-15.872ms; -11.019ms] or [-7.413%; -5.146%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleMoreComplexBody netcoreapp3.1

  • 🟥 allocated_mem [+1.272KB; +1.272KB] or [+27.502%; +27.510%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleSimpleBody net472

  • 🟥 allocated_mem [+1.307KB; +1.307KB] or [+105.746%; +105.759%]
  • 🟥 throughput [-289368.103op/s; -272613.803op/s] or [-29.546%; -27.835%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleSimpleBody net6.0

  • 🟥 allocated_mem [+471 bytes; +472 bytes] or [+38.558%; +38.566%]
  • 🟩 execution_time [-26.517ms; -21.678ms] or [-11.826%; -9.668%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleSimpleBody netcoreapp3.1

  • 🟥 allocated_mem [+1.272KB; +1.272KB] or [+105.292%; +105.304%]
  • 🟥 throughput [-134444.718op/s; -118481.868op/s] or [-19.317%; -17.024%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorMoreComplexBody net6.0

  • 🟩 throughput [+10625.911op/s; +13531.360op/s] or [+6.761%; +8.610%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorMoreComplexBody netcoreapp3.1

  • 🟩 throughput [+10375.245op/s; +13018.332op/s] or [+8.265%; +10.371%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorSimpleBody net6.0

  • 🟩 throughput [+470030.484op/s; +486007.544op/s] or [+15.673%; +16.206%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorSimpleBody netcoreapp3.1

  • 🟩 execution_time [-18.572ms; -14.213ms] or [-8.561%; -6.552%]
  • 🟩 throughput [+194826.144op/s; +248635.174op/s] or [+7.733%; +9.869%]

scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeArgs net472

  • 🟥 execution_time [+300.030ms; +300.601ms] or [+149.915%; +150.200%]

scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeArgs net6.0

  • 🟥 execution_time [+299.732ms; +302.859ms] or [+151.156%; +152.733%]

scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeArgs netcoreapp3.1

  • 🟥 execution_time [+300.940ms; +303.521ms] or [+151.590%; +152.890%]

scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeLegacyArgs net472

  • 🟥 execution_time [+297.781ms; +298.652ms] or [+146.258%; +146.686%]

scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeLegacyArgs net6.0

  • 🟥 execution_time [+293.734ms; +295.843ms] or [+143.596%; +144.627%]

scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeLegacyArgs netcoreapp3.1

  • 🟥 execution_time [+300.205ms; +301.916ms] or [+150.042%; +150.897%]

scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack net6.0

  • 🟥 execution_time [+24.731µs; +48.324µs] or [+7.895%; +15.427%]
  • 🟥 throughput [-447.538op/s; -249.011op/s] or [-13.951%; -7.762%]

scenario:Benchmarks.Trace.AspNetCoreBenchmark.SendRequest net472

  • 🟥 execution_time [+299.544ms; +300.290ms] or [+149.503%; +149.876%]

scenario:Benchmarks.Trace.AspNetCoreBenchmark.SendRequest net6.0

  • 🟥 execution_time [+414.390ms; +419.007ms] or [+450.252%; +455.268%]
  • 🟩 throughput [+998.111op/s; +1126.540op/s] or [+8.202%; +9.257%]

scenario:Benchmarks.Trace.AspNetCoreBenchmark.SendRequest netcoreapp3.1

  • unstable execution_time [+302.376ms; +340.365ms] or [+229.591%; +258.436%]
  • 🟩 throughput [+648.248op/s; +847.843op/s] or [+6.275%; +8.208%]

scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • unstable execution_time [+301.363ms; +348.454ms] or [+138.564%; +160.216%]
  • 🟥 throughput [-525.398op/s; -485.825op/s] or [-47.606%; -44.021%]

scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces net6.0

  • unstable execution_time [+178.071ms; +314.981ms] or [+75.886%; +134.232%]
  • 🟥 throughput [-670.129op/s; -586.656op/s] or [-44.698%; -39.130%]

scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces netcoreapp3.1

  • 🟥 execution_time [+336.941ms; +349.556ms] or [+201.530%; +209.075%]
  • 🟥 throughput [-408.985op/s; -372.143op/s] or [-28.477%; -25.912%]

scenario:Benchmarks.Trace.CharSliceBenchmark.OriginalCharSlice net6.0

  • 🟩 execution_time [-139.809µs; -102.467µs] or [-7.082%; -5.191%]
  • 🟩 throughput [+29.540op/s; +39.178op/s] or [+5.831%; +7.734%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch net472

  • 🟥 execution_time [+304.665ms; +306.009ms] or [+153.423%; +154.100%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch net6.0

  • 🟥 execution_time [+304.762ms; +306.410ms] or [+152.717%; +153.543%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch netcoreapp3.1

  • 🟥 execution_time [+301.798ms; +304.840ms] or [+151.610%; +153.139%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync net472

  • 🟥 execution_time [+303.554ms; +304.982ms] or [+152.435%; +153.152%]
  • 🟩 throughput [+17614.491op/s; +19326.524op/s] or [+5.901%; +6.475%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync net6.0

  • 🟥 execution_time [+298.143ms; +299.786ms] or [+147.418%; +148.231%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync netcoreapp3.1

  • 🟥 execution_time [+303.405ms; +306.957ms] or [+153.779%; +155.579%]

scenario:Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync net472

  • 🟥 execution_time [+303.065ms; +304.687ms] or [+152.111%; +152.926%]

scenario:Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync net6.0

  • 🟥 execution_time [+297.674ms; +299.408ms] or [+148.363%; +149.228%]
  • 🟩 throughput [+52477.085op/s; +59446.549op/s] or [+10.420%; +11.804%]

scenario:Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync netcoreapp3.1

  • 🟥 execution_time [+300.819ms; +303.516ms] or [+149.655%; +150.996%]

scenario:Benchmarks.Trace.ILoggerBenchmark.EnrichedLog net6.0

  • 🟩 execution_time [-16.644ms; -12.998ms] or [-7.739%; -6.044%]
  • 🟩 throughput [+19589.155op/s; +26171.144op/s] or [+5.374%; +7.179%]

scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark net6.0

  • 🟩 allocated_mem [-26.567KB; -26.547KB] or [-9.691%; -9.684%]
  • unstable execution_time [-39.393µs; +13.518µs] or [-7.786%; +2.672%]

scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark netcoreapp3.1

  • 🟩 allocated_mem [-26.523KB; -26.508KB] or [-9.669%; -9.663%]

scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark net6.0

  • 🟥 execution_time [+6.273µs; +10.258µs] or [+14.826%; +24.247%]
  • 🟥 throughput [-4682.531op/s; -2922.295op/s] or [-19.712%; -12.302%]

scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark netcoreapp3.1

  • unstable execution_time [-14.606µs; -7.612µs] or [-22.661%; -11.810%]
  • 🟩 throughput [+1946.907op/s; +3416.250op/s] or [+11.945%; +20.960%]

scenario:Benchmarks.Trace.Log4netBenchmark.EnrichedLog net472

  • 🟥 execution_time [+301.700ms; +303.164ms] or [+152.496%; +153.236%]

scenario:Benchmarks.Trace.Log4netBenchmark.EnrichedLog net6.0

  • 🟥 execution_time [+303.162ms; +305.360ms] or [+154.309%; +155.427%]

scenario:Benchmarks.Trace.Log4netBenchmark.EnrichedLog netcoreapp3.1

  • 🟥 execution_time [+301.368ms; +304.135ms] or [+150.872%; +152.257%]

scenario:Benchmarks.Trace.SerilogBenchmark.EnrichedLog net472

  • 🟥 execution_time [+299.876ms; +301.700ms] or [+149.461%; +150.370%]

scenario:Benchmarks.Trace.SerilogBenchmark.EnrichedLog net6.0

  • 🟥 execution_time [+300.318ms; +302.049ms] or [+150.805%; +151.674%]

scenario:Benchmarks.Trace.SerilogBenchmark.EnrichedLog netcoreapp3.1

  • 🟥 execution_time [+303.115ms; +305.319ms] or [+153.721%; +154.838%]

scenario:Benchmarks.Trace.SingleSpanAspNetCoreBenchmark.SingleSpanAspNetCore net472

  • 🟥 execution_time [+299.825ms; +300.461ms] or [+149.554%; +149.871%]
  • 🟩 throughput [+61171395.615op/s; +61431775.544op/s] or [+44.549%; +44.738%]

scenario:Benchmarks.Trace.SingleSpanAspNetCoreBenchmark.SingleSpanAspNetCore net6.0

  • unstable execution_time [+344.160ms; +389.289ms] or [+428.025%; +484.151%]
  • 🟩 throughput [+898.907op/s; +1081.040op/s] or [+6.949%; +8.357%]

scenario:Benchmarks.Trace.SingleSpanAspNetCoreBenchmark.SingleSpanAspNetCore netcoreapp3.1

  • 🟥 execution_time [+299.766ms; +300.672ms] or [+149.516%; +149.968%]

scenario:Benchmarks.Trace.SpanBenchmark.StartFinishScope net6.0

  • 🟩 throughput [+95015.953op/s; +103652.536op/s] or [+8.871%; +9.678%]

scenario:Benchmarks.Trace.SpanBenchmark.StartFinishScope netcoreapp3.1

  • 🟩 throughput [+52166.185op/s; +71635.822op/s] or [+6.038%; +8.292%]

scenario:Benchmarks.Trace.SpanBenchmark.StartFinishSpan netcoreapp3.1

  • 🟩 throughput [+72019.891op/s; +81948.186op/s] or [+7.153%; +8.139%]

scenario:Benchmarks.Trace.SpanBenchmark.StartFinishTwoScopes net6.0

  • 🟩 throughput [+40243.574op/s; +47588.398op/s] or [+7.308%; +8.641%]

scenario:Benchmarks.Trace.SpanBenchmark.StartFinishTwoScopes netcoreapp3.1

  • 🟩 throughput [+28654.577op/s; +38478.085op/s] or [+6.414%; +8.613%]

scenario:Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin net6.0

  • 🟩 throughput [+88338.636op/s; +105079.241op/s] or [+9.870%; +11.740%]

Known flaky benchmarks without significant changes:

  • scenario:Benchmarks.Trace.ActivityBenchmark.StartStopWithChild net6.0
  • scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorMoreComplexBody net472
  • scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorSimpleBody net472
  • scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark net472
  • scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark net6.0
  • scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark netcoreapp3.1
  • scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack net472
  • scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack netcoreapp3.1
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice net472
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice net6.0
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice netcoreapp3.1
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool net472
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool net6.0
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool netcoreapp3.1
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OriginalCharSlice net472
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OriginalCharSlice netcoreapp3.1
  • scenario:Benchmarks.Trace.ILoggerBenchmark.EnrichedLog net472
  • scenario:Benchmarks.Trace.ILoggerBenchmark.EnrichedLog netcoreapp3.1
  • scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark net472
  • scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark net472
  • scenario:Benchmarks.Trace.RedisBenchmark.SendReceive net472
  • scenario:Benchmarks.Trace.RedisBenchmark.SendReceive net6.0
  • scenario:Benchmarks.Trace.RedisBenchmark.SendReceive netcoreapp3.1
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishScope net472
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishSpan net472
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishSpan net6.0
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishTwoScopes net472
  • scenario:Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin net472
  • scenario:Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin netcoreapp3.1

@e-n-0
e-n-0 marked this pull request as ready for review May 8, 2026 12:57
@e-n-0
e-n-0 requested a review from a team as a code owner May 8, 2026 12:57
Comment thread tracer/src/Datadog.Trace/AppSec/Coordinator/SecurityReporter.cs
case JValue:
ddwafObjectStruct = GetStringObject(ref context, o?.ToString() ?? string.Empty);
case JValue jValue:
ddwafObjectStruct = Encode(ref context, remainingDepth, key, jValue.Value);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

jValue.Value is always a primitive, right? Just to make sure that no inifinite recurssion is possible

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

JValue holds a single JSON/Json.NET primitive/leaf value, not an object, array, property, or arbitrary CLR object.

Comment thread tracer/test/Datadog.Trace.Security.Unit.Tests/trace-tagging-rules.json Outdated

@NachoEchevarria NachoEchevarria left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

While not familiar with the RFC especifics, LGTM from a tracing POV.

@e-n-0
e-n-0 merged commit 2412e1f into master May 12, 2026
137 checks passed
@e-n-0
e-n-0 deleted the flavien.darche/real-trace-tagging branch May 12, 2026 14:59
@github-actions github-actions Bot added this to the vNext-v3 milestone May 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants