Skip to content

[Crashtracking] Remove exception types that are too broad#6109

Merged
kevingosse merged 1 commit into
masterfrom
kevin/missing_method
Oct 3, 2024
Merged

[Crashtracking] Remove exception types that are too broad#6109
kevingosse merged 1 commit into
masterfrom
kevin/missing_method

Conversation

@kevingosse

Copy link
Copy Markdown
Contributor

Summary of changes

Remove System.MissingMethodException and System.Security.VerificationException from the suspicious exception types.

Reason for change

They're too broad and are going to cause false-negatives. A crash report will still be generated if one of those exceptions cause a crash and we're in the callstack.

@kevingosse
kevingosse requested a review from a team as a code owner October 2, 2024 13:45
@datadog-ddstaging

datadog-ddstaging Bot commented Oct 2, 2024

Copy link
Copy Markdown

Datadog Report

Branch report: kevin/missing_method
Commit report: cea4c34
Test service: dd-trace-dotnet

✅ 0 Failed, 365134 Passed, 2048 Skipped, 15h 38m 37.58s Total Time

@andrewlock

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 (6109) - mean (71ms)  : 68, 75
     .   : milestone, 71,
    master - mean (70ms)  : 68, 73
     .   : milestone, 70,

    section CallTarget+Inlining+NGEN
    This PR (6109) - mean (1,107ms)  : 1085, 1129
     .   : milestone, 1107,
    master - mean (1,110ms)  : 1090, 1131
     .   : milestone, 1110,

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

    section CallTarget+Inlining+NGEN
    This PR (6109) - mean (775ms)  : 758, 792
     .   : milestone, 775,
    master - mean (775ms)  : 755, 795
     .   : milestone, 775,

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

    section CallTarget+Inlining+NGEN
    This PR (6109) - mean (738ms)  : 701, 775
     .   : milestone, 738,
    master - mean (732ms)  : 717, 747
     .   : milestone, 732,

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

    section CallTarget+Inlining+NGEN
    This PR (6109) - mean (1,199ms)  : 1173, 1224
     .   : milestone, 1199,
    master - mean (1,201ms)  : 1178, 1224
     .   : milestone, 1201,

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

    section CallTarget+Inlining+NGEN
    This PR (6109) - mean (939ms)  : 920, 958
     .   : milestone, 939,
    master - mean (939ms)  : 924, 955
     .   : milestone, 939,

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

    section CallTarget+Inlining+NGEN
    This PR (6109) - mean (923ms)  : 900, 947
     .   : milestone, 923,
    master - mean (926ms)  : 907, 946
     .   : milestone, 926,

Loading

@andrewlock

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 (6109) (11.142M)   : 0, 11142121
    master (11.009M)   : 0, 11009316
    benchmarks/2.9.0 (11.081M)   : 0, 11080577

    section Automatic
    This PR (6109) (7.302M)   : 0, 7301655
    master (7.392M)   : 0, 7391896
    benchmarks/2.9.0 (7.732M)   : 0, 7732233

    section Trace stats
    master (7.658M)   : 0, 7657594

    section Manual
    master (10.944M)   : 0, 10944483

    section Manual + Automatic
    This PR (6109) (6.833M)   : 0, 6832549
    master (6.786M)   : 0, 6785950

    section DD_TRACE_ENABLED=0
    master (10.229M)   : 0, 10229067

Loading
gantt
    title Throughput Linux arm64 (Total requests) 
    dateFormat  X
    axisFormat %s
    section Baseline
    This PR (6109) (9.648M)   : 0, 9648151
    master (9.438M)   : 0, 9438257
    benchmarks/2.9.0 (9.798M)   : 0, 9798067

    section Automatic
    This PR (6109) (6.613M)   : 0, 6612881
    master (6.590M)   : 0, 6590052

    section Trace stats
    master (7.018M)   : 0, 7018387

    section Manual
    master (9.760M)   : 0, 9760011

    section Manual + Automatic
    This PR (6109) (6.153M)   : 0, 6153384
    master (6.122M)   : 0, 6122138

    section DD_TRACE_ENABLED=0
    master (8.792M)   : 0, 8791745

