Skip to content

DSM support for SQS#4973

Merged
vandonr merged 50 commits into
masterfrom
vandonr/sqs
Feb 19, 2024
Merged

DSM support for SQS#4973
vandonr merged 50 commits into
masterfrom
vandonr/sqs

Conversation

@vandonr

@vandonr vandonr commented Dec 14, 2023

Copy link
Copy Markdown
Contributor

Summary of changes

  • add checkpoints on produce and consume operations
  • propagate pathway context
    • injected in message attributes on produce
    • read from message attributes on consume

not done:

  • computing the payload size for checkpoints. There is no straight way to get that info, so the best we can do is compute an estimation, and that'd be costly, so I'm leaving it aside for now.
  • reading xray headers on receive to ensure compatibility with Java tracer. This need to be done at the AWS SDK level, so I believe it belongs in a separate PR (plus, this one is already big enough).

Reason for change

https://datadoghq.atlassian.net/browse/AIT-9003

@vandonr vandonr requested a review from a team as a code owner December 14, 2023 12:50
@vandonr vandonr marked this pull request as draft December 14, 2023 12:50
@datadog-ddstaging

datadog-ddstaging Bot commented Dec 14, 2023

Copy link
Copy Markdown

Datadog Report

Branch report: vandonr/sqs
Commit report: 90e3cc7
Test service: dd-trace-dotnet

✅ 0 Failed, 310871 Passed, 1586 Skipped, 40m 12.28s Wall Time

@andrewlock

andrewlock commented Dec 14, 2023

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 (4973) - mean (76ms)  : 68, 83
     .   : milestone, 76,
    master - mean (72ms)  : 64, 80
     .   : milestone, 72,

    section CallTarget+Inlining+NGEN
    This PR (4973) - mean (999ms)  : 979, 1018
     .   : milestone, 999,
    master - mean (989ms)  : 963, 1015
     .   : milestone, 989,

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

    section CallTarget+Inlining+NGEN
    This PR (4973) - mean (727ms)  : 706, 748
     .   : milestone, 727,
    master - mean (716ms)  : 696, 735
     .   : milestone, 716,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (4973) - mean (96ms)  : 92, 100
     .   : milestone, 96,
    master - mean (94ms)  : 91, 97
     .   : milestone, 94,

    section CallTarget+Inlining+NGEN
    This PR (4973) - mean (677ms)  : 655, 699
     .   : milestone, 677,
    master - mean (670ms)  : 650, 690
     .   : milestone, 670,

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

    section CallTarget+Inlining+NGEN
    This PR (4973) - mean (1,060ms)  : 1040, 1081
     .   : milestone, 1060,
    master - mean (1,054ms)  : 1033, 1075
     .   : milestone, 1054,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (4973) - mean (270ms)  : 264, 275
     .   : milestone, 270,
    master - mean (269ms)  : 261, 276
     .   : milestone, 269,

    section CallTarget+Inlining+NGEN
    This PR (4973) - mean (1,060ms)  : 1036, 1085
     .   : milestone, 1060,
    master - mean (1,054ms)  : 1028, 1080
     .   : milestone, 1054,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (4973) - mean (259ms)  : 256, 262
     .   : milestone, 259,
    master - mean (259ms)  : 254, 264
     .   : milestone, 259,

    section CallTarget+Inlining+NGEN
    This PR (4973) - mean (1,000ms)  : 972, 1027
     .   : milestone, 1000,
    master - mean (1,001ms)  : 984, 1018
     .   : milestone, 1001,

Loading

@andrewlock

andrewlock commented Dec 14, 2023

Copy link
Copy Markdown
Member

Benchmarks Report 🐌

Benchmarks for #4973 compared to master:

  • 3 benchmarks are faster, with geometric mean 1.210
  • 1 benchmarks are slower, with geometric mean 1.162
  • 2 benchmarks have fewer allocations
  • 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.ActivityBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartStopWithChild net6.0 8.67μs 43.4ns 194ns 0.0246 0.0123 0 7.49 KB
