-
Notifications
You must be signed in to change notification settings - Fork 143
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
[dd-dotnet] Catch error when failing to read env vars on IIS #6430
Conversation
@@ -3,8 +3,11 @@ | |||
// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. | |||
// </copyright> | |||
|
|||
#pragma warning disable SA1108 // BlockStatementsMustNotContainEmbeddedComments |
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.
I "love" that you disabled this instead of just moving the comment inside the catch 😂
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.
My comment is at the right place and I'm willing to die on that hill
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 (6430) - mean (68ms) : 66, 70
. : milestone, 68,
master - mean (69ms) : 65, 72
. : milestone, 69,
section CallTarget+Inlining+NGEN
This PR (6430) - mean (973ms) : 950, 997
. : milestone, 973,
master - mean (979ms) : 952, 1006
. : milestone, 979,
gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6430) - mean (107ms) : 105, 109
. : milestone, 107,
master - mean (108ms) : 105, 110
. : milestone, 108,
section CallTarget+Inlining+NGEN
This PR (6430) - mean (675ms) : 659, 691
. : milestone, 675,
master - mean (678ms) : 664, 692
. : milestone, 678,
gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6430) - mean (90ms) : 88, 92
. : milestone, 90,
master - mean (91ms) : 89, 93
. : milestone, 91,
section CallTarget+Inlining+NGEN
This PR (6430) - mean (629ms) : 613, 645
. : milestone, 629,
master - mean (638ms) : 625, 651
. : milestone, 638,
gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6430) - mean (193ms) : 189, 197
. : milestone, 193,
master - mean (194ms) : 190, 198
. : milestone, 194,
section CallTarget+Inlining+NGEN
This PR (6430) - mean (1,104ms) : 1068, 1139
. : milestone, 1104,
master - mean (1,101ms) : 1073, 1128
. : milestone, 1101,
gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6430) - mean (278ms) : 274, 282
. : milestone, 278,
master - mean (278ms) : 274, 283
. : milestone, 278,
section CallTarget+Inlining+NGEN
This PR (6430) - mean (872ms) : 838, 905
. : milestone, 872,
master - mean (877ms) : 848, 906
. : milestone, 877,
gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6430) - mean (267ms) : 263, 272
. : milestone, 267,
master - mean (268ms) : 262, 273
. : milestone, 268,
section CallTarget+Inlining+NGEN
This PR (6430) - mean (853ms) : 814, 893
. : milestone, 853,
master - mean (854ms) : 815, 893
. : milestone, 854,
|
Datadog ReportBranch report: ✅ 0 Failed, 459238 Passed, 2834 Skipped, 19h 41m 28.57s Total Time New Flaky Tests (1)
|
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 (6430) (11.319M) : 0, 11318706
master (11.185M) : 0, 11185452
benchmarks/2.9.0 (11.033M) : 0, 11032866
section Automatic
This PR (6430) (7.272M) : 0, 7272360
master (7.339M) : 0, 7338940
benchmarks/2.9.0 (7.786M) : 0, 7785853
section Trace stats
master (7.663M) : 0, 7662708
section Manual
master (11.063M) : 0, 11063462
section Manual + Automatic
This PR (6430) (6.711M) : 0, 6711041
master (6.756M) : 0, 6755869
section DD_TRACE_ENABLED=0
master (10.292M) : 0, 10291550
gantt
title Throughput Linux arm64 (Total requests)
dateFormat X
axisFormat %s
section Baseline
This PR (6430) (9.400M) : 0, 9399973
master (9.298M) : 0, 9298207
benchmarks/2.9.0 (9.495M) : 0, 9494821
section Automatic
This PR (6430) (6.255M) : 0, 6255073
master (6.384M) : 0, 6384093
section Trace stats
master (6.648M) : 0, 6647596
section Manual
master (9.348M) : 0, 9347597
section Manual + Automatic
This PR (6430) (5.757M) : 0, 5756677
master (5.912M) : 0, 5911591
section DD_TRACE_ENABLED=0
master (8.868M) : 0, 8867634
gantt
title Throughput Windows x64 (Total requests)
dateFormat X
axisFormat %s
section Baseline
This PR (6430) (9.739M) : 0, 9739274
master (9.792M) : 0, 9791934
benchmarks/2.9.0 (10.020M) : 0, 10019592
section Automatic
This PR (6430) (6.358M) : 0, 6358074
master (6.431M) : 0, 6431072
benchmarks/2.9.0 (7.255M) : 0, 7255257
section Trace stats
master (6.934M) : 0, 6934019
section Manual
master (9.676M) : 0, 9675873
section Manual + Automatic
This PR (6430) (6.024M) : 0, 6024115
master (6.062M) : 0, 6061828
section DD_TRACE_ENABLED=0
master (9.288M) : 0, 9287665
|
Benchmarks Report for tracer 🐌Benchmarks for #6430 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‑netcoreapp3.1 | 1.197 | 560.05 | 670.59 |
Benchmark | base/diff | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.SpanBenchmark.StartFinishScope‑netcoreapp3.1 | 1.135 | 775.76 | 683.68 |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | StartFinishSpan |
net6.0 | 448ns | 0.279ns | 1.08ns | 0.00801 | 0 | 0 | 576 B |
master | StartFinishSpan |
netcoreapp3.1 | 560ns | 0.304ns | 1.1ns | 0.00786 | 0 | 0 | 576 B |
master | StartFinishSpan |
net472 | 700ns | 0.388ns | 1.5ns | 0.0915 | 0 | 0 | 578 B |
master | StartFinishScope |
net6.0 | 488ns | 0.249ns | 0.965ns | 0.00979 | 0 | 0 | 696 B |
master | StartFinishScope |
netcoreapp3.1 | 776ns | 0.426ns | 1.65ns | 0.00933 | 0 | 0 | 696 B |
master | StartFinishScope |
net472 | 940ns | 0.499ns | 1.93ns | 0.104 | 0 | 0 | 658 B |
#6430 | StartFinishSpan |
net6.0 | 426ns | 0.355ns | 1.37ns | 0.0079 | 0 | 0 | 576 B |
#6430 | StartFinishSpan |
netcoreapp3.1 | 671ns | 0.398ns | 1.49ns | 0.00775 | 0 | 0 | 576 B |
#6430 | StartFinishSpan |
net472 | 708ns | 0.363ns | 1.41ns | 0.0918 | 0 | 0 | 578 B |
#6430 | StartFinishScope |
net6.0 | 489ns | 0.3ns | 1.16ns | 0.00984 | 0 | 0 | 696 B |
#6430 | StartFinishScope |
netcoreapp3.1 | 685ns | 1.06ns | 4.1ns | 0.0093 | 0 | 0 | 696 B |
#6430 | StartFinishScope |
net472 | 916ns | 0.44ns | 1.7ns | 0.105 | 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 | 690ns | 1.36ns | 5.29ns | 0.00986 | 0 | 0 | 696 B |
master | RunOnMethodBegin |
netcoreapp3.1 | 957ns | 0.598ns | 2.32ns | 0.0092 | 0 | 0 | 696 B |
master | RunOnMethodBegin |
net472 | 1.14μs | 0.616ns | 2.39ns | 0.104 | 0 | 0 | 658 B |
#6430 | RunOnMethodBegin |
net6.0 | 671ns | 0.436ns | 1.69ns | 0.00973 | 0 | 0 | 696 B |
#6430 | RunOnMethodBegin |
netcoreapp3.1 | 973ns | 0.69ns | 2.67ns | 0.00929 | 0 | 0 | 696 B |
#6430 | RunOnMethodBegin |
net472 | 1.2μs | 0.739ns | 2.86ns | 0.105 | 0 | 0 | 658 B |
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.
Thanks!
Summary of changes
Catch the error and log a warning when the diagnostic tool fails to read custom environment variables on an IIS application pool.
Reason for change
Versions of IIS prior to 10 didn't have an
<environmentVariables>
node.Implementation details
Just catching the exceptions. And disabling rule SA1108 because stylecop doesn't like my comment.
Test coverage
I tried replacing
environmentVariables
with an attribute that doesn't exist and it works.