Loading
gantt
    title Throughput Windows x64 (Total requests) 
    dateFormat  X
    axisFormat %s
    section Baseline
    This PR (6109) (9.934M)   : 0, 9934297
    master (9.927M)   : 0, 9927076
    benchmarks/2.9.0 (10.067M)   : 0, 10067315

    section Automatic
    This PR (6109) (6.652M)   : 0, 6651811
    master (6.595M)   : 0, 6594814
    benchmarks/2.9.0 (7.552M)   : 0, 7552193

    section Trace stats
    master (7.253M)   : 0, 7253184

    section Manual
    master (10.031M)   : 0, 10030951

    section Manual + Automatic
    This PR (6109) (6.233M)   : 0, 6233183
    master (6.128M)   : 0, 6128464

    section DD_TRACE_ENABLED=0
    master (9.284M)   : 0, 9283843

Loading

@andrewlock

Copy link
Copy Markdown
Member

Benchmarks Report for tracer 🐌

Benchmarks for #6109 compared to master:

  • 1 benchmarks are faster, with geometric mean 1.114
  • 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.76μs 42.8ns 274ns 0.0113 0.00376 0 5.42 KB
master StartStopWithChild netcoreapp3.1 9.99μs 54.9ns 330ns 0.0253 0.0101 0 5.62 KB
master StartStopWithChild net472 16μs 47.7ns 178ns 1.02 0.306 0.0887 6.07 KB
#6109 StartStopWithChild net6.0 7.79μs 43.3ns 327ns 0.0162 0.00406 0 5.42 KB
#6109 StartStopWithChild netcoreapp3.1 10.2μs 57ns 382ns 0.0197 0.00986 0 5.62 KB
#6109 StartStopWithChild net472 16.2μs 51.5ns 193ns 1.02 0.291 0.0889 6.06 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 483μs 173ns 599ns 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 639μs 348ns 1.35μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces net472 837μs 708ns 2.74μs 0.417 0 0 3.3 KB
#6109 WriteAndFlushEnrichedTraces net6.0 491μs 373ns 1.45μs 0 0 0 2.7 KB
#6109 WriteAndFlushEnrichedTraces netcoreapp3.1 640μs 386ns 1.5μs 0 0 0 2.7 KB
#6109 WriteAndFlushEnrichedTraces net472 838μs 1.2μs 4.66μs 0.417 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 206μs 1.21μs 11.6μs 0.201 0 0 18.45 KB
master SendRequest netcoreapp3.1 233μs 1.34μs 10.3μs 0.216 0 0 20.61 KB
master SendRequest net472 0.00114ns 0.000282ns 0.00106ns 0 0 0 0 b
#6109 SendRequest net6.0 193μs 1.1μs 7.35μs 0.199 0 0 18.45 KB
#6109 SendRequest netcoreapp3.1 218μs 1.25μs 9.09μs 0.21 0 0 20.61 KB
#6109 SendRequest net472 0.00179ns 0.000886ns 0.00343ns 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 569μs 1.33μs 4.78μs 0.548 0 0 41.52 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 669μs 3.2μs 12.4μs 0.331 0 0 41.81 KB
master WriteAndFlushEnrichedTraces net472 870μs 4μs 15μs 8.13 2.57 0.428 53.34 KB
#6109 WriteAndFlushEnrichedTraces net6.0 566μs 2.36μs 10.8μs 0.561 0 0 41.47 KB
#6109 WriteAndFlushEnrichedTraces netcoreapp3.1 680μs 2.86μs 11.1μs 0.334 0 0 41.88 KB
#6109 WriteAndFlushEnrichedTraces net472 879μs 4.16μs 16.6μs 8.36 2.64 0.44 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.41μs 1.1ns 3.82ns 0.014 0 0 1.02 KB
master ExecuteNonQuery netcoreapp3.1 1.75μs 1.82ns 7.04ns 0.0133 0 0 1.02 KB
master ExecuteNonQuery net472 2.05μs 2.4ns 9.31ns 0.156 0 0 987 B
#6109 ExecuteNonQuery net6.0 1.36μs 1.08ns 4.17ns 0.0144 0 0 1.02 KB
#6109 ExecuteNonQuery netcoreapp3.1 1.87μs 2.05ns 7.94ns 0.013 0 0 1.02 KB
#6109 ExecuteNonQuery net472 2.01μs 2.12ns 7.92ns 0.157 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.14μs 0.53ns 1.98ns 0.0137 0 0 976 B
master CallElasticsearch netcoreapp3.1 1.53μs 0.438ns 1.64ns 0.0131 0 0 976 B
master CallElasticsearch net472 2.65μs 1.36ns 5.26ns 0.158 0.00128 0 995 B
master CallElasticsearchAsync net6.0 1.28μs 0.794ns 2.97ns 0.0129 0 0 952 B
master CallElasticsearchAsync netcoreapp3.1 1.57μs 0.48ns 1.79ns 0.0134 0 0 1.02 KB
master CallElasticsearchAsync net472 2.59μs 1.48ns 5.72ns 0.166 0 0 1.05 KB
#6109 CallElasticsearch net6.0 1.09μs 0.456ns 1.71ns 0.0136 0 0 976 B
#6109 CallElasticsearch netcoreapp3.1 1.51μs 0.838ns 3.24ns 0.0129 0 0 976 B
#6109 CallElasticsearch net472 2.46μs 1.9ns 7.38ns 0.157 0 0 995 B
#6109 CallElasticsearchAsync net6.0 1.25μs 0.578ns 2.16ns 0.0132 0 0 952 B
#6109 CallElasticsearchAsync netcoreapp3.1 1.61μs 1.3ns 5.04ns 0.0144 0 0 1.02 KB
#6109 CallElasticsearchAsync net472 2.49μs 1.54ns 5.97ns 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.27μs 0.512ns 1.98ns 0.0133 0 0 952 B
master ExecuteAsync netcoreapp3.1 1.63μs 0.757ns 2.93ns 0.0128 0 0 952 B
master ExecuteAsync net472 1.81μs 0.807ns 3.13ns 0.145 0 0 915 B
#6109 ExecuteAsync net6.0 1.26μs 0.643ns 2.49ns 0.0132 0 0 952 B
#6109 ExecuteAsync netcoreapp3.1 1.56μs 1.02ns 3.96ns 0.0125 0 0 952 B
#6109 ExecuteAsync net472 1.84μs 0.56ns 2.17ns 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.16μs 2.32ns 8.66ns 0.0311 0 0 2.22 KB
master SendAsync netcoreapp3.1 5.1μs 2.95ns 11.4ns 0.0356 0 0 2.76 KB
master SendAsync net472 7.87μs 3.75ns 14.5ns 0.498 0 0 3.15 KB
#6109 SendAsync net6.0 4.05μs 1.27ns 4.91ns 0.0305 0 0 2.22 KB
#6109 SendAsync netcoreapp3.1 5.11μs 1.99ns 7.43ns 0.036 0 0 2.76 KB
#6109 SendAsync net472 7.73μs 3.76ns 14.6ns 0.496 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.46μs 1.05ns 3.93ns 0.0227 0 0 1.64 KB
master EnrichedLog netcoreapp3.1 2.17μs 0.877ns 3.28ns 0.0216 0 0 1.64 KB
master EnrichedLog net472 2.55μs 1.44ns 5.38ns 0.249 0 0 1.57 KB
#6109 EnrichedLog net6.0 1.42μs 0.87ns 3.37ns 0.0227 0 0 1.64 KB
#6109 EnrichedLog netcoreapp3.1 2.26μs 1.64ns 6.37ns 0.0226 0 0 1.64 KB
#6109 EnrichedLog net472 2.62μs 0.447ns 1.67ns 0.25 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 116μs 262ns 1.01μs 0 0 0 4.28 KB
master EnrichedLog netcoreapp3.1 119μs 218ns 816ns 0.0605 0 0 4.28 KB
master EnrichedLog net472 147μs 189ns 708ns 0.662 0.221 0 4.46 KB
#6109 EnrichedLog net6.0 114μs 299ns 1.16μs 0.0566 0 0 4.28 KB
#6109 EnrichedLog netcoreapp3.1 118μs 128ns 497ns 0.0585 0 0 4.28 KB
#6109 EnrichedLog net472 147μs 102ns 393ns 0.66 0.22 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.15μs 1.18ns 4.56ns 0.0316 0 0 2.2 KB
master EnrichedLog netcoreapp3.1 4.12μs 2.55ns 9.87ns 0.0288 0 0 2.2 KB
master EnrichedLog net472 4.84μs 1.55ns 6.01ns 0.321 0 0 2.02 KB
#6109 EnrichedLog net6.0 3.11μs 0.837ns 3.24ns 0.0311 0 0 2.2 KB
#6109 EnrichedLog netcoreapp3.1 4.19μs 5.32ns 20.6ns 0.0295 0 0 2.2 KB
#6109 EnrichedLog net472 4.87μs 2.08ns 8.07ns 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.38μs 0.94ns 3.64ns 0.016 0 0 1.14 KB
master SendReceive netcoreapp3.1 1.85μs 0.827ns 3.2ns 0.0157 0 0 1.14 KB
master SendReceive net472 2.06μs 2.65ns 10.2ns 0.183 0 0 1.16 KB
#6109 SendReceive net6.0 1.37μs 0.739ns 2.77ns 0.0165 0 0 1.14 KB
#6109 SendReceive netcoreapp3.1 1.66μs 0.518ns 2.01ns 0.015 0 0 1.14 KB
#6109 SendReceive net472 2.06μs 0.869ns 3.37ns 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.87μs 1.82ns 6.57ns 0.0217 0 0 1.6 KB
master EnrichedLog netcoreapp3.1 4.03μs 1.42ns 5.13ns 0.0222 0 0 1.65 KB
master EnrichedLog net472 4.27μs 1.95ns 7.31ns 0.322 0 0 2.04 KB
#6109 EnrichedLog net6.0 2.65μs 0.552ns 2.14ns 0.0225 0 0 1.6 KB
#6109 EnrichedLog netcoreapp3.1 3.83μs 3.16ns 12.2ns 0.0228 0 0 1.65 KB
#6109 EnrichedLog net472 4.36μs 1.95ns 7.56ns 0.323 0 0 2.04 KB
Benchmarks.Trace.SpanBenchmark - Faster 🎉 Same allocations ✔️