master StartStopWithChild netcoreapp3.1 10.6μs 53ns 225ns 0.0383 0.0164 0 7.58 KB
master StartStopWithChild net472 17.1μs 34.1ns 127ns 1.34 0.356 0.11 7.97 KB
#4973 StartStopWithChild net6.0 8.89μs 50.4ns 342ns 0.021 0.0084 0 7.49 KB
#4973 StartStopWithChild netcoreapp3.1 10.7μs 47.4ns 171ns 0.0262 0.0105 0 7.59 KB
#4973 StartStopWithChild net472 17.2μs 47.3ns 183ns 1.35 0.358 0.111 7.97 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 450μs 232ns 869ns 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 632μs 272ns 1.05μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces net472 804μs 567ns 2.2μs 0.401 0 0 3.3 KB
#4973 WriteAndFlushEnrichedTraces net6.0 456μs 326ns 1.26μs 0 0 0 2.7 KB
#4973 WriteAndFlushEnrichedTraces netcoreapp3.1 606μs 163ns 632ns 0 0 0 2.7 KB
#4973 WriteAndFlushEnrichedTraces net472 793μs 180ns 697ns 0.393 0 0 3.3 KB
Benchmarks.Trace.Asm.AppSecBodyBenchmark - Faster 🎉 Same allocations ✔️

