Skip to content

[ASM] Activate api sec by default#6043

Merged
anna-git merged 4 commits into
masterfrom
asm/anna.y/activate-apisec-bydefault
Oct 3, 2024
Merged

[ASM] Activate api sec by default#6043
anna-git merged 4 commits into
masterfrom
asm/anna.y/activate-apisec-bydefault

Conversation

@anna-git

@anna-git anna-git commented Sep 17, 2024

Copy link
Copy Markdown
Contributor

Summary of changes

Activate api security by default

Reason for change

https://docs.google.com/document/d/1BbF-ZQHG9seaaik578WFCb1PEs-SmKq34PHg5sG3q6s/edit#heading=h.d3npy38hknxa

Implementation details

Had to ignore the tags in the system tests as Gzip bytes results in different values under linux/windows
Maybe future: implement in the test agent some normalization for api security tags.

Test coverage

Other details

@datadog-ddstaging

datadog-ddstaging Bot commented Sep 17, 2024

Copy link
Copy Markdown

Datadog Report

Branch report: asm/anna.y/activate-apisec-bydefault
Commit report: 924b6fa
Test service: dd-trace-dotnet

✅ 0 Failed, 363153 Passed, 2052 Skipped, 16h 45m 24.84s Total Time

@andrewlock

andrewlock commented Sep 17, 2024

Copy link
Copy Markdown
Member

Execution-Time Benchmarks Report ⏱️

Execution-time results for samples comparing the following branches/commits:

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 shown 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).

gantt
    title Execution time (ms) FakeDbCommand (.NET Framework 4.6.2) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6043) - mean (71ms)  : 66, 77
     .   : milestone, 71,
    master - mean (71ms)  : 68, 74
     .   : milestone, 71,

    section CallTarget+Inlining+NGEN
    This PR (6043) - mean (1,107ms)  : 1081, 1133
     .   : milestone, 1107,
    master - mean (1,120ms)  : 1092, 1147
     .   : milestone, 1120,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6043) - mean (110ms)  : 106, 113
     .   : milestone, 110,
    master - mean (109ms)  : 106, 112
     .   : milestone, 109,

    section CallTarget+Inlining+NGEN
    This PR (6043) - mean (775ms)  : 759, 790
     .   : milestone, 775,
    master - mean (773ms)  : 756, 790
     .   : milestone, 773,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6043) - mean (93ms)  : 90, 96
     .   : milestone, 93,
    master - mean (94ms)  : 90, 98
     .   : milestone, 94,

    section CallTarget+Inlining+NGEN
    This PR (6043) - mean (733ms)  : 716, 751
     .   : milestone, 733,
    master - mean (735ms)  : 719, 751
     .   : milestone, 735,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6043) - mean (190ms)  : 187, 193
     .   : milestone, 190,
    master - mean (190ms)  : 188, 193
     .   : milestone, 190,

    section CallTarget+Inlining+NGEN
    This PR (6043) - mean (1,196ms)  : 1179, 1213
     .   : milestone, 1196,
    master - mean (1,201ms)  : 1180, 1222
     .   : milestone, 1201,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6043) - mean (276ms)  : 271, 280
     .   : milestone, 276,
    master - mean (276ms)  : 272, 280
     .   : milestone, 276,

    section CallTarget+Inlining+NGEN
    This PR (6043) - mean (937ms)  : 913, 960
     .   : milestone, 937,
    master - mean (944ms)  : 927, 961
     .   : milestone, 944,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6043) - mean (264ms)  : 261, 268
     .   : milestone, 264,
    master - mean (265ms)  : 261, 268
     .   : milestone, 265,

    section CallTarget+Inlining+NGEN
    This PR (6043) - mean (924ms)  : 908, 941
     .   : milestone, 924,
    master - mean (927ms)  : 906, 949
     .   : milestone, 927,

Loading

@github-actions

Copy link
Copy Markdown
Contributor

Snapshots difference summary

The following differences have been observed in committed snapshots. It is meant to help the reviewer.
The diff is simplistic, so please check some files anyway while we improve it.

1 occurrences of :

