Skip to content
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] Log FormatException from get_Uri as debug #6489

Merged
merged 1 commit into from
Jan 2, 2025

Conversation

e-n-0
Copy link
Member

@e-n-0 e-n-0 commented Dec 30, 2024

Summary of changes

Add catch blocks for the FormatException in all aspect where the Uri is get from the instance.

Reason for change

Error identified on Error Tracking.

The instrumentation fails because of an invalid string during the creation of the Uri. The tainting would not happen because it requires the OriginalString from the Uri to keep tracks of its usage.

Implementation details

From the Microsoft Docs:

UriFormatException
The URI constructed by the UriBuilder properties is invalid.

I did choose FormatException because from the docs, they say:
Note: In .NET for Windows Store apps or the Portable Class Library, catch the base class exception, FormatException, instead.

@e-n-0 e-n-0 self-assigned this Dec 30, 2024
@github-actions github-actions bot added area:tracer The core tracer library (Datadog.Trace, does not include OpenTracing, native code, or integrations) area:asm labels Dec 30, 2024
@e-n-0 e-n-0 changed the title [ASM] Iast aspect error: catch FormatException from get_Uri [ASM] Log FormatException from get_Uri as debug Dec 30, 2024
@e-n-0 e-n-0 marked this pull request as ready for review December 30, 2024 16:03
@e-n-0 e-n-0 requested a review from a team as a code owner December 30, 2024 16:03
@andrewlock
Copy link
Member

andrewlock commented Dec 30, 2024

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 (6489) - mean (68ms)  : 66, 71
     .   : milestone, 68,
    master - mean (69ms)  : 64, 73
     .   : milestone, 69,

    section CallTarget+Inlining+NGEN
    This PR (6489) - mean (977ms)  : 957, 998
     .   : milestone, 977,
    master - mean (976ms)  : 946, 1006
     .   : milestone, 976,

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

    section CallTarget+Inlining+NGEN
    This PR (6489) - mean (674ms)  : 658, 690
     .   : milestone, 674,
    master - mean (677ms)  : 659, 694
     .   : milestone, 677,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6489) - mean (91ms)  : 89, 93
     .   : milestone, 91,
    master - mean (91ms)  : 89, 93
     .   : milestone, 91,

    section CallTarget+Inlining+NGEN
    This PR (6489) - mean (629ms)  : 614, 644
     .   : milestone, 629,
    master - mean (629ms)  : 614, 643
     .   : milestone, 629,

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

    section CallTarget+Inlining+NGEN
    This PR (6489) - mean (1,103ms)  : 1064, 1142
     .   : milestone, 1103,
    master - mean (1,099ms)  : 1070, 1129
     .   : milestone, 1099,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6489) - mean (278ms)  : 273, 282
     .   : milestone, 278,
    master - mean (279ms)  : 273, 284
     .   : milestone, 279,

    section CallTarget+Inlining+NGEN
    This PR (6489) - mean (874ms)  : 838, 910
     .   : milestone, 874,
    master - mean (874ms)  : 844, 903
     .   : milestone, 874,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6489) - mean (267ms)  : 263, 272
     .   : milestone, 267,
    master - mean (267ms)  : 261, 273
     .   : milestone, 267,

    section CallTarget+Inlining+NGEN
    This PR (6489) - mean (845ms)  : 819, 872
     .   : milestone, 845,
    master - mean (846ms)  : 819, 873
     .   : milestone, 846,

Loading

@datadog-ddstaging
Copy link

datadog-ddstaging bot commented Dec 30, 2024

Datadog Report

Branch report: flavien/setquery-error
Commit report: e6eceee
Test service: dd-trace-dotnet

✅ 0 Failed, 228053 Passed, 2100 Skipped, 19h 3m 7.11s Total Time

@andrewlock
Copy link
Member

andrewlock commented Dec 30, 2024

Benchmarks Report for appsec 🐌

Benchmarks for #6489 compared to master:

  • 1 benchmarks are faster, with geometric mean 1.191
  • 1 benchmarks have fewer 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 201μs 136ns 510ns 2.55 0 0 188.76 KB