Faster 🎉 in #4973

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorSimpleBody‑net472 1.334 222.29 166.63

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master AllCycleSimpleBody net6.0 40.5μs 110ns 427ns 0.0201 0 0 2.36 KB
master AllCycleSimpleBody netcoreapp3.1 43.7μs 43.7ns 169ns 0.0219 0 0 2.34 KB
master AllCycleSimpleBody net472 46.6μs 24.9ns 96.5ns 0.371 0 0 2.41 KB
master AllCycleMoreComplexBody net6.0 216μs 137ns 512ns 0.107 0 0 9.84 KB
master AllCycleMoreComplexBody netcoreapp3.1 227μs 453ns 1.75μs 0.114 0 0 9.73 KB
master AllCycleMoreComplexBody net472 243μs 128ns 494ns 1.56 0 0 9.91 KB
master ObjectExtractorSimpleBody net6.0 136ns 0.0875ns 0.328ns 0.00393 0 0 280 B
master ObjectExtractorSimpleBody netcoreapp3.1 216ns 0.105ns 0.392ns 0.00366 0 0 272 B
master ObjectExtractorSimpleBody net472 222ns 0.0779ns 0.281ns 0.0446 0 0 281 B
master ObjectExtractorMoreComplexBody net6.0 3.06μs 3.35ns 13ns 0.0536 0 0 3.78 KB
master ObjectExtractorMoreComplexBody netcoreapp3.1 3.93μs 1.56ns 6.03ns 0.0511 0 0 3.69 KB
master ObjectExtractorMoreComplexBody net472 3.85μs 2.8ns 10.9ns 0.602 0.00602 0 3.8 KB
#4973 AllCycleSimpleBody net6.0 40.9μs 70.1ns 271ns 0.0206 0 0 2.36 KB
#4973 AllCycleSimpleBody netcoreapp3.1 43.9μs 47.7ns 185ns 0.0218 0 0 2.34 KB
#4973 AllCycleSimpleBody net472 46.7μs 26.9ns 104ns 0.367 0 0 2.41 KB
#4973 AllCycleMoreComplexBody net6.0 217μs 127ns 477ns 0.107 0 0 9.84 KB
#4973 AllCycleMoreComplexBody netcoreapp3.1 227μs 205ns 794ns 0.113 0 0 9.73 KB
#4973 AllCycleMoreComplexBody net472 239μs 62.3ns 241ns 1.55 0 0 9.91 KB
#4973 ObjectExtractorSimpleBody net6.0 143ns 0.0881ns 0.341ns 0.00392 0 0 280 B
#4973 ObjectExtractorSimpleBody netcoreapp3.1 199ns 0.111ns 0.415ns 0.00372 0 0 272 B
#4973 ObjectExtractorSimpleBody net472 167ns 0.189ns 0.731ns 0.0446 0 0 281 B
#4973 ObjectExtractorMoreComplexBody net6.0 3μs 1.59ns 5.94ns 0.0526 0 0 3.78 KB
#4973 ObjectExtractorMoreComplexBody netcoreapp3.1 3.92μs 1.65ns 6.18ns 0.0489 0 0 3.69 KB
#4973 ObjectExtractorMoreComplexBody net472 3.76μs 1.76ns 6.57ns 0.602 0.00564 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 52.8μs 44.1ns 165ns 0.423 0 0 30.94 KB
master EncodeArgs netcoreapp3.1 69.2μs 57.9ns 224ns 0.413 0 0 31.47 KB
master EncodeArgs net472 84.8μs 54.6ns 204ns 5.11 0.0851 0 32.27 KB
master EncodeLegacyArgs net6.0 125μs 236ns 912ns 0.43 0 0 33.89 KB
master EncodeLegacyArgs netcoreapp3.1 159μs 233ns 872ns 0.478 0 0 34.08 KB
master EncodeLegacyArgs net472 210μs 113ns 406ns 5.55 0.419 0 34.99 KB
#4973 EncodeArgs net6.0 53.3μs 107ns 386ns 0.425 0 0 30.94 KB
#4973 EncodeArgs netcoreapp3.1 69.7μs 69.6ns 260ns 0.416 0 0 31.47 KB
#4973 EncodeArgs net472 85μs 69.4ns 269ns 5.13 0.0847 0 32.27 KB
#4973 EncodeLegacyArgs net6.0 129μs 185ns 692ns 0.433 0 0 33.89 KB
#4973 EncodeLegacyArgs netcoreapp3.1 157μs 245ns 949ns 0.388 0 0 34.09 KB
#4973 EncodeLegacyArgs net472 214μs 280ns 1.08μs 5.53 0.425 0 34.99 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 189μs 71.5ns 277ns 0.095 0 0 6.51 KB
master RunWafRealisticBenchmark netcoreapp3.1 205μs 194ns 753ns 0 0 0 6.49 KB
master RunWafRealisticBenchmark net472 223μs 123ns 477ns 0.999 0 0 6.59 KB
master RunWafRealisticBenchmarkWithAttack net6.0 125μs 55.6ns 215ns 0.063 0 0 4.15 KB
master RunWafRealisticBenchmarkWithAttack netcoreapp3.1 134μs 181ns 653ns 0 0 0 4.14 KB
master RunWafRealisticBenchmarkWithAttack net472 146μs 121ns 453ns 0.659 0 0 4.19 KB
#4973 RunWafRealisticBenchmark net6.0 189μs 129ns 484ns 0.0944 0 0 6.51 KB
#4973 RunWafRealisticBenchmark netcoreapp3.1 206μs 447ns 1.73μs 0 0 0 6.49 KB
#4973 RunWafRealisticBenchmark net472 222μs 424ns 1.64μs 0.996 0 0 6.59 KB
#4973 RunWafRealisticBenchmarkWithAttack net6.0 126μs 268ns 1.04μs 0 0 0 4.15 KB
#4973 RunWafRealisticBenchmarkWithAttack netcoreapp3.1 134μs 90.9ns 328ns 0 0 0 4.14 KB
#4973 RunWafRealisticBenchmarkWithAttack net472 146μs 106ns 412ns 0.623 0 0 4.19 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 173μs 153ns 571ns 0.173 0 0 18.26 KB
master SendRequest netcoreapp3.1 193μs 429ns 1.66μs 0.192 0 0 20.42 KB
master SendRequest net472 0.000389ns 0.000226ns 0.000874ns 0 0 0 0 b
#4973 SendRequest net6.0 173μs 177ns 663ns 0.172 0 0 18.26 KB
#4973 SendRequest netcoreapp3.1 193μs 372ns 1.44μs 0.191 0 0 20.42 KB
#4973 SendRequest net472 0.00129ns 0.000318ns 0.00115ns 0 0 0 0 b
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed ✔️ More allocations ⚠️