+        "_dd.appsec.s.req.params": "H4sIAAAAAAAAA4uuVkrOzyspys/JSS1Ssoq2iNVRSkwuyczPA3NqYwH+CR9jIQAAAA==",
+        "_dd.appsec.s.res.body": "H4sIAAAAAAAAA4u2iAUA8YntnQMAAAA=",
+        "_dd.appsec.s.req.headers": "H4sIAAAAAAAAA4WOMQ6AIBAE/3I1FHaGrxCKixAkQSBwhYbwdzUWNhDqnd1ZWeHkGgl1tDxhNoG40yCklKtSrII3AcTSFAPKuJlCSKYb/zOEtkyQgkfyLjzK7GJ2dI2N36mZ8iVHx/dYev2mbkdocaj9AAAA",
+        "_dd.appsec.s.res.headers": "H4sIAAAAAAAAA4uuVkrOzytJzSvRLaksSFWyio6OtoiN1alWyknNU7IyrI2tjQUAcaAU2yQAAAA=",

1 occurrences of :

+        "_dd.appsec.s.res.body": "H4sIAAAAAAAAA4u2iAUA8YntnQMAAAA=",
+        "_dd.appsec.s.req.headers": "H4sIAAAAAAAAA4WOMQrAIBDA/uKsQ7fiVw6Ho4oVrIp3Q4v491JcLc4JJNAEVzwcMbITGgB2Y2QT0SWht27kwAWrSzzlt7LIaLNXjJ4WCuFVYkhelRpyDfws/NFVwa7S3+SfdmaarXfzAg6PMlH9AAAA",
+        "_dd.appsec.s.res.headers": "H4sIAAAAAAAAA4uuVkrOzytJzSvRLaksSFWyio6OtoiN1alWyknNU7IyrI2tjQUAcaAU2yQAAAA=",

@andrewlock

andrewlock commented Sep 17, 2024

Copy link
Copy Markdown
Member

Benchmarks Report for appsec 🐌

Benchmarks for #6043 compared to master:

  • 1 benchmarks are faster, with geometric mean 1.151
  • 1 benchmarks have more allocations

The following thresholds were used for comparing the benchmark speeds:

  • Mann–Whitney U test with statistical test for significance of 5%
  • Only results indicating a difference greater than 10% and 0.3 ns are considered.

Allocation changes below 0.5% are ignored.

Benchmark details