master AllCycleSimpleBody netcoreapp3.1 297μs 83.2ns 311ns 2.69 0 0 196.09 KB
master AllCycleSimpleBody net472 274μs 279ns 1.08μs 35.8 2.05 0 225.78 KB
master AllCycleMoreComplexBody net6.0 212μs 793ns 3.07μs 2.73 0 0 192.26 KB
master AllCycleMoreComplexBody netcoreapp3.1 310μs 117ns 436ns 2.64 0 0 199.5 KB
master AllCycleMoreComplexBody net472 278μs 242ns 939ns 36.4 2.08 0 229.3 KB
master ObjectExtractorSimpleBody net6.0 139ns 0.0852ns 0.33ns 0.00394 0 0 280 B
master ObjectExtractorSimpleBody netcoreapp3.1 189ns 0.0791ns 0.285ns 0.00372 0 0 272 B
master ObjectExtractorSimpleBody net472 169ns 0.249ns 0.966ns 0.0446 0 0 281 B
master ObjectExtractorMoreComplexBody net6.0 2.83μs 1.27ns 4.74ns 0.053 0 0 3.78 KB
master ObjectExtractorMoreComplexBody netcoreapp3.1 3.75μs 2.78ns 10.4ns 0.0505 0 0 3.69 KB
master ObjectExtractorMoreComplexBody net472 3.6μs 3.71ns 14.4ns 0.602 0.00541 0 3.8 KB
#6489 AllCycleSimpleBody net6.0 206μs 174ns 629ns 2.61 0 0 188.76 KB
#6489 AllCycleSimpleBody netcoreapp3.1 301μs 277ns 1.03μs 2.71 0 0 196.09 KB
#6489 AllCycleSimpleBody net472 281μs 485ns 1.88μs 35.9 2.1 0 225.79 KB
#6489 AllCycleMoreComplexBody net6.0 211μs 119ns 430ns 2.74 0 0 192.26 KB
#6489 AllCycleMoreComplexBody netcoreapp3.1 310μs 226ns 844ns 2.78 0 0 199.51 KB
#6489 AllCycleMoreComplexBody net472 280μs 301ns 1.17μs 36.4 2.1 0 229.3 KB
#6489 ObjectExtractorSimpleBody net6.0 144ns 0.19ns 0.711ns 0.00393 0 0 280 B
#6489 ObjectExtractorSimpleBody netcoreapp3.1 202ns 0.29ns 1.09ns 0.00374 0 0 272 B
#6489 ObjectExtractorSimpleBody net472 162ns 0.139ns 0.519ns 0.0446 0 0 281 B
#6489 ObjectExtractorMoreComplexBody net6.0 2.87μs 1.61ns 6.04ns 0.0531 0 0 3.78 KB
#6489 ObjectExtractorMoreComplexBody netcoreapp3.1 3.76μs 2.3ns 8.92ns 0.0509 0 0 3.69 KB
#6489 ObjectExtractorMoreComplexBody net472 3.62μs 4.34ns 16.8ns 0.602 0.0054 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 35.7μs 14.9ns 55.7ns 0.449 0 0 32.4 KB
master EncodeArgs netcoreapp3.1 54.5μs 29ns 112ns 0.431 0 0 32.4 KB
master EncodeArgs net472 66.2μs 33.9ns 127ns 5.15 0.0661 0 32.5 KB
master EncodeLegacyArgs net6.0 76.8μs 409ns 2.08μs 0.0357 0 0 2.14 KB
master EncodeLegacyArgs netcoreapp3.1 108μs 57.6ns 208ns 0 0 0 2.14 KB
master EncodeLegacyArgs net472 156μs 68.3ns 265ns 0.312 0 0 2.15 KB
#6489 EncodeArgs net6.0 36.6μs 14.5ns 52.4ns 0.456 0 0 32.4 KB
#6489 EncodeArgs netcoreapp3.1 54.1μs 38.7ns 150ns 0.431 0 0 32.4 KB
#6489 EncodeArgs net472 66.9μs 21ns 72.9ns 5.13 0.0662 0 32.5 KB
#6489 EncodeLegacyArgs net6.0 74.9μs 205ns 793ns 0 0 0 2.14 KB
#6489 EncodeLegacyArgs netcoreapp3.1 106μs 372ns 1.44μs 0 0 0 2.14 KB
#6489 EncodeLegacyArgs net472 155μs 144ns 556ns 0.309 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 173μs 66.8ns 250ns 0 0 0 2.44 KB
master RunWafRealisticBenchmark netcoreapp3.1 189μs 299ns 1.16μs 0 0 0 2.39 KB
master RunWafRealisticBenchmark net472 202μs 98.5ns 381ns 0.301 0 0 2.46 KB
master RunWafRealisticBenchmarkWithAttack net6.0 115μs 142ns 552ns 0 0 0 1.47 KB
master RunWafRealisticBenchmarkWithAttack netcoreapp3.1 123μs 229ns 887ns 0 0 0 1.46 KB
master RunWafRealisticBenchmarkWithAttack net472 132μs 47.9ns 186ns 0.197 0 0 1.49 KB
#6489 RunWafRealisticBenchmark net6.0 177μs 199ns 770ns 0 0 0 2.44 KB
#6489 RunWafRealisticBenchmark netcoreapp3.1 188μs 297ns 1.15μs 0 0 0 2.39 KB
#6489 RunWafRealisticBenchmark net472 200μs 55.1ns 206ns 0.299 0 0 2.46 KB
#6489 RunWafRealisticBenchmarkWithAttack net6.0 115μs 51.2ns 192ns 0 0 0 1.47 KB
#6489 RunWafRealisticBenchmarkWithAttack netcoreapp3.1 123μs 78.1ns 292ns 0 0 0 1.46 KB
#6489 RunWafRealisticBenchmarkWithAttack net472 132μs 66.4ns 248ns 0.199 0 0 1.48 KB
Benchmarks.Trace.Iast.StringAspectsBenchmark - Faster 🎉 Fewer allocations 🎉