More allocations ⚠️ in #4973

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net6.0 41.44 KB 41.86 KB 421 B 1.02%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 536μs 775ns 3μs 0.558 0 0 41.44 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 647μs 913ns 3.54μs 0.319 0 0 41.79 KB
master WriteAndFlushEnrichedTraces net472 838μs 3.92μs 15.7μs 8.45 2.53 0.422 53.24 KB
#4973 WriteAndFlushEnrichedTraces net6.0 552μs 2.32μs 8.99μs 0.566 0 0 41.86 KB
#4973 WriteAndFlushEnrichedTraces netcoreapp3.1 643μs 1.07μs 4μs 0.329 0 0 41.98 KB
#4973 WriteAndFlushEnrichedTraces net472 873μs 2.55μs 9.19μs 8.39 2.52 0.419 53.24 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.583ns 2.26ns 0.0109 0 0 776 B
master ExecuteNonQuery netcoreapp3.1 1.53μs 0.614ns 2.38ns 0.00995 0 0 776 B
master ExecuteNonQuery net472 1.85μs 4.13ns 16ns 0.117 0 0 738 B
#4973 ExecuteNonQuery net6.0 1.14μs 2.64ns 9.87ns 0.0108 0 0 776 B
#4973 ExecuteNonQuery netcoreapp3.1 1.53μs 0.6ns 2.32ns 0.00995 0 0 776 B
#4973 ExecuteNonQuery net472 1.73μs 1.95ns 7.03ns 0.117 0 0 738 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.2μs 0.591ns 2.21ns 0.0133 0 0 944 B
master CallElasticsearch netcoreapp3.1 1.61μs 1.33ns 4.98ns 0.0121 0 0 944 B
master CallElasticsearch net472 2.53μs 1.15ns 4.47ns 0.153 0 0 963 B
master CallElasticsearchAsync net6.0 1.26μs 1.44ns 5.57ns 0.0126 0 0 920 B
master CallElasticsearchAsync netcoreapp3.1 1.6μs 2.62ns 10.1ns 0.0129 0 0 992 B
master CallElasticsearchAsync net472 2.54μs 1.37ns 5.14ns 0.161 0 0 1.02 KB
#4973 CallElasticsearch net6.0 1.21μs 0.788ns 2.84ns 0.0133 0 0 944 B
#4973 CallElasticsearch netcoreapp3.1 1.54μs 0.902ns 3.38ns 0.0123 0 0 944 B
#4973 CallElasticsearch net472 2.48μs 0.535ns 1.93ns 0.153 0 0 963 B
#4973 CallElasticsearchAsync net6.0 1.24μs 0.482ns 1.87ns 0.013 0 0 920 B
#4973 CallElasticsearchAsync netcoreapp3.1 1.66μs 0.679ns 2.63ns 0.0131 0 0 992 B
#4973 CallElasticsearchAsync net472 2.58μs 0.887ns 3.44ns 0.161 0 0 1.02 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.25μs 1.35ns 5.22ns 0.0129 0 0 920 B
master ExecuteAsync netcoreapp3.1 1.55μs 1.04ns 4.04ns 0.0124 0 0 920 B
master ExecuteAsync net472 1.82μs 0.715ns 2.77ns 0.14 0 0 883 B
#4973 ExecuteAsync net6.0 1.28μs 0.898ns 3.36ns 0.0129 0 0 920 B
#4973 ExecuteAsync netcoreapp3.1 1.61μs 1.03ns 3.84ns 0.012 0 0 920 B
#4973 ExecuteAsync net472 1.9μs 0.526ns 1.82ns 0.14 0 0 883 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.11μs 1.85ns 6.91ns 0.0289 0 0 2.1 KB
master SendAsync netcoreapp3.1 5.09μs 2.29ns 8.27ns 0.0357 0 0 2.64 KB
master SendAsync net472 7.72μs 2.7ns 10.4ns 0.524 0 0 3.31 KB
#4973 SendAsync net6.0 4.16μs 1.26ns 4.72ns 0.03 0 0 2.1 KB
#4973 SendAsync netcoreapp3.1 5.07μs 2.25ns 8.7ns 0.0356 0 0 2.64 KB
#4973 SendAsync net472 7.74μs 2.37ns 8.86ns 0.524 0.00388 0 3.31 KB
Benchmarks.Trace.Iast.StringAspectsBenchmark - Faster 🎉 Fewer allocations 🎉