Benchmarks.Trace.Asm.AppSecBodyBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master AllCycleSimpleBody net6.0 73.6μs 62.8ns 243ns 0.0741 0 0 6 KB
master AllCycleSimpleBody netcoreapp3.1 62.1μs 67.7ns 253ns 0.0925 0 0 6.95 KB
master AllCycleSimpleBody net472 49.5μs 52.9ns 205ns 1.31 0 0 8.34 KB
master AllCycleMoreComplexBody net6.0 79.7μs 283ns 1.1μs 0.116 0 0 9.51 KB
master AllCycleMoreComplexBody netcoreapp3.1 69.2μs 79.3ns 307ns 0.139 0 0 10.37 KB
master AllCycleMoreComplexBody net472 56.1μs 39.7ns 154ns 1.87 0.0279 0 11.85 KB
master ObjectExtractorSimpleBody net6.0 142ns 0.154ns 0.577ns 0.00396 0 0 280 B
master ObjectExtractorSimpleBody netcoreapp3.1 209ns 0.265ns 0.991ns 0.00365 0 0 272 B
master ObjectExtractorSimpleBody net472 164ns 0.0843ns 0.327ns 0.0446 0 0 281 B
master ObjectExtractorMoreComplexBody net6.0 3.17μs 2.13ns 7.68ns 0.0523 0 0 3.78 KB
master ObjectExtractorMoreComplexBody netcoreapp3.1 3.95μs 2.63ns 10.2ns 0.0497 0 0 3.69 KB
master ObjectExtractorMoreComplexBody net472 3.77μs 3.43ns 13.3ns 0.601 0.00564 0 3.8 KB
#6043 AllCycleSimpleBody net6.0 73μs 104ns 401ns 0.0731 0 0 6 KB
#6043 AllCycleSimpleBody netcoreapp3.1 62.4μs 94.8ns 367ns 0.0937 0 0 6.95 KB
#6043 AllCycleSimpleBody net472 49.2μs 55.7ns 216ns 1.32 0 0 8.34 KB
#6043 AllCycleMoreComplexBody net6.0 77.4μs 75.7ns 273ns 0.116 0 0 9.51 KB
#6043 AllCycleMoreComplexBody netcoreapp3.1 68.4μs 78.6ns 294ns 0.137 0 0 10.36 KB
#6043 AllCycleMoreComplexBody net472 55.7μs 79.8ns 309ns 1.87 0.0279 0 11.85 KB
#6043 ObjectExtractorSimpleBody net6.0 142ns 0.165ns 0.594ns 0.00396 0 0 280 B
#6043 ObjectExtractorSimpleBody netcoreapp3.1 204ns 0.231ns 0.832ns 0.00372 0 0 272 B
#6043 ObjectExtractorSimpleBody net472 165ns 0.0896ns 0.347ns 0.0446 0 0 281 B
#6043 ObjectExtractorMoreComplexBody net6.0 3.12μs 1.9ns 7.37ns 0.0532 0 0 3.78 KB
#6043 ObjectExtractorMoreComplexBody netcoreapp3.1 4.06μs 2.49ns 9.31ns 0.0508 0 0 3.69 KB
#6043 ObjectExtractorMoreComplexBody net472 3.85μs 3.37ns 12.6ns 0.603 0.00576 0 3.8 KB
Benchmarks.Trace.Asm.AppSecEncoderBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EncodeArgs net6.0 38.2μs 14ns 54.3ns 0.453 0 0 32.4 KB
master EncodeArgs netcoreapp3.1 54.6μs 22.8ns 85.5ns 0.436 0 0 32.4 KB
master EncodeArgs net472 66.2μs 23.9ns 92.5ns 5.15 0.066 0 32.5 KB
master EncodeLegacyArgs net6.0 80.6μs 437ns 2.39μs 0 0 0 2.14 KB
master EncodeLegacyArgs netcoreapp3.1 105μs 119ns 462ns 0 0 0 2.14 KB
master EncodeLegacyArgs net472 149μs 81.5ns 316ns 0.3 0 0 2.15 KB
#6043 EncodeArgs net6.0 37.5μs 20.6ns 79.8ns 0.45 0 0 32.4 KB
#6043 EncodeArgs netcoreapp3.1 54.3μs 16.7ns 64.6ns 0.433 0 0 32.4 KB
#6043 EncodeArgs net472 67.1μs 50.7ns 183ns 5.15 0.0669 0 32.5 KB
#6043 EncodeLegacyArgs net6.0 78.2μs 34.3ns 133ns 0 0 0 2.14 KB
#6043 EncodeLegacyArgs netcoreapp3.1 103μs 126ns 471ns 0 0 0 2.14 KB
#6043 EncodeLegacyArgs net472 151μs 81.5ns 316ns 0.302 0 0 2.15 KB
Benchmarks.Trace.Asm.AppSecWafBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master RunWafRealisticBenchmark net6.0 186μs 62.3ns 233ns 0 0 0 2.44 KB
master RunWafRealisticBenchmark netcoreapp3.1 198μs 96.8ns 362ns 0 0 0 2.39 KB
master RunWafRealisticBenchmark net472 208μs 161ns 623ns 0.311 0 0 2.46 KB
master RunWafRealisticBenchmarkWithAttack net6.0 123μs 41.9ns 157ns 0 0 0 1.47 KB
master RunWafRealisticBenchmarkWithAttack netcoreapp3.1 131μs 122ns 472ns 0 0 0 1.46 KB
master RunWafRealisticBenchmarkWithAttack net472 140μs 21.1ns 78.9ns 0.21 0 0 1.49 KB
#6043 RunWafRealisticBenchmark net6.0 188μs 222ns 801ns 0 0 0 2.44 KB
#6043 RunWafRealisticBenchmark netcoreapp3.1 195μs 285ns 1.07μs 0 0 0 2.39 KB
#6043 RunWafRealisticBenchmark net472 210μs 71.9ns 279ns 0.315 0 0 2.46 KB
#6043 RunWafRealisticBenchmarkWithAttack net6.0 123μs 64.7ns 233ns 0 0 0 1.47 KB
#6043 RunWafRealisticBenchmarkWithAttack netcoreapp3.1 129μs 69.1ns 249ns 0 0 0 1.46 KB
#6043 RunWafRealisticBenchmarkWithAttack net472 140μs 53.3ns 206ns 0.21 0 0 1.48 KB
Benchmarks.Trace.Iast.StringAspectsBenchmark - Faster 🎉 More allocations ⚠️