Faster 🎉 in #6489

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net6.0 1.191 61,300.00 51,450.00 multimodal

Fewer allocations 🎉 in #6489

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net472 59.07 KB 57.26 KB -1.82 KB -3.07%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StringConcatBenchmark net6.0 61μs 721ns 7.21μs 0 0 0 43.44 KB
master StringConcatBenchmark netcoreapp3.1 62.1μs 1.01μs 10.1μs 0 0 0 42.64 KB
master StringConcatBenchmark net472 38.1μs 141ns 528ns 0 0 0 59.07 KB
master StringConcatAspectBenchmark net6.0 313μs 1.37μs 6.45μs 0 0 0 255.54 KB
master StringConcatAspectBenchmark netcoreapp3.1 340μs 1.74μs 9.99μs 0 0 0 254.06 KB
master StringConcatAspectBenchmark net472 291μs 6.87μs 68μs 0 0 0 278.53 KB
#6489 StringConcatBenchmark net6.0 51.7μs 251ns 1μs 0 0 0 43.44 KB
#6489 StringConcatBenchmark netcoreapp3.1 54.3μs 283ns 1.33μs 0 0 0 42.64 KB
#6489 StringConcatBenchmark net472 38.6μs 199ns 931ns 0 0 0 57.26 KB
#6489 StringConcatAspectBenchmark net6.0 318μs 1.79μs 13.6μs 0 0 0 255.86 KB
#6489 StringConcatAspectBenchmark netcoreapp3.1 379μs 2.2μs 18μs 0 0 0 253.88 KB
#6489 StringConcatAspectBenchmark net472 299μs 6.38μs 61.5μs 0 0 0 278.53 KB

@andrewlock
Copy link
Member

andrewlock commented Dec 30, 2024

Benchmarks Report for tracer 🐌

Benchmarks for #6489 compared to master:

  • 1 benchmarks are slower, with geometric mean 1.178
  • 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 8.05μs 34.9ns 130ns 0.0161 0.00402 0 5.61 KB