Faster 🎉 in #4973

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑netcoreapp3.1 1.152 60,800.00 52,800.00 bimodal

Fewer allocations 🎉 in #4973

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net472 229.38 KB 221.18 KB -8.19 KB -3.57%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net472 61.66 KB 59.07 KB -2.59 KB -4.20%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StringConcatBenchmark net6.0 51.2μs 202ns 758ns 0 0 0 43.44 KB
master StringConcatBenchmark netcoreapp3.1 60.3μs 595ns 5.9μs 0 0 0 42.64 KB
master StringConcatBenchmark net472 37.2μs 85.9ns 321ns 0 0 0 61.66 KB
master StringConcatAspectBenchmark net6.0 253μs 3.42μs 31.3μs 0 0 0 204.13 KB
master StringConcatAspectBenchmark netcoreapp3.1 290μs 1.64μs 11.4μs 0 0 0 201.84 KB
master StringConcatAspectBenchmark net472 236μs 1.3μs 7.68μs 0 0 0 229.38 KB
#4973 StringConcatBenchmark net6.0 58.3μs 551ns 5.49μs 0 0 0 43.44 KB
#4973 StringConcatBenchmark netcoreapp3.1 53μs 289ns 1.53μs 0 0 0 42.64 KB
#4973 StringConcatBenchmark net472 37.9μs 55.6ns 201ns 0 0 0 59.07 KB
#4973 StringConcatAspectBenchmark net6.0 266μs 1.26μs 5.03μs 0 0 0 204.94 KB
#4973 StringConcatAspectBenchmark netcoreapp3.1 272μs 1.6μs 15.1μs 0 0 0 201.26 KB
#4973 StringConcatAspectBenchmark net472 228μs 2.42μs 22.5μs 0 0 0 221.18 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.51μs 0.506ns 1.89ns 0.022 0 0 1.58 KB
master EnrichedLog netcoreapp3.1 2.24μs 1.67ns 6.47ns 0.0212 0 0 1.58 KB
master EnrichedLog net472 2.55μs 2.48ns 9.6ns 0.238 0 0 1.51 KB
#4973 EnrichedLog net6.0 1.51μs 0.535ns 2.07ns 0.0219 0 0 1.58 KB
#4973 EnrichedLog netcoreapp3.1 2.22μs 1.8ns 6.97ns 0.0213 0 0 1.58 KB
#4973 EnrichedLog net472 2.56μs 3.68ns 13.8ns 0.239 0 0 1.51 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 114μs 66.8ns 259ns 0.0565 0 0 4.22 KB
master EnrichedLog netcoreapp3.1 120μs 150ns 560ns 0 0 0 4.22 KB
master EnrichedLog net472 147μs 109ns 423ns 0.66 0.22 0 4.4 KB
#4973 EnrichedLog net6.0 113μs 65.9ns 237ns 0.0566 0 0 4.22 KB
#4973 EnrichedLog netcoreapp3.1 119μs 87.6ns 339ns 0 0 0 4.22 KB
#4973 EnrichedLog net472 147μs 50ns 173ns 0.659 0.22 0 4.4 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 3.01μs 0.943ns 3.65ns 0.0303 0 0 2.14 KB
master EnrichedLog netcoreapp3.1 4.3μs 1.16ns 4.2ns 0.0279 0 0 2.14 KB
master EnrichedLog net472 4.83μs 1.27ns 4.91ns 0.311 0 0 1.95 KB
#4973 EnrichedLog net6.0 3.14μs 1.26ns 4.89ns 0.0298 0 0 2.14 KB
#4973 EnrichedLog netcoreapp3.1 4.09μs 1.56ns 6.06ns 0.0286 0 0 2.14 KB
#4973 EnrichedLog net472 4.84μs 0.943ns 3.4ns 0.31 0 0 1.95 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.37μs 0.574ns 2.15ns 0.0157 0 0 1.11 KB
master SendReceive netcoreapp3.1 1.74μs 0.988ns 3.83ns 0.0147 0 0 1.11 KB
master SendReceive net472 2.07μs 1.87ns 7.01ns 0.178 0 0 1.12 KB
#4973 SendReceive net6.0 1.32μs 0.244ns 0.943ns 0.0153 0 0 1.11 KB
#4973 SendReceive netcoreapp3.1 1.84μs 0.843ns 2.92ns 0.0147 0 0 1.11 KB
#4973 SendReceive net472 2.18μs 2.46ns 9.21ns 0.178 0 0 1.12 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.68μs 0.877ns 3.28ns 0.0215 0 0 1.54 KB
master EnrichedLog netcoreapp3.1 3.99μs 1.75ns 6.79ns 0.0201 0 0 1.58 KB
master EnrichedLog net472 4.48μs 2.48ns 9.6ns 0.312 0 0 1.97 KB
#4973 EnrichedLog net6.0 2.73μs 0.53ns 1.98ns 0.0218 0 0 1.54 KB
#4973 EnrichedLog netcoreapp3.1 3.88μs 1.48ns 5.75ns 0.0212 0 0 1.58 KB
#4973 EnrichedLog net472 4.42μs 1.63ns 6.08ns 0.313 0 0 1.97 KB
Benchmarks.Trace.SpanBenchmark - Faster 🎉 Same allocations ✔️

Faster 🎉 in #4973

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net6.0 1.154 549.04 475.74

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartFinishSpan net6.0 549ns 0.0836ns 0.301ns 0.00755 0 0 544 B
master StartFinishSpan netcoreapp3.1 729ns 0.518ns 1.87ns 0.00743 0 0 544 B
master StartFinishSpan net472 841ns 0.25ns 0.968ns 0.0865 0 0 546 B
master StartFinishScope net6.0 585ns 0.209ns 0.81ns 0.00936 0 0 664 B
master StartFinishScope netcoreapp3.1 832ns 0.266ns 0.995ns 0.00912 0 0 664 B
master StartFinishScope net472 968ns 0.216ns 0.78ns 0.0991 0 0 626 B
#4973 StartFinishSpan net6.0 476ns 0.128ns 0.48ns 0.00764 0 0 544 B
#4973 StartFinishSpan netcoreapp3.1 726ns 0.178ns 0.642ns 0.00728 0 0 544 B
#4973 StartFinishSpan net472 801ns 0.465ns 1.8ns 0.0865 0 0 546 B
#4973 StartFinishScope net6.0 544ns 0.146ns 0.566ns 0.00923 0 0 664 B
#4973 StartFinishScope netcoreapp3.1 827ns 0.191ns 0.716ns 0.00889 0 0 664 B
#4973 StartFinishScope net472 974ns 1.32ns 5.12ns 0.0992 0 0 626 B
Benchmarks.Trace.TraceAnnotationsBenchmark - Slower ⚠️ Same allocations ✔️

Slower ⚠️ in #4973

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin‑net6.0 1.162 647.58 752.18

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master RunOnMethodBegin net6.0 648ns 0.152ns 0.587ns 0.00937 0 0 664 B
master RunOnMethodBegin netcoreapp3.1 955ns 0.343ns 1.33ns 0.00906 0 0 664 B
master RunOnMethodBegin net472 1.07μs 0.319ns 1.19ns 0.0992 0 0 626 B
#4973 RunOnMethodBegin net6.0 752ns 0.246ns 0.951ns 0.00905 0 0 664 B
#4973 RunOnMethodBegin netcoreapp3.1 899ns 0.273ns 1.06ns 0.00925 0 0 664 B
#4973 RunOnMethodBegin net472 1.15μs 0.511ns 1.98ns 0.0992 0 0 626 B

@andrewlock

andrewlock commented Dec 15, 2023

Copy link
Copy Markdown
Member

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 (4973) (11.294M)   : 0, 11293885
    master (10.975M)   : 0, 10975378
    benchmarks/2.9.0 (11.163M)   : 0, 11162756

    section Automatic
    This PR (4973) (7.581M)   : 0, 7581407
    master (7.712M)   : 0, 7712004
    benchmarks/2.9.0 (8.268M)   : 0, 8267853

    section Trace stats
    This PR (4973) (7.936M)   : 0, 7936338
    master (7.900M)   : 0, 7900048

    section Manual
    This PR (4973) (9.446M)   : 0, 9446267
    master (9.590M)   : 0, 9589996

    section Manual + Automatic
    This PR (4973) (7.137M)   : 0, 7136764
    master (7.199M)   : 0, 7199081

    section Version Conflict
    This PR (4973) (6.435M)   : 0, 6435148
    master (6.595M)   : 0, 6594857