Faster 🎉 in #6043

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑netcoreapp3.1 1.151 61,400.00 53,350.00 several?

More allocations ⚠️ in #6043

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0 252.99 KB 257.82 KB 4.83 KB 1.91%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StringConcatBenchmark net6.0 59.4μs 793ns 7.89μs 0 0 0 43.44 KB
master StringConcatBenchmark netcoreapp3.1 61.9μs 721ns 7.18μs 0 0 0 42.64 KB
master StringConcatBenchmark net472 38.8μs 194ns 911ns 0 0 0 57.26 KB
master StringConcatAspectBenchmark net6.0 281μs 5.86μs 56.8μs 0 0 0 252.99 KB
master StringConcatAspectBenchmark netcoreapp3.1 341μs 1.79μs 11.7μs 0 0 0 254.22 KB
master StringConcatAspectBenchmark net472 279μs 5.71μs 55.4μs 0 0 0 278.53 KB
#6043 StringConcatBenchmark net6.0 59.9μs 821ns 8.21μs 0 0 0 43.44 KB
#6043 StringConcatBenchmark netcoreapp3.1 53.3μs 241ns 871ns 0 0 0 42.64 KB
#6043 StringConcatBenchmark net472 36.8μs 93.5ns 350ns 0 0 0 57.16 KB
#6043 StringConcatAspectBenchmark net6.0 313μs 922ns 3.19μs 0 0 0 257.82 KB
#6043 StringConcatAspectBenchmark netcoreapp3.1 337μs 1.86μs 11.2μs 0 0 0 253.49 KB
#6043 StringConcatAspectBenchmark net472 268μs 5.11μs 49.2μs 0 0 0 278.53 KB

@andrewlock

andrewlock commented Sep 17, 2024

Copy link
Copy Markdown
Member

Throughput/Crank Report ⚡

Throughput results for AspNetCoreSimpleController comparing the following branches/commits:

Cases where throughput results for the PR are worse than latest master (5% drop or greater), results are shown in red.

Note that these results are based on a single point-in-time result for each branch. For full results, see one of the many, many dashboards!

gantt
    title Throughput Linux x64 (Total requests) 
    dateFormat  X
    axisFormat %s
    section Baseline
    This PR (6043) (11.050M)   : 0, 11049981
    master (11.173M)   : 0, 11173302
    benchmarks/2.9.0 (11.081M)   : 0, 11080577

    section Automatic
    This PR (6043) (7.340M)   : 0, 7339795
    master (7.279M)   : 0, 7278664
    benchmarks/2.9.0 (7.732M)   : 0, 7732233

    section Trace stats
    master (7.532M)   : 0, 7531539

    section Manual
    master (11.083M)   : 0, 11082902

    section Manual + Automatic
    This PR (6043) (6.729M)   : 0, 6729367
    master (6.710M)   : 0, 6709924

    section DD_TRACE_ENABLED=0
    master (10.153M)   : 0, 10153208

Loading
gantt
    title Throughput Linux arm64 (Total requests) 
    dateFormat  X
    axisFormat %s
    section Baseline
    This PR (6043) (9.526M)   : 0, 9525542
    master (9.398M)   : 0, 9398448
    benchmarks/2.9.0 (9.798M)   : 0, 9798067

    section Automatic
    This PR (6043) (6.442M)   : 0, 6442291
    master (6.529M)   : 0, 6529082

    section Trace stats
    master (6.958M)   : 0, 6957848

    section Manual
    master (9.566M)   : 0, 9566040

    section Manual + Automatic
    This PR (6043) (6.004M)   : 0, 6003771
    master (6.221M)   : 0, 6221012

    section DD_TRACE_ENABLED=0
    master (8.922M)   : 0, 8921736