Faster 🎉 in #6109

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net472 1.114 695.21 624.08

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartFinishSpan net6.0 395ns 0.107ns 0.416ns 0.00814 0 0 576 B
master StartFinishSpan netcoreapp3.1 547ns 0.272ns 1.05ns 0.00798 0 0 576 B
master StartFinishSpan net472 695ns 0.399ns 1.54ns 0.0917 0 0 578 B
master StartFinishScope net6.0 478ns 0.115ns 0.431ns 0.00968 0 0 696 B
master StartFinishScope netcoreapp3.1 697ns 0.957ns 3.71ns 0.00944 0 0 696 B
master StartFinishScope net472 895ns 0.371ns 1.44ns 0.104 0 0 658 B
#6109 StartFinishSpan net6.0 406ns 0.649ns 2.43ns 0.00814 0 0 576 B
#6109 StartFinishSpan netcoreapp3.1 560ns 0.289ns 1.04ns 0.00795 0 0 576 B
#6109 StartFinishSpan net472 624ns 0.261ns 0.943ns 0.0915 0 0 578 B
#6109 StartFinishScope net6.0 482ns 0.503ns 1.88ns 0.00972 0 0 696 B
#6109 StartFinishScope netcoreapp3.1 728ns 0.838ns 3.24ns 0.00949 0 0 696 B
#6109 StartFinishScope net472 862ns 0.406ns 1.57ns 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 655ns 0.273ns 1.02ns 0.00982 0 0 696 B
master RunOnMethodBegin netcoreapp3.1 971ns 0.422ns 1.58ns 0.00921 0 0 696 B
master RunOnMethodBegin net472 1.04μs 0.494ns 1.85ns 0.104 0 0 658 B
#6109 RunOnMethodBegin net6.0 673ns 0.353ns 1.37ns 0.0098 0 0 696 B
#6109 RunOnMethodBegin netcoreapp3.1 987ns 0.583ns 2.26ns 0.00934 0 0 696 B
#6109 RunOnMethodBegin net472 1.11μs 0.347ns 1.25ns 0.104 0 0 658 B

@kevingosse
kevingosse merged commit 0c64d3f into master Oct 3, 2024
@kevingosse
kevingosse deleted the kevin/missing_method branch October 3, 2024 10:23
@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

Remove `System.MissingMethodException` and
`System.Security.VerificationException` from the suspicious exception
types.

## Reason for change

They're too broad and are going to cause false-negatives. A crash report
will still be generated if one of those exceptions cause a crash *and*
we're in the callstack.
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.

2 participants