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

[CI Visibility] Catch some gitinfo exceptions. #6297

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

tonyredondo
Copy link
Member

@tonyredondo tonyredondo commented Nov 18, 2024

Summary of changes

This PR ensures we capture all possible exception while doing GetParentGitFolder

Reason for change

I've seen some exceptions in the Error tracking page.

Implementation details

try/catch everywhere....

@datadog-ddstaging
Copy link

datadog-ddstaging bot commented Nov 18, 2024

Datadog Report

Branch report: tony/civisibility-catch-some-gitinfo-exceptions
Commit report: 3e36e07
Test service: dd-trace-dotnet

❌ 1 Failed (0 Known Flaky), 453840 Passed, 2754 Skipped, 19h 22m 25.86s Total Time

❌ Failed Tests (1)

  • ReadyToRunManualAndAutomatic - Datadog.Trace.ClrProfiler.IntegrationTests.ManualInstrumentationTests - Details

    Expand for error
     Results do not match.
     Differences:
     Received: ManualInstrumentationTests.ManualAndAutomatic.received.txt
     Verified: ManualInstrumentationTests.ManualAndAutomatic.verified.txt
     Received Content:
     [
       {
         TraceId: Id_1,
         SpanId: Id_2,
         Name: initial,
     ...
    

@andrewlock
Copy link
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 (6297) - mean (72ms)  : 63, 81
     .   : milestone, 72,
    master - mean (71ms)  : 64, 78
     .   : milestone, 71,

    section CallTarget+Inlining+NGEN
    This PR (6297) - mean (1,109ms)  : 1090, 1128
     .   : milestone, 1109,
    master - mean (1,110ms)  : 1093, 1127
     .   : milestone, 1110,

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

    section CallTarget+Inlining+NGEN
    This PR (6297) - mean (765ms)  : 750, 779
     .   : milestone, 765,
    master - mean (765ms)  : 749, 781
     .   : milestone, 765,

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

    section CallTarget+Inlining+NGEN
    This PR (6297) - mean (724ms)  : 708, 739
     .   : milestone, 724,
    master - mean (726ms)  : 709, 742
     .   : milestone, 726,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6297) - mean (191ms)  : 185, 196
     .   : milestone, 191,
    master - mean (192ms)  : 186, 197
     .   : milestone, 192,

    section CallTarget+Inlining+NGEN
    This PR (6297) - mean (1,208ms)  : 1186, 1230
     .   : milestone, 1208,
    master - mean (1,213ms)  : 1188, 1238
     .   : milestone, 1213,

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

    section CallTarget+Inlining+NGEN
    This PR (6297) - mean (942ms)  : 925, 959
     .   : milestone, 942,
    master - mean (945ms)  : 923, 968
     .   : milestone, 945,

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

    section CallTarget+Inlining+NGEN
    This PR (6297) - mean (927ms)  : 908, 945
     .   : milestone, 927,
    master - mean (930ms)  : 910, 950
     .   : milestone, 930,

Loading

@andrewlock
Copy link
Member

Benchmarks Report for tracer 🐌

Benchmarks for #6297 compared to master:

  • 1 benchmarks are slower, with geometric mean 1.123
  • 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.96μs 45.4ns 324ns 0.0201 0.00804 0 5.61 KB
master StartStopWithChild netcoreapp3.1 10.3μs 56.8ns 336ns 0.02 0.01 0 5.8 KB
master StartStopWithChild net472 16.3μs 69.1ns 267ns 1.04 0.295 0.0956 6.2 KB
#6297 StartStopWithChild net6.0 7.97μs 42.6ns 221ns 0.0156 0.00781 0 5.61 KB
#6297 StartStopWithChild netcoreapp3.1 10.2μs 57.5ns 419ns 0.0252 0.0101 0 5.81 KB
#6297 StartStopWithChild net472 16.3μs 54.7ns 212ns 1.04 0.301 0.0894 6.21 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 496μs 266ns 996ns 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 657μs 412ns 1.54μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces net472 863μs 417ns 1.56μs 0.431 0 0 3.3 KB
#6297 WriteAndFlushEnrichedTraces net6.0 482μs 205ns 794ns 0 0 0 2.7 KB
#6297 WriteAndFlushEnrichedTraces netcoreapp3.1 669μs 253ns 948ns 0 0 0 2.7 KB
#6297 WriteAndFlushEnrichedTraces net472 864μs 521ns 2.02μs 0.428 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 198μs 1.11μs 7.1μs 0.198 0 0 18.73 KB
master SendRequest netcoreapp3.1 234μs 1.37μs 12.7μs 0.268 0 0 20.89 KB
master SendRequest net472 0.00402ns 0.00137ns 0.00531ns 0 0 0 0 b
#6297 SendRequest net6.0 194μs 1.09μs 7.17μs 0.192 0 0 18.73 KB
#6297 SendRequest netcoreapp3.1 222μs 1.27μs 10.3μs 0.223 0 0 20.89 KB
#6297 SendRequest net472 0.00279ns 0.000752ns 0.00281ns 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 577μs 3.28μs 25μs 0.581 0 0 41.59 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 727μs 4.19μs 32.2μs 0.355 0 0 41.83 KB
master WriteAndFlushEnrichedTraces net472 845μs 4.01μs 16μs 8.08 2.55 0.425 53.27 KB
#6297 WriteAndFlushEnrichedTraces net6.0 571μs 2.06μs 7.43μs 0.556 0 0 41.61 KB
#6297 WriteAndFlushEnrichedTraces netcoreapp3.1 686μs 3.58μs 18.3μs 0.326 0 0 41.76 KB
#6297 WriteAndFlushEnrichedTraces net472 871μs 3.77μs 14.6μs 8.19 2.59 0.431 53.3 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.33μs 1.25ns 4.66ns 0.014 0 0 1.02 KB
master ExecuteNonQuery netcoreapp3.1 1.83μs 2.4ns 9.29ns 0.0138 0 0 1.02 KB
master ExecuteNonQuery net472 2.01μs 1.1ns 4.28ns 0.157 0.00101 0 987 B
#6297 ExecuteNonQuery net6.0 1.31μs 0.926ns 3.58ns 0.0145 0 0 1.02 KB
#6297 ExecuteNonQuery netcoreapp3.1 1.83μs 3.78ns 14.2ns 0.0137 0 0 1.02 KB
#6297 ExecuteNonQuery net472 2.06μs 0.725ns 2.61ns 0.156 0.00103 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.18μs 0.759ns 2.94ns 0.0139 0 0 976 B
master CallElasticsearch netcoreapp3.1 1.53μs 0.526ns 1.9ns 0.0125 0 0 976 B
master CallElasticsearch net472 2.6μs 2.64ns 10.2ns 0.158 0 0 995 B
master CallElasticsearchAsync net6.0 1.33μs 0.64ns 2.48ns 0.0132 0 0 952 B
master CallElasticsearchAsync netcoreapp3.1 1.69μs 0.576ns 1.99ns 0.0136 0 0 1.02 KB
master CallElasticsearchAsync net472 2.75μs 2.07ns 8ns 0.167 0 0 1.05 KB
#6297 CallElasticsearch net6.0 1.19μs 0.413ns 1.54ns 0.0137 0 0 976 B
#6297 CallElasticsearch netcoreapp3.1 1.54μs 0.702ns 2.63ns 0.013 0 0 976 B
#6297 CallElasticsearch net472 2.59μs 1.16ns 4.03ns 0.157 0 0 995 B
#6297 CallElasticsearchAsync net6.0 1.3μs 0.771ns 2.99ns 0.013 0 0 952 B
#6297 CallElasticsearchAsync netcoreapp3.1 1.64μs 2.08ns 8.04ns 0.014 0 0 1.02 KB
#6297 CallElasticsearchAsync net472 2.58μs 1.67ns 6.47ns 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.35μs 0.428ns 1.6ns 0.0135 0 0 952 B
master ExecuteAsync netcoreapp3.1 1.64μs 0.391ns 1.41ns 0.0121 0 0 952 B
master ExecuteAsync net472 1.84μs 0.584ns 2.26ns 0.145 0 0 915 B
#6297 ExecuteAsync net6.0 1.27μs 0.986ns 3.82ns 0.0135 0 0 952 B
#6297 ExecuteAsync netcoreapp3.1 1.69μs 0.551ns 1.99ns 0.0126 0 0 952 B
#6297 ExecuteAsync net472 1.8μs 0.739ns 2.76ns 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.31μs 0.736ns 2.65ns 0.0324 0 0 2.31 KB
master SendAsync netcoreapp3.1 5.23μs 2.31ns 8.63ns 0.0391 0 0 2.85 KB
master SendAsync net472 7.45μs 2.19ns 8.19ns 0.494 0 0 3.12 KB
#6297 SendAsync net6.0 4.45μs 1.38ns 4.99ns 0.0311 0 0 2.31 KB
#6297 SendAsync netcoreapp3.1 5.38μs 2.61ns 9.77ns 0.0377 0 0 2.85 KB
#6297 SendAsync net472 7.42μs 1.95ns 7.57ns 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.46μs 0.551ns 2.06ns 0.0227 0 0 1.64 KB
master EnrichedLog netcoreapp3.1 2.12μs 0.852ns 3.19ns 0.0222 0 0 1.64 KB
master EnrichedLog net472 2.53μs 1.07ns 4.13ns 0.249 0 0 1.57 KB
#6297 EnrichedLog net6.0 1.47μs 1.11ns 4.17ns 0.0231 0 0 1.64 KB
#6297 EnrichedLog netcoreapp3.1 2.32μs 1.31ns 4.89ns 0.0218 0 0 1.64 KB
#6297 EnrichedLog net472 2.52μs 0.859ns 3.33ns 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 120μs 132ns 510ns 0.0605 0 0 4.28 KB
master EnrichedLog netcoreapp3.1 123μs 121ns 418ns 0 0 0 4.28 KB
master EnrichedLog net472 153μs 141ns 527ns 0.689 0.23 0 4.46 KB
#6297 EnrichedLog net6.0 121μs 109ns 422ns 0.061 0 0 4.28 KB
#6297 EnrichedLog netcoreapp3.1 124μs 234ns 908ns 0 0 0 4.28 KB
#6297 EnrichedLog net472 153μs 187ns 725ns 0.684 0.228 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.14μs 1.12ns 4.32ns 0.0305 0 0 2.2 KB
master EnrichedLog netcoreapp3.1 4.04μs 1.47ns 5.52ns 0.0283 0 0 2.2 KB
master EnrichedLog net472 4.77μs 1.68ns 6.5ns 0.32 0 0 2.02 KB
#6297 EnrichedLog net6.0 3μs 0.974ns 3.77ns 0.0301 0 0 2.2 KB
#6297 EnrichedLog netcoreapp3.1 4.3μs 1.9ns 7.36ns 0.0302 0 0 2.2 KB
#6297 EnrichedLog net472 4.83μs 1.01ns 3.76ns 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.32μs 0.415ns 1.55ns 0.0157 0 0 1.14 KB
master SendReceive netcoreapp3.1 1.71μs 0.754ns 2.92ns 0.0154 0 0 1.14 KB
master SendReceive net472 2.04μs 0.854ns 3.19ns 0.183 0 0 1.16 KB
#6297 SendReceive net6.0 1.39μs 0.899ns 3.48ns 0.0161 0 0 1.14 KB
#6297 SendReceive netcoreapp3.1 1.86μs 0.683ns 2.65ns 0.0149 0 0 1.14 KB
#6297 SendReceive net472 2.09μs 0.732ns 2.64ns 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.79μs 1.16ns 4.49ns 0.0224 0 0 1.6 KB
master EnrichedLog netcoreapp3.1 3.88μs 1.51ns 5.65ns 0.0214 0 0 1.65 KB
master EnrichedLog net472 4.32μs 3.32ns 12.9ns 0.323 0 0 2.04 KB
#6297 EnrichedLog net6.0 2.67μs 1.18ns 4.56ns 0.0223 0 0 1.6 KB
#6297 EnrichedLog netcoreapp3.1 3.81μs 1.94ns 7.52ns 0.0209 0 0 1.65 KB
#6297 EnrichedLog net472 4.33μs 1.42ns 5.13ns 0.322 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 393ns 0.429ns 1.66ns 0.0081 0 0 576 B
master StartFinishSpan netcoreapp3.1 596ns 0.605ns 2.26ns 0.00803 0 0 576 B
master StartFinishSpan net472 685ns 1.1ns 4.25ns 0.0918 0 0 578 B
master StartFinishScope net6.0 487ns 0.497ns 1.93ns 0.0098 0 0 696 B
master StartFinishScope netcoreapp3.1 700ns 0.454ns 1.7ns 0.0095 0 0 696 B
master StartFinishScope net472 872ns 0.643ns 2.49ns 0.104 0 0 658 B
#6297 StartFinishSpan net6.0 404ns 0.211ns 0.816ns 0.00815 0 0 576 B
#6297 StartFinishSpan netcoreapp3.1 553ns 0.581ns 2.25ns 0.0077 0 0 576 B
#6297 StartFinishSpan net472 678ns 1.11ns 4.29ns 0.0915 0 0 578 B
#6297 StartFinishScope net6.0 476ns 0.439ns 1.7ns 0.00986 0 0 696 B
#6297 StartFinishScope netcoreapp3.1 768ns 0.488ns 1.89ns 0.00951 0 0 696 B
#6297 StartFinishScope net472 846ns 0.87ns 3.37ns 0.104 0 0 658 B
Benchmarks.Trace.TraceAnnotationsBenchmark - Slower ⚠️ Same allocations ✔️

Slower ⚠️ in #6297

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin‑netcoreapp3.1 1.123 901.33 1,012.03

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master RunOnMethodBegin net6.0 656ns 0.344ns 1.29ns 0.0098 0 0 696 B
master RunOnMethodBegin netcoreapp3.1 901ns 0.432ns 1.67ns 0.0095 0 0 696 B
master RunOnMethodBegin net472 1.12μs 1.24ns 4.81ns 0.104 0 0 658 B
#6297 RunOnMethodBegin net6.0 653ns 0.623ns 2.41ns 0.00949 0 0 696 B
#6297 RunOnMethodBegin netcoreapp3.1 1.01μs 0.463ns 1.67ns 0.00926 0 0 696 B
#6297 RunOnMethodBegin net472 1.14μs 0.724ns 2.8ns 0.104 0 0 658 B

@andrewlock
Copy link
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 (6297) (11.258M)   : 0, 11258279
    master (11.176M)   : 0, 11175683
    benchmarks/2.9.0 (11.033M)   : 0, 11032866

    section Automatic
    This PR (6297) (7.296M)   : 0, 7295553
    master (7.160M)   : 0, 7159539
    benchmarks/2.9.0 (7.786M)   : 0, 7785853

    section Trace stats
    master (7.525M)   : 0, 7524795

    section Manual
    master (11.175M)   : 0, 11174586

    section Manual + Automatic
    This PR (6297) (6.788M)   : 0, 6787652
    master (6.674M)   : 0, 6673710

    section DD_TRACE_ENABLED=0
    master (10.161M)   : 0, 10160529

Loading
gantt
    title Throughput Linux arm64 (Total requests) 
    dateFormat  X
    axisFormat %s
    section Baseline
    This PR (6297) (9.595M)   : 0, 9595224
    master (9.707M)   : 0, 9707387
    benchmarks/2.9.0 (9.495M)   : 0, 9494821

    section Automatic
    This PR (6297) (6.428M)   : 0, 6427972
    master (6.410M)   : 0, 6409836

    section Trace stats
    master (6.699M)   : 0, 6698791

    section Manual
    master (9.608M)   : 0, 9608059

    section Manual + Automatic
    This PR (6297) (5.883M)   : 0, 5883455
    master (5.927M)   : 0, 5926951

    section DD_TRACE_ENABLED=0
    master (8.718M)   : 0, 8718018

Loading
gantt
    title Throughput Windows x64 (Total requests) 
    dateFormat  X
    axisFormat %s
    section Baseline
    This PR (6297) (10.407M)   : 0, 10406611
    master (9.917M)   : 0, 9916570
    benchmarks/2.9.0 (10.020M)   : 0, 10019592

    section Automatic
    This PR (6297) (6.903M)   : 0, 6903181
    master (6.435M)   : 0, 6435340
    benchmarks/2.9.0 (7.255M)   : 0, 7255257

    section Trace stats
    master (7.241M)   : 0, 7241272

    section Manual
    master (9.897M)   : 0, 9897359

    section Manual + Automatic
    This PR (6297) (6.122M)   : 0, 6121637
    master (5.894M)   : 0, 5894026

    section DD_TRACE_ENABLED=0
    master (9.318M)   : 0, 9317576

Loading

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