Loading
gantt
    title Throughput Windows x64 (Total requests) 
    dateFormat  X
    axisFormat %s
    section Baseline
    This PR (6043) (10.176M)   : 0, 10175820
    master (10.147M)   : 0, 10147192
    benchmarks/2.9.0 (10.067M)   : 0, 10067315

    section Automatic
    This PR (6043) (6.776M)   : 0, 6775798
    master (6.895M)   : 0, 6894968
    benchmarks/2.9.0 (7.552M)   : 0, 7552193

    section Trace stats
    master (7.434M)   : 0, 7433935

    section Manual
    master (10.142M)   : 0, 10142136

    section Manual + Automatic
    This PR (6043) (6.352M)   : 0, 6352087
    master (6.402M)   : 0, 6401740

    section DD_TRACE_ENABLED=0
    master (9.547M)   : 0, 9547292

Loading

@andrewlock

andrewlock commented Sep 17, 2024

Copy link
Copy Markdown
Member

Benchmarks Report for tracer 🐌

Benchmarks for #6043 compared to master:

  • 1 benchmarks are faster, with geometric mean 1.167
  • All benchmarks have the same allocations

The following thresholds were used for comparing the benchmark speeds:

  • Mann–Whitney U test with statistical test for significance of 5%
  • Only results indicating a difference greater than 10% and 0.3 ns are considered.

Allocation changes below 0.5% are ignored.

Benchmark details