master StartStopWithChild netcoreapp3.1 10.2μs 56ns 321ns 0.0204 0.0102 0 5.8 KB
master StartStopWithChild net472 16.3μs 46.7ns 181ns 1.04 0.301 0.0975 6.2 KB
#6489 StartStopWithChild net6.0 8.01μs 43.3ns 252ns 0.0117 0.00389 0 5.61 KB
#6489 StartStopWithChild netcoreapp3.1 10.3μs 57.6ns 360ns 0.0157 0.0104 0 5.8 KB
#6489 StartStopWithChild net472 16.4μs 55.3ns 214ns 1.05 0.316 0.0973 6.2 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 479μs 335ns 1.3μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 649μs 535ns 2.07μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces net472 851μs 327ns 1.18μs 0.425 0 0 3.3 KB
#6489 WriteAndFlushEnrichedTraces net6.0 491μs 500ns 1.94μs 0 0 0 2.7 KB
#6489 WriteAndFlushEnrichedTraces netcoreapp3.1 653μs 356ns 1.33μs 0 0 0 2.7 KB
#6489 WriteAndFlushEnrichedTraces net472 822μs 860ns 3.33μs 0.408 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 156μs 1.17μs 11.6μs 0.166 0 0 14.47 KB
master SendRequest netcoreapp3.1 181μs 1.26μs 12.5μs 0.162 0 0 17.27 KB
master SendRequest net472 0.000457ns 0.00038ns 0.00147ns 0 0 0 0 b
#6489 SendRequest net6.0 161μs 1.19μs 11.8μs 0.171 0 0 14.47 KB
#6489 SendRequest netcoreapp3.1 179μs 1.48μs 14.8μs 0.166 0 0 17.27 KB
#6489 SendRequest net472 0.00119ns 0.000838ns 0.00324ns 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 574μs 3.02μs 15.4μs 0.548 0 0 41.54 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 654μs 3.4μs 17.3μs 0.324 0 0 41.68 KB
master WriteAndFlushEnrichedTraces net472 835μs 2.49μs 9.32μs 8.33 2.5 0.417 53.29 KB
#6489 WriteAndFlushEnrichedTraces net6.0 590μs 3.36μs 24μs 0.553 0 0 41.71 KB
#6489 WriteAndFlushEnrichedTraces netcoreapp3.1 674μs 2.57μs 9.63μs 0.324 0 0 41.76 KB
#6489 WriteAndFlushEnrichedTraces net472 830μs 3.51μs 13.6μs 8.22 2.47 0.411 53.32 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.32μs 1.22ns 4.56ns 0.0145 0 0 1.02 KB
master ExecuteNonQuery netcoreapp3.1 1.72μs 2.35ns 8.78ns 0.0138 0 0 1.02 KB
master ExecuteNonQuery net472 2.07μs 2.18ns 8.17ns 0.156 0.00103 0 987 B
#6489 ExecuteNonQuery net6.0 1.29μs 1.05ns 3.93ns 0.0143 0 0 1.02 KB
#6489 ExecuteNonQuery netcoreapp3.1 1.79μs 2.37ns 9.19ns 0.0133 0 0 1.02 KB
#6489 ExecuteNonQuery net472 2.08μs 1.95ns 7.54ns 0.156 0.00104 0 987 B
Benchmarks.Trace.ElasticsearchBenchmark - Slower ⚠️ Same allocations ✔️

