-
Notifications
You must be signed in to change notification settings - Fork 140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ASM] Standalone Billing (part 2: Propagation) #5743
Conversation
1838696
to
1b69b2b
Compare
Datadog ReportBranch report: ✅ 0 Failed, 347142 Passed, 1790 Skipped, 14h 48m 48.13s Total Time |
1b69b2b
to
39278c7
Compare
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:
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 (5743) - mean (75ms) : 65, 85
. : milestone, 75,
master - mean (74ms) : 67, 81
. : milestone, 74,
section CallTarget+Inlining+NGEN
This PR (5743) - mean (1,039ms) : 1015, 1063
. : milestone, 1039,
master - mean (1,040ms) : 1019, 1060
. : milestone, 1040,
gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5743) - mean (111ms) : 108, 114
. : milestone, 111,
master - mean (110ms) : 107, 113
. : milestone, 110,
section CallTarget+Inlining+NGEN
This PR (5743) - mean (728ms) : 702, 753
. : milestone, 728,
master - mean (724ms) : 704, 745
. : milestone, 724,
gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5743) - mean (94ms) : 90, 98
. : milestone, 94,
master - mean (94ms) : 91, 97
. : milestone, 94,
section CallTarget+Inlining+NGEN
This PR (5743) - mean (685ms) : 661, 709
. : milestone, 685,
master - mean (678ms) : 656, 700
. : milestone, 678,
gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5743) - mean (195ms) : 189, 202
. : milestone, 195,
master - mean (192ms) : 188, 196
. : milestone, 192,
section CallTarget+Inlining+NGEN
This PR (5743) - mean (1,136ms) : 1110, 1162
. : milestone, 1136,
master - mean (1,137ms) : 1111, 1163
. : milestone, 1137,
gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5743) - mean (277ms) : 271, 284
. : milestone, 277,
master - mean (277ms) : 272, 282
. : milestone, 277,
section CallTarget+Inlining+NGEN
This PR (5743) - mean (912ms) : 891, 933
. : milestone, 912,
master - mean (911ms) : 882, 939
. : milestone, 911,
gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5743) - mean (265ms) : 259, 272
. : milestone, 265,
master - mean (264ms) : 261, 268
. : milestone, 264,
section CallTarget+Inlining+NGEN
This PR (5743) - mean (888ms) : 862, 913
. : milestone, 888,
master - mean (892ms) : 865, 920
. : milestone, 892,
|
Throughput/Crank Report:zap: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 (5743) (11.459M) : 0, 11458753
master (11.744M) : 0, 11744450
benchmarks/2.9.0 (11.793M) : 0, 11792634
section Automatic
This PR (5743) (7.671M) : 0, 7670553
master (7.833M) : 0, 7832972
benchmarks/2.9.0 (8.209M) : 0, 8209122
section Trace stats
master (8.203M) : 0, 8202879
section Manual
This PR (5743) (9.621M) : 0, 9620973
master (10.106M) : 0, 10105512
section Manual + Automatic
This PR (5743) (7.093M) : crit ,0, 7093030
master (7.477M) : 0, 7477218
section Version Conflict
master (6.559M) : 0, 6558558
gantt
title Throughput Linux arm64 (Total requests)
dateFormat X
axisFormat %s
section Baseline
This PR (5743) (9.293M) : 0, 9292584
master (9.421M) : 0, 9420811
section Automatic
This PR (5743) (6.600M) : 0, 6599992
master (6.585M) : 0, 6584615
section Trace stats
master (6.804M) : 0, 6804437
section Manual
This PR (5743) (8.350M) : 0, 8349554
master (8.071M) : 0, 8071012
section Manual + Automatic
This PR (5743) (6.178M) : 0, 6177779
master (6.108M) : 0, 6107645
section Version Conflict
master (5.506M) : 0, 5505834
gantt
title Throughput Windows x64 (Total requests)
dateFormat X
axisFormat %s
section Baseline
This PR (5743) (10.210M) : 0, 10210017
benchmarks/2.9.0 (10.296M) : 0, 10295769
section Automatic
This PR (5743) (7.217M) : 0, 7217120
benchmarks/2.9.0 (7.267M) : 0, 7266503
section Manual
This PR (5743) (8.925M) : 0, 8924910
section Manual + Automatic
This PR (5743) (6.982M) : 0, 6981895
|
Benchmarks Report for tracer 🐌Benchmarks for #5743 compared to master:
The following thresholds were used for comparing the benchmark speeds:
Allocation changes below 0.5% are ignored. Benchmark detailsBenchmarks.Trace.ActivityBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.AgentWriterBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.AspNetCoreBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.DbCommandBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.ElasticsearchBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.GraphQLBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.HttpClientBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.ILoggerBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.Log4netBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.NLogBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.RedisBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.SerilogBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.SpanBenchmark - Slower
|
Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net6.0 | 1.244 | 398.32 | 495.35 |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | StartFinishSpan |
net6.0 | 398ns | 0.128ns | 0.478ns | 0.00799 | 0 | 0 | 576 B |
master | StartFinishSpan |
netcoreapp3.1 | 628ns | 3.45ns | 21ns | 0.00775 | 0 | 0 | 576 B |
master | StartFinishSpan |
net472 | 646ns | 0.311ns | 1.21ns | 0.0918 | 0 | 0 | 578 B |
master | StartFinishScope |
net6.0 | 475ns | 0.149ns | 0.557ns | 0.00962 | 0 | 0 | 696 B |
master | StartFinishScope |
netcoreapp3.1 | 740ns | 0.521ns | 2.02ns | 0.00947 | 0 | 0 | 696 B |
master | StartFinishScope |
net472 | 844ns | 0.321ns | 1.2ns | 0.104 | 0 | 0 | 658 B |
#5743 | StartFinishSpan |
net6.0 | 495ns | 0.0915ns | 0.354ns | 0.00813 | 0 | 0 | 576 B |
#5743 | StartFinishSpan |
netcoreapp3.1 | 597ns | 0.391ns | 1.46ns | 0.00777 | 0 | 0 | 576 B |
#5743 | StartFinishSpan |
net472 | 666ns | 0.344ns | 1.33ns | 0.0917 | 0 | 0 | 578 B |
#5743 | StartFinishScope |
net6.0 | 490ns | 0.17ns | 0.637ns | 0.00982 | 0 | 0 | 696 B |
#5743 | StartFinishScope |
netcoreapp3.1 | 748ns | 0.78ns | 3.02ns | 0.0094 | 0 | 0 | 696 B |
#5743 | StartFinishScope |
net472 | 895ns | 0.359ns | 1.34ns | 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 | 623ns | 0.185ns | 0.716ns | 0.00965 | 0 | 0 | 696 B |
master | RunOnMethodBegin |
netcoreapp3.1 | 990ns | 0.457ns | 1.77ns | 0.00947 | 0 | 0 | 696 B |
master | RunOnMethodBegin |
net472 | 1.13μs | 0.453ns | 1.76ns | 0.104 | 0 | 0 | 658 B |
#5743 | RunOnMethodBegin |
net6.0 | 623ns | 0.176ns | 0.682ns | 0.00976 | 0 | 0 | 696 B |
#5743 | RunOnMethodBegin |
netcoreapp3.1 | 1.02μs | 0.688ns | 2.67ns | 0.00902 | 0 | 0 | 696 B |
#5743 | RunOnMethodBegin |
net472 | 1.06μs | 0.464ns | 1.8ns | 0.104 | 0 | 0 | 658 B |
Benchmarks Report for appsec 🐌Benchmarks for #5743 compared to master:
The following thresholds were used for comparing the benchmark speeds:
Allocation changes below 0.5% are ignored. Benchmark detailsBenchmarks.Trace.Asm.AppSecBodyBenchmark - Faster 🎉 Same allocations ✔️
|
Benchmark | base/diff | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorMoreComplexBody‑net472 | 1.178 | 4,528.12 | 3,843.18 |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | AllCycleSimpleBody |
net6.0 | 73.8μs | 114ns | 440ns | 0.0741 | 0 | 0 | 6.01 KB |
master | AllCycleSimpleBody |
netcoreapp3.1 | 63.8μs | 95.1ns | 368ns | 0.0952 | 0 | 0 | 6.95 KB |
master | AllCycleSimpleBody |
net472 | 48.1μs | 42.4ns | 164ns | 1.3 | 0 | 0 | 8.34 KB |
master | AllCycleMoreComplexBody |
net6.0 | 79.7μs | 98ns | 367ns | 0.12 | 0 | 0 | 9.51 KB |
master | AllCycleMoreComplexBody |
netcoreapp3.1 | 69.1μs | 119ns | 461ns | 0.136 | 0 | 0 | 10.37 KB |
master | AllCycleMoreComplexBody |
net472 | 55.3μs | 72ns | 270ns | 1.87 | 0.0275 | 0 | 11.85 KB |
master | ObjectExtractorSimpleBody |
net6.0 | 145ns | 0.333ns | 1.29ns | 0.00397 | 0 | 0 | 280 B |
master | ObjectExtractorSimpleBody |
netcoreapp3.1 | 200ns | 0.395ns | 1.53ns | 0.00374 | 0 | 0 | 272 B |
master | ObjectExtractorSimpleBody |
net472 | 163ns | 0.0954ns | 0.344ns | 0.0446 | 0 | 0 | 281 B |
master | ObjectExtractorMoreComplexBody |
net6.0 | 3.1μs | 1.7ns | 5.89ns | 0.0528 | 0 | 0 | 3.78 KB |
master | ObjectExtractorMoreComplexBody |
netcoreapp3.1 | 4.1μs | 3.16ns | 12.2ns | 0.0498 | 0 | 0 | 3.69 KB |
master | ObjectExtractorMoreComplexBody |
net472 | 4.53μs | 2.09ns | 7.83ns | 0.601 | 0.00454 | 0 | 3.8 KB |
#5743 | AllCycleSimpleBody |
net6.0 | 73μs | 85.5ns | 331ns | 0.073 | 0 | 0 | 6 KB |
#5743 | AllCycleSimpleBody |
netcoreapp3.1 | 62.3μs | 92.7ns | 347ns | 0.0936 | 0 | 0 | 6.95 KB |
#5743 | AllCycleSimpleBody |
net472 | 48.3μs | 74.7ns | 289ns | 1.3 | 0 | 0 | 8.33 KB |
#5743 | AllCycleMoreComplexBody |
net6.0 | 79μs | 122ns | 474ns | 0.12 | 0 | 0 | 9.51 KB |
#5743 | AllCycleMoreComplexBody |
netcoreapp3.1 | 69.4μs | 140ns | 543ns | 0.138 | 0 | 0 | 10.37 KB |
#5743 | AllCycleMoreComplexBody |
net472 | 55.9μs | 39ns | 141ns | 1.87 | 0.0279 | 0 | 11.85 KB |
#5743 | ObjectExtractorSimpleBody |
net6.0 | 143ns | 0.274ns | 1.06ns | 0.00394 | 0 | 0 | 280 B |
#5743 | ObjectExtractorSimpleBody |
netcoreapp3.1 | 196ns | 0.219ns | 0.758ns | 0.00372 | 0 | 0 | 272 B |
#5743 | ObjectExtractorSimpleBody |
net472 | 166ns | 0.186ns | 0.721ns | 0.0446 | 0 | 0 | 281 B |
#5743 | ObjectExtractorMoreComplexBody |
net6.0 | 3.01μs | 3.11ns | 12ns | 0.0538 | 0 | 0 | 3.78 KB |
#5743 | ObjectExtractorMoreComplexBody |
netcoreapp3.1 | 3.94μs | 2.27ns | 8.5ns | 0.0497 | 0 | 0 | 3.69 KB |
#5743 | ObjectExtractorMoreComplexBody |
net472 | 3.84μs | 3.3ns | 12.8ns | 0.601 | 0.00575 | 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 | 36.6μs | 20.7ns | 80.2ns | 0.459 | 0 | 0 | 32.4 KB |
master | EncodeArgs |
netcoreapp3.1 | 54.3μs | 22.6ns | 84.7ns | 0.434 | 0 | 0 | 32.4 KB |
master | EncodeArgs |
net472 | 64.9μs | 34ns | 132ns | 5.14 | 0.0646 | 0 | 32.5 KB |
master | EncodeLegacyArgs |
net6.0 | 73.6μs | 30.7ns | 119ns | 0 | 0 | 0 | 2.14 KB |
master | EncodeLegacyArgs |
netcoreapp3.1 | 104μs | 134ns | 519ns | 0 | 0 | 0 | 2.14 KB |
master | EncodeLegacyArgs |
net472 | 152μs | 76.2ns | 295ns | 0.304 | 0 | 0 | 2.15 KB |
#5743 | EncodeArgs |
net6.0 | 37.2μs | 15.2ns | 57ns | 0.467 | 0 | 0 | 32.4 KB |
#5743 | EncodeArgs |
netcoreapp3.1 | 54.1μs | 19.3ns | 69.7ns | 0.432 | 0 | 0 | 32.4 KB |
#5743 | EncodeArgs |
net472 | 64.7μs | 35.9ns | 139ns | 5.14 | 0.0647 | 0 | 32.5 KB |
#5743 | EncodeLegacyArgs |
net6.0 | 80.4μs | 17.3ns | 64.9ns | 0 | 0 | 0 | 2.14 KB |
#5743 | EncodeLegacyArgs |
netcoreapp3.1 | 112μs | 48.1ns | 186ns | 0 | 0 | 0 | 2.14 KB |
#5743 | EncodeLegacyArgs |
net472 | 152μs | 55.8ns | 216ns | 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 | 182μs | 114ns | 441ns | 0 | 0 | 0 | 2.42 KB |
master | RunWafRealisticBenchmark |
netcoreapp3.1 | 193μs | 207ns | 801ns | 0 | 0 | 0 | 2.37 KB |
master | RunWafRealisticBenchmark |
net472 | 207μs | 56ns | 209ns | 0.31 | 0 | 0 | 2.43 KB |
master | RunWafRealisticBenchmarkWithAttack |
net6.0 | 121μs | 14.7ns | 50.9ns | 0 | 0 | 0 | 1.46 KB |
master | RunWafRealisticBenchmarkWithAttack |
netcoreapp3.1 | 130μs | 224ns | 869ns | 0 | 0 | 0 | 1.45 KB |
master | RunWafRealisticBenchmarkWithAttack |
net472 | 138μs | 25.9ns | 97.1ns | 0.207 | 0 | 0 | 1.48 KB |
#5743 | RunWafRealisticBenchmark |
net6.0 | 182μs | 91.2ns | 353ns | 0 | 0 | 0 | 2.42 KB |
#5743 | RunWafRealisticBenchmark |
netcoreapp3.1 | 195μs | 385ns | 1.49μs | 0 | 0 | 0 | 2.37 KB |
#5743 | RunWafRealisticBenchmark |
net472 | 206μs | 116ns | 451ns | 0.309 | 0 | 0 | 2.43 KB |
#5743 | RunWafRealisticBenchmarkWithAttack |
net6.0 | 121μs | 47.7ns | 185ns | 0 | 0 | 0 | 1.46 KB |
#5743 | RunWafRealisticBenchmarkWithAttack |
netcoreapp3.1 | 129μs | 209ns | 808ns | 0 | 0 | 0 | 1.45 KB |
#5743 | RunWafRealisticBenchmarkWithAttack |
net472 | 139μs | 95.7ns | 371ns | 0.207 | 0 | 0 | 1.48 KB |
Benchmarks.Trace.Iast.StringAspectsBenchmark - Same speed ✔️ Fewer allocations 🎉
Fewer allocations 🎉 in #5743
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0
255.3 KB
253.55 KB
-1.74 KB
-0.68%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net472
59.19 KB
57.34 KB
-1.85 KB
-3.12%
Benchmark | Base Allocated | Diff Allocated | Change | Change % |
---|---|---|---|---|
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0 | 255.3 KB | 253.55 KB | -1.74 KB | -0.68% |
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net472 | 59.19 KB | 57.34 KB | -1.85 KB | -3.12% |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | StringConcatBenchmark |
net6.0 | 52μs | 262ns | 1.2μs | 0 | 0 | 0 | 43.44 KB |
master | StringConcatBenchmark |
netcoreapp3.1 | 54.6μs | 261ns | 1.67μs | 0 | 0 | 0 | 42.64 KB |
master | StringConcatBenchmark |
net472 | 38μs | 160ns | 577ns | 0 | 0 | 0 | 59.19 KB |
master | StringConcatAspectBenchmark |
net6.0 | 303μs | 1.22μs | 6.44μs | 0 | 0 | 0 | 255.3 KB |
master | StringConcatAspectBenchmark |
netcoreapp3.1 | 330μs | 1.61μs | 6.65μs | 0 | 0 | 0 | 253.92 KB |
master | StringConcatAspectBenchmark |
net472 | 289μs | 5.62μs | 55.1μs | 0 | 0 | 0 | 278.53 KB |
#5743 | StringConcatBenchmark |
net6.0 | 58.3μs | 726ns | 7.08μs | 0 | 0 | 0 | 43.44 KB |
#5743 | StringConcatBenchmark |
netcoreapp3.1 | 61.6μs | 881ns | 8.76μs | 0 | 0 | 0 | 42.64 KB |
#5743 | StringConcatBenchmark |
net472 | 38.4μs | 164ns | 696ns | 0 | 0 | 0 | 57.34 KB |
#5743 | StringConcatAspectBenchmark |
net6.0 | 291μs | 1.41μs | 9.47μs | 0 | 0 | 0 | 253.55 KB |
#5743 | StringConcatAspectBenchmark |
netcoreapp3.1 | 340μs | 1.71μs | 9.66μs | 0 | 0 | 0 | 253.85 KB |
#5743 | StringConcatAspectBenchmark |
net472 | 295μs | 7.2μs | 69.8μs | 0 | 0 | 0 | 278.53 KB |
68e58b9
to
d62d1ce
Compare
7d6876d
to
12b18f8
Compare
12b18f8
to
1adc855
Compare
tracer/src/Datadog.Trace/Propagators/DatadogContextPropagator.cs
Outdated
Show resolved
Hide resolved
tracer/src/Datadog.Trace/Propagators/DatadogContextPropagator.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice. Thanks a lot for this
Summary of changes
Part 2 of the implementation of Standalone ASM billing.
Part 1 was #5565
This PR adds the propagated span tag
_dd.p.appsec: 1
allowing to propagate to downstream services the information that the current distributed trace is containing at least one ASM security event.Test coverage
This fully pass the system tests for ASM Standalone.