Loading
gantt
    title Throughput Linux arm64 (Total requests) 
    dateFormat  X
    axisFormat %s
    section Baseline
    This PR (4973) (9.645M)   : 0, 9645181
    master (9.559M)   : 0, 9559250
    benchmarks/2.9.0 (9.367M)   : 0, 9367466

    section Automatic
    This PR (4973) (6.453M)   : 0, 6453495
    master (6.430M)   : 0, 6429697

    section Trace stats
    This PR (4973) (6.954M)   : 0, 6954063
    master (6.913M)   : 0, 6912867

    section Manual
    This PR (4973) (8.325M)   : 0, 8325222
    master (8.113M)   : 0, 8112975

    section Manual + Automatic
    This PR (4973) (6.231M)   : 0, 6231323
    master (6.193M)   : 0, 6193054

    section Version Conflict
    This PR (4973) (5.640M)   : 0, 5639830
    master (5.718M)   : 0, 5718277

Loading
gantt
    title Throughput Windows x64 (Total requests) 
    dateFormat  X
    axisFormat %s
    section Baseline
    This PR (4973) (10.205M)   : 0, 10204831
    master (10.425M)   : 0, 10425449
    benchmarks/2.9.0 (10.212M)   : 0, 10211874

    section Automatic
    This PR (4973) (7.265M)   : 0, 7265191
    master (7.239M)   : 0, 7239076
    benchmarks/2.9.0 (7.605M)   : 0, 7605074

    section Trace stats
    This PR (4973) (7.658M)   : 0, 7657546
    master (7.593M)   : 0, 7592694

    section Manual
    This PR (4973) (9.006M)   : 0, 9005528
    master (9.072M)   : 0, 9071898

    section Manual + Automatic
    This PR (4973) (6.910M)   : 0, 6910332
    master (7.058M)   : 0, 7057785

    section Version Conflict
    This PR (4973) (6.435M)   : 0, 6435005
    master (6.298M)   : 0, 6298452

Loading
gantt
    title Throughput Linux x64 (ASM) (Total requests) 
    dateFormat  X
    axisFormat %s
    section Baseline
    master (7.275M)   : 0, 7275478
    benchmarks/2.9.0 (7.838M)   : 0, 7838185

    section No attack
    master (1.838M)   : 0, 1838305
    benchmarks/2.9.0 (3.252M)   : 0, 3252197

    section Attack
    master (1.464M)   : 0, 1463853
    benchmarks/2.9.0 (2.508M)   : 0, 2508032

    section Blocking
    master (3.176M)   : 0, 3176014

    section IAST default
    master (6.410M)   : 0, 6409716

    section IAST full
    master (5.594M)   : 0, 5594312

    section Base vuln
    master (0.955M)   : 0, 954641

    section IAST vuln
    master (0.875M)   : 0, 874734

Loading


return new CallTargetState(scope);
// request the message attributes that a datadog instrumentation might have set when sending
request.MessageAttributeNames.Add(ContextPropagation.SqsKey);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Out of curiosity, what is the behavior when an attribute that doesn't exist is requested?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The doc doesn't say, so I suppose it's what one'd expect, i.e. that it's simply not returned if it doesn't exist.

@vandonr vandonr marked this pull request as ready for review January 25, 2024 17:49
@vandonr vandonr requested a review from a team January 30, 2024 13:43

@andrewlock andrewlock left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM thanks! Just some tiny nit suggestions

@vandonr vandonr requested a review from a team as a code owner February 16, 2024 15:14
@vandonr vandonr merged commit f265950 into master Feb 19, 2024
@vandonr vandonr deleted the vandonr/sqs branch February 19, 2024 10:49
@github-actions github-actions Bot added this to the vNext milestone Feb 19, 2024
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