Benchmarks.Trace.ActivityBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartStopWithChild net6.0 7.74μs 38.7ns 212ns 0.0152 0.00758 0 5.43 KB
master StartStopWithChild netcoreapp3.1 9.93μs 55.2ns 340ns 0.0146 0.00488 0 5.62 KB
master StartStopWithChild net472 16μs 25.3ns 98.1ns 1.03 0.316 0.0947 6.07 KB
#6043 StartStopWithChild net6.0 7.73μs 43.4ns 278ns 0.0119 0.00796 0 5.43 KB
#6043 StartStopWithChild netcoreapp3.1 10.1μs 57.1ns 396ns 0.0202 0.0101 0 5.61 KB
#6043 StartStopWithChild net472 16μs 37.7ns 146ns 1.03 0.318 0.103 6.07 KB
Benchmarks.Trace.AgentWriterBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 468μs 333ns 1.2μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 633μs 191ns 715ns 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces net472 832μs 374ns 1.4μs 0.414 0 0 3.3 KB
#6043 WriteAndFlushEnrichedTraces net6.0 517μs 295ns 1.14μs 0 0 0 2.7 KB
#6043 WriteAndFlushEnrichedTraces netcoreapp3.1 626μs 429ns 1.6μs 0 0 0 2.7 KB
#6043 WriteAndFlushEnrichedTraces net472 838μs 1.24μs 4.81μs 0.414 0 0 3.3 KB
Benchmarks.Trace.AspNetCoreBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendRequest net6.0 209μs 2.04μs 20.1μs 0.19 0 0 18.45 KB
master SendRequest netcoreapp3.1 222μs 1.24μs 8.41μs 0.215 0 0 20.61 KB
master SendRequest net472 0.00212ns 0.000846ns 0.00328ns 0 0 0 0 b
#6043 SendRequest net6.0 193μs 1.08μs 7.38μs 0.178 0 0 18.45 KB
#6043 SendRequest netcoreapp3.1 217μs 1.22μs 8.09μs 0.225 0 0 20.61 KB
#6043 SendRequest net472 0.00496ns 0.00125ns 0.00483ns 0 0 0 0 b
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 555μs 1.13μs 4.09μs 0.543 0 0 41.59 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 688μs 3.16μs 12.2μs 0.332 0 0 41.91 KB
master WriteAndFlushEnrichedTraces net472 872μs 2.44μs 8.78μs 8.13 2.57 0.428 53.26 KB
#6043 WriteAndFlushEnrichedTraces net6.0 549μs 2.35μs 9.12μs 0.556 0 0 41.5 KB
#6043 WriteAndFlushEnrichedTraces netcoreapp3.1 670μs 2.36μs 9.14μs 0.338 0 0 41.72 KB
#6043 WriteAndFlushEnrichedTraces net472 857μs 4.11μs 16.4μs 8.45 2.53 0.422 53.29 KB
Benchmarks.Trace.DbCommandBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master ExecuteNonQuery net6.0 1.21μs 0.746ns 2.69ns 0.0145 0 0 1.02 KB
master ExecuteNonQuery netcoreapp3.1 1.79μs 1.94ns 7.51ns 0.0133 0 0 1.02 KB
master ExecuteNonQuery net472 2.1μs 0.854ns 3.19ns 0.156 0 0 987 B
#6043 ExecuteNonQuery net6.0 1.29μs 0.794ns 2.97ns 0.0141 0 0 1.02 KB
#6043 ExecuteNonQuery netcoreapp3.1 1.69μs 1.61ns 6.24ns 0.0137 0 0 1.02 KB
#6043 ExecuteNonQuery net472 2.07μs 2.96ns 11.5ns 0.156 0 0 987 B
Benchmarks.Trace.ElasticsearchBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master CallElasticsearch net6.0 1.15μs 0.659ns 2.38ns 0.0134 0 0 976 B
master CallElasticsearch netcoreapp3.1 1.54μs 0.869ns 3.25ns 0.0132 0 0 976 B
master CallElasticsearch net472 2.51μs 1.23ns 4.77ns 0.158 0 0 995 B
master CallElasticsearchAsync net6.0 1.3μs 0.37ns 1.43ns 0.013 0 0 952 B
master CallElasticsearchAsync netcoreapp3.1 1.6μs 0.55ns 1.91ns 0.0137 0 0 1.02 KB
master CallElasticsearchAsync net472 2.48μs 1.03ns 4ns 0.167 0 0 1.05 KB
#6043 CallElasticsearch net6.0 1.16μs 0.403ns 1.56ns 0.014 0 0 976 B
#6043 CallElasticsearch netcoreapp3.1 1.64μs 0.506ns 1.89ns 0.0131 0 0 976 B
#6043 CallElasticsearch net472 2.51μs 0.695ns 2.51ns 0.158 0 0 995 B
#6043 CallElasticsearchAsync net6.0 1.3μs 2.06ns 7.98ns 0.0129 0 0 952 B
#6043 CallElasticsearchAsync netcoreapp3.1 1.65μs 1.77ns 6.39ns 0.0142 0 0 1.02 KB
#6043 CallElasticsearchAsync net472 2.57μs 0.731ns 2.74ns 0.167 0 0 1.05 KB
Benchmarks.Trace.GraphQLBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master ExecuteAsync net6.0 1.36μs 1.53ns 5.92ns 0.0131 0 0 952 B
master ExecuteAsync netcoreapp3.1 1.62μs 2.52ns 9.75ns 0.0122 0 0 952 B
master ExecuteAsync net472 1.75μs 0.853ns 3.3ns 0.145 0 0 915 B
#6043 ExecuteAsync net6.0 1.38μs 0.525ns 1.96ns 0.0131 0 0 952 B
#6043 ExecuteAsync netcoreapp3.1 1.58μs 1.38ns 5.33ns 0.0127 0 0 952 B
#6043 ExecuteAsync net472 1.8μs 0.825ns 3.19ns 0.145 0 0 915 B
Benchmarks.Trace.HttpClientBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendAsync net6.0 4.08μs 3.38ns 12.6ns 0.0307 0 0 2.22 KB
master SendAsync netcoreapp3.1 5.19μs 4.72ns 18.3ns 0.036 0 0 2.76 KB
master SendAsync net472 7.9μs 10.5ns 40.8ns 0.497 0 0 3.15 KB
#6043 SendAsync net6.0 4.22μs 2.27ns 8.81ns 0.0315 0 0 2.22 KB
#6043 SendAsync netcoreapp3.1 5.02μs 2.48ns 9.59ns 0.0374 0 0 2.76 KB
#6043 SendAsync net472 7.81μs 2.17ns 8.41ns 0.499 0 0 3.15 KB
Benchmarks.Trace.ILoggerBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 1.53μs 1.48ns 5.71ns 0.0231 0 0 1.64 KB
master EnrichedLog netcoreapp3.1 2.1μs 1.11ns 4.3ns 0.0221 0 0 1.64 KB
master EnrichedLog net472 2.56μs 1.39ns 5.01ns 0.25 0 0 1.57 KB
#6043 EnrichedLog net6.0 1.42μs 0.948ns 3.55ns 0.0227 0 0 1.64 KB
#6043 EnrichedLog netcoreapp3.1 2.18μs 3.85ns 14.9ns 0.0217 0 0 1.64 KB
#6043 EnrichedLog net472 2.7μs 0.901ns 3.49ns 0.249 0 0 1.57 KB
Benchmarks.Trace.Log4netBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 115μs 141ns 545ns 0.0571 0 0 4.28 KB
master EnrichedLog netcoreapp3.1 123μs 500ns 1.94μs 0 0 0 4.28 KB
master EnrichedLog net472 149μs 305ns 1.18μs 0.673 0.224 0 4.46 KB
#6043 EnrichedLog net6.0 113μs 143ns 552ns 0.0568 0 0 4.28 KB
#6043 EnrichedLog netcoreapp3.1 118μs 138ns 533ns 0.0588 0 0 4.28 KB
#6043 EnrichedLog net472 146μs 146ns 566ns 0.655 0.218 0 4.46 KB
Benchmarks.Trace.NLogBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 2.96μs 3.35ns 13ns 0.0311 0 0 2.2 KB
master EnrichedLog netcoreapp3.1 4.19μs 3.22ns 12.5ns 0.0289 0 0 2.2 KB
master EnrichedLog net472 4.89μs 4.18ns 16.2ns 0.319 0 0 2.02 KB
#6043 EnrichedLog net6.0 3.1μs 1.54ns 5.76ns 0.0296 0 0 2.2 KB
#6043 EnrichedLog netcoreapp3.1 4.19μs 1.77ns 6.64ns 0.0289 0 0 2.2 KB
#6043 EnrichedLog net472 4.91μs 1.49ns 5.77ns 0.318 0 0 2.02 KB
Benchmarks.Trace.RedisBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendReceive net6.0 1.31μs 0.963ns 3.73ns 0.0158 0 0 1.14 KB
master SendReceive netcoreapp3.1 1.71μs 0.713ns 2.67ns 0.0153 0 0 1.14 KB
master SendReceive net472 2.1μs 0.584ns 2.26ns 0.183 0.00104 0 1.16 KB
#6043 SendReceive net6.0 1.25μs 0.299ns 1.08ns 0.0157 0 0 1.14 KB
#6043 SendReceive netcoreapp3.1 1.84μs 1.32ns 5.12ns 0.0157 0 0 1.14 KB
#6043 SendReceive net472 2.05μs 0.901ns 3.37ns 0.183 0.00103 0 1.16 KB
Benchmarks.Trace.SerilogBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 2.75μs 0.762ns 2.95ns 0.0226 0 0 1.6 KB
master EnrichedLog netcoreapp3.1 3.89μs 2.16ns 8.36ns 0.0215 0 0 1.65 KB
master EnrichedLog net472 4.43μs 1.83ns 7.08ns 0.323 0 0 2.04 KB
#6043 EnrichedLog net6.0 2.8μs 0.942ns 3.65ns 0.0224 0 0 1.6 KB
#6043 EnrichedLog netcoreapp3.1 3.88μs 1.83ns 6.86ns 0.0214 0 0 1.65 KB
#6043 EnrichedLog net472 4.25μs 0.873ns 3.27ns 0.324 0 0 2.04 KB
Benchmarks.Trace.SpanBenchmark - Faster 🎉 Same allocations ✔️

Faster 🎉 in #6043

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.SpanBenchmark.StartFinishScope‑net6.0 1.167 562.50 481.92

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartFinishSpan net6.0 394ns 0.307ns 1.19ns 0.00809 0 0 576 B
master StartFinishSpan netcoreapp3.1 586ns 0.486ns 1.82ns 0.00781 0 0 576 B
master StartFinishSpan net472 691ns 0.492ns 1.84ns 0.0918 0 0 578 B
master StartFinishScope net6.0 562ns 0.32ns 1.24ns 0.00992 0 0 696 B
master StartFinishScope netcoreapp3.1 711ns 0.979ns 3.79ns 0.00953 0 0 696 B
master StartFinishScope net472 887ns 0.782ns 3.03ns 0.104 0 0 658 B
#6043 StartFinishSpan net6.0 392ns 0.192ns 0.743ns 0.00806 0 0 576 B
#6043 StartFinishSpan netcoreapp3.1 612ns 1.43ns 5.55ns 0.00788 0 0 576 B
#6043 StartFinishSpan net472 652ns 0.607ns 2.35ns 0.0916 0 0 578 B
#6043 StartFinishScope net6.0 482ns 0.334ns 1.29ns 0.00985 0 0 696 B
#6043 StartFinishScope netcoreapp3.1 692ns 0.382ns 1.43ns 0.00932 0 0 696 B
#6043 StartFinishScope net472 904ns 1.78ns 6.89ns 0.104 0 0 658 B
Benchmarks.Trace.TraceAnnotationsBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master RunOnMethodBegin net6.0 603ns 0.259ns 1ns 0.00982 0 0 696 B
master RunOnMethodBegin netcoreapp3.1 996ns 2.82ns 10.6ns 0.00945 0 0 696 B
master RunOnMethodBegin net472 1.14μs 1.24ns 4.8ns 0.105 0 0 658 B
#6043 RunOnMethodBegin net6.0 604ns 0.404ns 1.57ns 0.00992 0 0 696 B
#6043 RunOnMethodBegin netcoreapp3.1 925ns 0.761ns 2.95ns 0.00921 0 0 696 B
#6043 RunOnMethodBegin net472 1.11μs 0.637ns 2.47ns 0.104 0 0 658 B

@anna-git
anna-git force-pushed the asm/anna.y/activate-apisec-bydefault branch from cdd933f to 985903a Compare September 19, 2024 12:33
@anna-git
anna-git marked this pull request as ready for review September 19, 2024 15:01
@anna-git
anna-git requested review from a team as code owners September 19, 2024 15:01
@anna-git
anna-git force-pushed the asm/anna.y/activate-apisec-bydefault branch from 985903a to aa7b009 Compare September 19, 2024 15:07
Comment thread tracer/src/Datadog.Trace/AppSec/SecuritySettings.cs
@anna-git
anna-git force-pushed the asm/anna.y/activate-apisec-bydefault branch from aa7b009 to 924b6fa Compare October 2, 2024 09:28
@anna-git
anna-git merged commit f814e2b into master Oct 3, 2024
@anna-git
anna-git deleted the asm/anna.y/activate-apisec-bydefault branch October 3, 2024 12:14
@github-actions github-actions Bot added this to the vNext-v3 milestone Oct 3, 2024
agocs pushed a commit that referenced this pull request Oct 8, 2024
## Summary of changes

Activate api security by default 

## Reason for change


https://docs.google.com/document/d/1BbF-ZQHG9seaaik578WFCb1PEs-SmKq34PHg5sG3q6s/edit#heading=h.d3npy38hknxa

## Implementation details

Had to ignore the tags in the system tests as Gzip bytes results in
different values under linux/windows
Maybe future: implement in the test agent some normalization for api
security tags.

## Test coverage

## Other details
<!-- Fixes #{issue} -->

<!-- ⚠️ Note: where possible, please obtain 2 approvals prior to
merging. Unless CODEOWNERS specifies otherwise, for external teams it is
typically best to have one review from a team member, and one review
from apm-dotnet. Trivial changes do not require 2 reviews. -->
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.

4 participants