Slower ⚠️ in #6489

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch‑net6.0 1.178 1,142.14 1,345.26

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master CallElasticsearch net6.0 1.14μs 1.34ns 4.84ns 0.0138 0 0 976 B
master CallElasticsearch netcoreapp3.1 1.55μs 0.946ns 3.66ns 0.0133 0 0 976 B
master CallElasticsearch net472 2.5μs 1.13ns 4.24ns 0.158 0 0 995 B
master CallElasticsearchAsync net6.0 1.37μs 0.793ns 2.97ns 0.0131 0 0 952 B
master CallElasticsearchAsync netcoreapp3.1 1.68μs 0.874ns 3.27ns 0.0142 0 0 1.02 KB
master CallElasticsearchAsync net472 2.59μs 0.859ns 3.22ns 0.167 0 0 1.05 KB
#6489 CallElasticsearch net6.0 1.34μs 0.481ns 1.8ns 0.0135 0 0 976 B
#6489 CallElasticsearch netcoreapp3.1 1.57μs 3.39ns 12.7ns 0.0134 0 0 976 B
#6489 CallElasticsearch net472 2.43μs 2.31ns 8.93ns 0.158 0 0 995 B
#6489 CallElasticsearchAsync net6.0 1.27μs 0.627ns 2.26ns 0.0129 0 0 952 B
#6489 CallElasticsearchAsync netcoreapp3.1 1.69μs 0.683ns 2.56ns 0.0135 0 0 1.02 KB
#6489 CallElasticsearchAsync net472 2.69μs 2.98ns 11.5ns 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 0.501ns 1.87ns 0.0129 0 0 952 B
master ExecuteAsync netcoreapp3.1 1.68μs 0.905ns 3.39ns 0.0127 0 0 952 B
master ExecuteAsync net472 1.86μs 0.506ns 1.89ns 0.145 0 0 915 B
#6489 ExecuteAsync net6.0 1.43μs 0.52ns 2.01ns 0.0136 0 0 952 B
#6489 ExecuteAsync netcoreapp3.1 1.63μs 1.16ns 4.48ns 0.0129 0 0 952 B
#6489 ExecuteAsync net472 1.82μs 0.483ns 1.81ns 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.42μs 2.52ns 9.43ns 0.0309 0 0 2.31 KB
master SendAsync netcoreapp3.1 5.26μs 1.66ns 6.44ns 0.0368 0 0 2.85 KB
master SendAsync net472 7.37μs 2.91ns 11.3ns 0.493 0 0 3.12 KB
#6489 SendAsync net6.0 4.53μs 4.77ns 18.5ns 0.0317 0 0 2.31 KB
#6489 SendAsync netcoreapp3.1 5.17μs 2.09ns 8.1ns 0.0362 0 0 2.85 KB
#6489 SendAsync net472 7.36μs 1.29ns 5ns 0.493 0 0 3.12 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.56μs 1.39ns 5.19ns 0.0227 0 0 1.64 KB
master EnrichedLog netcoreapp3.1 2.17μs 1.18ns 4.57ns 0.0218 0 0 1.64 KB
master EnrichedLog net472 2.71μs 1.86ns 6.94ns 0.249 0 0 1.57 KB
#6489 EnrichedLog net6.0 1.59μs 1.27ns 4.74ns 0.0231 0 0 1.64 KB
#6489 EnrichedLog netcoreapp3.1 2.26μs 2.3ns 8.59ns 0.0224 0 0 1.64 KB
#6489 EnrichedLog net472 2.7μs 1.43ns 5.53ns 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 118μs 152ns 590ns 0.0583 0 0 4.28 KB
master EnrichedLog netcoreapp3.1 123μs 286ns 1.11μs 0.0612 0 0 4.28 KB
master EnrichedLog net472 152μs 207ns 800ns 0.68 0.227 0 4.46 KB
#6489 EnrichedLog net6.0 118μs 155ns 602ns 0.0586 0 0 4.28 KB
#6489 EnrichedLog netcoreapp3.1 121μs 189ns 733ns 0 0 0 4.28 KB
#6489 EnrichedLog net472 154μs 127ns 493ns 0.687 0.229 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 3.08μs 1.1ns 4.27ns 0.0308 0 0 2.2 KB
master EnrichedLog netcoreapp3.1 4.17μs 1.49ns 5.76ns 0.0292 0 0 2.2 KB
master EnrichedLog net472 4.91μs 1.02ns 3.69ns 0.32 0 0 2.02 KB
#6489 EnrichedLog net6.0 2.87μs 4.94ns 19.1ns 0.0306 0 0 2.2 KB
#6489 EnrichedLog netcoreapp3.1 4.29μs 2.19ns 8.5ns 0.0303 0 0 2.2 KB
#6489 EnrichedLog net472 4.94μs 0.625ns 2.26ns 0.319 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.3μs 0.713ns 2.67ns 0.0163 0 0 1.14 KB
master SendReceive netcoreapp3.1 1.88μs 1.17ns 4.52ns 0.015 0 0 1.14 KB
master SendReceive net472 2.05μs 0.852ns 3.19ns 0.184 0 0 1.16 KB
#6489 SendReceive net6.0 1.35μs 0.952ns 3.69ns 0.0162 0 0 1.14 KB
#6489 SendReceive netcoreapp3.1 1.8μs 1.58ns 6.12ns 0.0154 0 0 1.14 KB
#6489 SendReceive net472 2.2μs 1.25ns 4.82ns 0.183 0 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.71μs 0.928ns 3.47ns 0.0222 0 0 1.6 KB
master EnrichedLog netcoreapp3.1 4.11μs 1.8ns 6.97ns 0.0226 0 0 1.65 KB
master EnrichedLog net472 4.29μs 1.81ns 6.79ns 0.322 0 0 2.04 KB
#6489 EnrichedLog net6.0 2.71μs 0.883ns 3.42ns 0.0218 0 0 1.6 KB
#6489 EnrichedLog netcoreapp3.1 3.88μs 2.69ns 10.1ns 0.0214 0 0 1.65 KB
#6489 EnrichedLog net472 4.37μs 5.35ns 20.7ns 0.323 0 0 2.04 KB
Benchmarks.Trace.SpanBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartFinishSpan net6.0 400ns 0.368ns 1.43ns 0.00805 0 0 576 B
master StartFinishSpan netcoreapp3.1 611ns 0.632ns 2.45ns 0.00762 0 0 576 B
master StartFinishSpan net472 647ns 0.237ns 0.918ns 0.0916 0 0 578 B
master StartFinishScope net6.0 484ns 0.273ns 1.02ns 0.00979 0 0 696 B
master StartFinishScope netcoreapp3.1 726ns 0.342ns 1.28ns 0.00942 0 0 696 B
master StartFinishScope net472 910ns 0.508ns 1.97ns 0.104 0 0 658 B
#6489 StartFinishSpan net6.0 391ns 0.305ns 1.18ns 0.00806 0 0 576 B
#6489 StartFinishSpan netcoreapp3.1 583ns 0.789ns 3.05ns 0.00793 0 0 576 B
#6489 StartFinishSpan net472 691ns 0.719ns 2.79ns 0.0915 0 0 578 B
#6489 StartFinishScope net6.0 495ns 0.14ns 0.505ns 0.00972 0 0 696 B
#6489 StartFinishScope netcoreapp3.1 735ns 4.09ns 24.5ns 0.00923 0 0 696 B
#6489 StartFinishScope net472 868ns 1.87ns 7.24ns 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 581ns 0.282ns 1.09ns 0.00986 0 0 696 B
master RunOnMethodBegin netcoreapp3.1 1.02μs 0.813ns 3.15ns 0.0097 0 0 696 B
master RunOnMethodBegin net472 998ns 0.442ns 1.71ns 0.104 0 0 658 B
#6489 RunOnMethodBegin net6.0 610ns 0.396ns 1.53ns 0.00982 0 0 696 B
#6489 RunOnMethodBegin netcoreapp3.1 934ns 0.466ns 1.8ns 0.00927 0 0 696 B
#6489 RunOnMethodBegin net472 1.11μs 0.66ns 2.56ns 0.104 0 0 658 B

@e-n-0 e-n-0 force-pushed the flavien/setquery-error branch from 42915cf to e6eceee Compare December 31, 2024 13:33
Copy link
Member

@robertpi robertpi left a comment

Choose a reason for hiding this comment

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

Looks good, thanks!

@e-n-0 e-n-0 merged commit 205881b into master Jan 2, 2025
101 of 103 checks passed
@e-n-0 e-n-0 deleted the flavien/setquery-error branch January 2, 2025 12:50
@github-actions github-actions bot added this to the vNext-v3 milestone Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:asm area:tracer The core tracer library (Datadog.Trace, does not include OpenTracing, native code, or integrations) identified-by:telemetry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants