-
Notifications
You must be signed in to change notification settings - Fork 145
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
[Fleet installer] Add additional pre-verification check for IIS variables #6697
Conversation
@@ -17,4 +17,5 @@ internal enum ReturnCode | |||
ErrorRemovingAppPoolVariables, | |||
ErrorRemovingNativeLoaderFiles, | |||
ErrorRemovingCrashTrackerKey, | |||
ErrorReadingIisConfiguration, |
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.
Not directly related to this change, but can we set the value for ErrorRemovingNativeLoaderFiles
explicitly so that it doesn't accidentally get changed?
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.
Yup, coming up in a separate PR 🙂
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 (6697) - mean (69ms) : 66, 72
. : milestone, 69,
master - mean (69ms) : 66, 72
. : milestone, 69,
section CallTarget+Inlining+NGEN
This PR (6697) - mean (999ms) : 975, 1023
. : milestone, 999,
master - mean (1,002ms) : 981, 1024
. : milestone, 1002,
gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6697) - mean (102ms) : 100, 104
. : milestone, 102,
master - mean (102ms) : 100, 104
. : milestone, 102,
section CallTarget+Inlining+NGEN
This PR (6697) - mean (672ms) : 658, 687
. : milestone, 672,
master - mean (676ms) : 656, 696
. : milestone, 676,
gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6697) - mean (89ms) : 87, 91
. : milestone, 89,
master - mean (89ms) : 87, 92
. : milestone, 89,
section CallTarget+Inlining+NGEN
This PR (6697) - mean (631ms) : 612, 650
. : milestone, 631,
master - mean (635ms) : 618, 652
. : milestone, 635,
gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6697) - mean (192ms) : 188, 196
. : milestone, 192,
master - mean (191ms) : 188, 195
. : milestone, 191,
section CallTarget+Inlining+NGEN
This PR (6697) - mean (1,113ms) : 1090, 1136
. : milestone, 1113,
master - mean (1,107ms) : 1077, 1136
. : milestone, 1107,
gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6697) - mean (272ms) : 267, 278
. : milestone, 272,
master - mean (271ms) : 267, 276
. : milestone, 271,
section CallTarget+Inlining+NGEN
This PR (6697) - mean (864ms) : 836, 891
. : milestone, 864,
master - mean (866ms) : 835, 898
. : milestone, 866,
gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6697) - mean (264ms) : 259, 268
. : milestone, 264,
master - mean (263ms) : 258, 268
. : milestone, 263,
section CallTarget+Inlining+NGEN
This PR (6697) - mean (844ms) : 817, 871
. : milestone, 844,
master - mean (843ms) : 811, 876
. : milestone, 843,
|
044e0ca
to
bf59f82
Compare
1ac9726
to
65f3be9
Compare
Benchmarks Report for tracer 🐌Benchmarks for #6697 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 ✔️ More allocations
|
Benchmark | Base Allocated | Diff Allocated | Change | Change % |
---|---|---|---|---|
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net6.0 | 41.5 KB | 41.81 KB | 305 B | 0.73% |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | WriteAndFlushEnrichedTraces |
net6.0 | 559μs | 2.35μs | 8.79μs | 0.571 | 0 | 0 | 41.5 KB |
master | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 727μs | 4.25μs | 38.5μs | 0.342 | 0 | 0 | 41.7 KB |
master | WriteAndFlushEnrichedTraces |
net472 | 872μs | 4.06μs | 17.2μs | 8.19 | 2.59 | 0.431 | 53.27 KB |
#6697 | WriteAndFlushEnrichedTraces |
net6.0 | 568μs | 2.26μs | 9.58μs | 0.576 | 0 | 0 | 41.81 KB |
#6697 | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 677μs | 3.83μs | 26.8μs | 0.321 | 0 | 0 | 41.88 KB |
#6697 | WriteAndFlushEnrichedTraces |
net472 | 867μs | 3.73μs | 14.4μs | 8.87 | 2.66 | 0.443 | 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.3μs | 0.825ns | 3.2ns | 0.0143 | 0 | 0 | 1.02 KB |
master | ExecuteNonQuery |
netcoreapp3.1 | 1.72μs | 2.47ns | 9.58ns | 0.0139 | 0 | 0 | 1.02 KB |
master | ExecuteNonQuery |
net472 | 2.05μs | 2.53ns | 9.8ns | 0.156 | 0.00102 | 0 | 987 B |
#6697 | ExecuteNonQuery |
net6.0 | 1.32μs | 1.12ns | 4.35ns | 0.0145 | 0 | 0 | 1.02 KB |
#6697 | ExecuteNonQuery |
netcoreapp3.1 | 1.78μs | 2.2ns | 8.54ns | 0.0132 | 0 | 0 | 1.02 KB |
#6697 | ExecuteNonQuery |
net472 | 2.12μs | 1.72ns | 6.67ns | 0.157 | 0.00106 | 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.25μs | 0.615ns | 2.3ns | 0.0137 | 0 | 0 | 976 B |
master | CallElasticsearch |
netcoreapp3.1 | 1.53μs | 0.438ns | 1.58ns | 0.0135 | 0 | 0 | 976 B |
master | CallElasticsearch |
net472 | 2.5μs | 2.35ns | 9.11ns | 0.158 | 0 | 0 | 995 B |
master | CallElasticsearchAsync |
net6.0 | 1.3μs | 0.331ns | 1.28ns | 0.0136 | 0 | 0 | 952 B |
master | CallElasticsearchAsync |
netcoreapp3.1 | 1.69μs | 1.07ns | 4.02ns | 0.0135 | 0 | 0 | 1.02 KB |
master | CallElasticsearchAsync |
net472 | 2.48μs | 1.68ns | 6.5ns | 0.166 | 0 | 0 | 1.05 KB |
#6697 | CallElasticsearch |
net6.0 | 1.23μs | 0.86ns | 3.22ns | 0.0135 | 0 | 0 | 976 B |
#6697 | CallElasticsearch |
netcoreapp3.1 | 1.63μs | 0.661ns | 2.56ns | 0.013 | 0 | 0 | 976 B |
#6697 | CallElasticsearch |
net472 | 2.42μs | 1.86ns | 6.95ns | 0.157 | 0 | 0 | 995 B |
#6697 | CallElasticsearchAsync |
net6.0 | 1.3μs | 1.15ns | 4.29ns | 0.013 | 0 | 0 | 952 B |
#6697 | CallElasticsearchAsync |
netcoreapp3.1 | 1.8μs | 1.04ns | 3.75ns | 0.0135 | 0 | 0 | 1.02 KB |
#6697 | CallElasticsearchAsync |
net472 | 2.62μs | 1.74ns | 6.74ns | 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.25μs | 0.418ns | 1.51ns | 0.0124 | 0 | 0 | 952 B |
master | ExecuteAsync |
netcoreapp3.1 | 1.68μs | 0.758ns | 2.84ns | 0.0131 | 0 | 0 | 952 B |
master | ExecuteAsync |
net472 | 1.92μs | 0.92ns | 3.56ns | 0.145 | 0 | 0 | 915 B |
#6697 | ExecuteAsync |
net6.0 | 1.31μs | 0.748ns | 2.9ns | 0.0132 | 0 | 0 | 952 B |
#6697 | ExecuteAsync |
netcoreapp3.1 | 1.66μs | 0.724ns | 2.8ns | 0.0127 | 0 | 0 | 952 B |
#6697 | ExecuteAsync |
net472 | 1.85μs | 0.579ns | 2.24ns | 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.58μs | 2.9ns | 11.2ns | 0.0321 | 0 | 0 | 2.31 KB |
master | SendAsync |
netcoreapp3.1 | 5.22μs | 1.99ns | 7.7ns | 0.0366 | 0 | 0 | 2.85 KB |
master | SendAsync |
net472 | 7.39μs | 2.29ns | 8.86ns | 0.494 | 0 | 0 | 3.12 KB |
#6697 | SendAsync |
net6.0 | 4.48μs | 1.97ns | 7.65ns | 0.0331 | 0 | 0 | 2.31 KB |
#6697 | SendAsync |
netcoreapp3.1 | 5.21μs | 1.81ns | 6.76ns | 0.0364 | 0 | 0 | 2.85 KB |
#6697 | SendAsync |
net472 | 7.4μs | 2.26ns | 8.75ns | 0.495 | 0 | 0 | 3.12 KB |
Benchmarks.Trace.ILoggerBenchmark - Faster 🎉 Same allocations ✔️
Faster 🎉 in #6697
Benchmark
base/diff
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.ILoggerBenchmark.EnrichedLog‑net6.0
1.123
1,656.86
1,475.43
Benchmark | base/diff | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.ILoggerBenchmark.EnrichedLog‑net6.0 | 1.123 | 1,656.86 | 1,475.43 |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | EnrichedLog |
net6.0 | 1.66μs | 1.25ns | 4.67ns | 0.0229 | 0 | 0 | 1.64 KB |
master | EnrichedLog |
netcoreapp3.1 | 2.18μs | 0.612ns | 2.37ns | 0.0218 | 0 | 0 | 1.64 KB |
master | EnrichedLog |
net472 | 2.5μs | 1.22ns | 4.57ns | 0.249 | 0 | 0 | 1.57 KB |
#6697 | EnrichedLog |
net6.0 | 1.48μs | 0.617ns | 2.31ns | 0.0229 | 0 | 0 | 1.64 KB |
#6697 | EnrichedLog |
netcoreapp3.1 | 2.19μs | 0.924ns | 3.46ns | 0.0224 | 0 | 0 | 1.64 KB |
#6697 | EnrichedLog |
net472 | 2.44μs | 2.56ns | 9.9ns | 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 | 113μs | 98.3ns | 368ns | 0.0566 | 0 | 0 | 4.28 KB |
master | EnrichedLog |
netcoreapp3.1 | 116μs | 152ns | 589ns | 0.0579 | 0 | 0 | 4.28 KB |
master | EnrichedLog |
net472 | 151μs | 192ns | 742ns | 0.676 | 0.225 | 0 | 4.46 KB |
#6697 | EnrichedLog |
net6.0 | 114μs | 212ns | 823ns | 0.0571 | 0 | 0 | 4.28 KB |
#6697 | EnrichedLog |
netcoreapp3.1 | 116μs | 201ns | 780ns | 0 | 0 | 0 | 4.28 KB |
#6697 | EnrichedLog |
net472 | 150μs | 250ns | 967ns | 0.679 | 0.226 | 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 | 2.98μs | 1.13ns | 4.37ns | 0.0299 | 0 | 0 | 2.2 KB |
master | EnrichedLog |
netcoreapp3.1 | 4.06μs | 0.794ns | 3.08ns | 0.0285 | 0 | 0 | 2.2 KB |
master | EnrichedLog |
net472 | 4.79μs | 1.34ns | 5.18ns | 0.32 | 0 | 0 | 2.02 KB |
#6697 | EnrichedLog |
net6.0 | 3.14μs | 0.791ns | 3.06ns | 0.0311 | 0 | 0 | 2.2 KB |
#6697 | EnrichedLog |
netcoreapp3.1 | 4.23μs | 1.34ns | 5.17ns | 0.0296 | 0 | 0 | 2.2 KB |
#6697 | EnrichedLog |
net472 | 4.77μs | 1.62ns | 5.85ns | 0.318 | 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.52μs | 0.758ns | 2.94ns | 0.016 | 0 | 0 | 1.14 KB |
master | SendReceive |
netcoreapp3.1 | 1.74μs | 0.539ns | 1.87ns | 0.0157 | 0 | 0 | 1.14 KB |
master | SendReceive |
net472 | 2.05μs | 0.814ns | 3.15ns | 0.183 | 0 | 0 | 1.16 KB |
#6697 | SendReceive |
net6.0 | 1.37μs | 0.622ns | 2.41ns | 0.0158 | 0 | 0 | 1.14 KB |
#6697 | SendReceive |
netcoreapp3.1 | 1.84μs | 1.6ns | 6.18ns | 0.0148 | 0 | 0 | 1.14 KB |
#6697 | SendReceive |
net472 | 2.13μs | 1.19ns | 4.61ns | 0.184 | 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.82μs | 1.6ns | 6.18ns | 0.0226 | 0 | 0 | 1.6 KB |
master | EnrichedLog |
netcoreapp3.1 | 3.85μs | 1.41ns | 5.47ns | 0.0212 | 0 | 0 | 1.65 KB |
master | EnrichedLog |
net472 | 4.27μs | 4.02ns | 15.6ns | 0.323 | 0 | 0 | 2.04 KB |
#6697 | EnrichedLog |
net6.0 | 2.73μs | 7.03ns | 26.3ns | 0.0218 | 0 | 0 | 1.6 KB |
#6697 | EnrichedLog |
netcoreapp3.1 | 3.79μs | 1.02ns | 3.66ns | 0.0226 | 0 | 0 | 1.65 KB |
#6697 | EnrichedLog |
net472 | 4.22μs | 3.86ns | 14.9ns | 0.323 | 0 | 0 | 2.04 KB |
Benchmarks.Trace.SpanBenchmark - Slower ⚠️ Same allocations ✔️
Slower ⚠️ in #6697
Benchmark
diff/base
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.SpanBenchmark.StartFinishScope‑net472
1.135
792.40
899.46
Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.SpanBenchmark.StartFinishScope‑net472 | 1.135 | 792.40 | 899.46 |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | StartFinishSpan |
net6.0 | 389ns | 0.594ns | 2.3ns | 0.00805 | 0 | 0 | 576 B |
master | StartFinishSpan |
netcoreapp3.1 | 584ns | 1.31ns | 5.07ns | 0.00778 | 0 | 0 | 576 B |
master | StartFinishSpan |
net472 | 615ns | 1.6ns | 6.21ns | 0.0918 | 0 | 0 | 578 B |
master | StartFinishScope |
net6.0 | 486ns | 0.582ns | 2.18ns | 0.00967 | 0 | 0 | 696 B |
master | StartFinishScope |
netcoreapp3.1 | 791ns | 1.76ns | 6.83ns | 0.00941 | 0 | 0 | 696 B |
master | StartFinishScope |
net472 | 793ns | 2.47ns | 9.55ns | 0.104 | 0 | 0 | 658 B |
#6697 | StartFinishSpan |
net6.0 | 413ns | 0.874ns | 3.39ns | 0.00798 | 0 | 0 | 576 B |
#6697 | StartFinishSpan |
netcoreapp3.1 | 548ns | 1.45ns | 5.62ns | 0.00765 | 0 | 0 | 576 B |
#6697 | StartFinishSpan |
net472 | 636ns | 1.09ns | 4.09ns | 0.0915 | 0 | 0 | 578 B |
#6697 | StartFinishScope |
net6.0 | 543ns | 1.73ns | 6.72ns | 0.00964 | 0 | 0 | 696 B |
#6697 | StartFinishScope |
netcoreapp3.1 | 734ns | 1.89ns | 7.32ns | 0.00916 | 0 | 0 | 696 B |
#6697 | StartFinishScope |
net472 | 898ns | 2.09ns | 8.1ns | 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 | 621ns | 0.952ns | 3.69ns | 0.00983 | 0 | 0 | 696 B |
master | RunOnMethodBegin |
netcoreapp3.1 | 835ns | 1.49ns | 5.77ns | 0.00922 | 0 | 0 | 696 B |
master | RunOnMethodBegin |
net472 | 996ns | 2.28ns | 8.82ns | 0.104 | 0 | 0 | 658 B |
#6697 | RunOnMethodBegin |
net6.0 | 654ns | 1.21ns | 4.69ns | 0.00986 | 0 | 0 | 696 B |
#6697 | RunOnMethodBegin |
netcoreapp3.1 | 850ns | 0.751ns | 2.91ns | 0.00925 | 0 | 0 | 696 B |
#6697 | RunOnMethodBegin |
net472 | 1.03μs | 2.34ns | 9.07ns | 0.104 | 0 | 0 | 658 B |
} | ||
else | ||
{ | ||
log.WriteInfo($"Found instrumentation install type, but did not have expected value {expectedValue}. Will rollback IIS instrumentation if install fails"); |
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.
Should we log the actual value or is that not important?
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.
Or is it because we don't want to log the value as it may be sensitive?
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.
Good call, I don't think we should expect it to be sensitive, I think this is just an oversight 👍
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.
Updated in 0d0e103
Tries to look for the presence of the DD_INSTRUMENTATION_INSTALL_TYPE variable with windows_fleet_installer - if we find it, then we try to rollback the variables
65f3be9
to
0d0e103
Compare
Summary of changes
Reason for change
Where possible, we want to revert actions safely. On the first install, if modifying IIS fails, we could theoretically end up with a strange state in their IIS config. This attempts to revert the changes if we think it's safe to do so.
Implementation details
Tries to look for the presence of the
DD_INSTRUMENTATION_INSTALL_TYPE
variable with valuewindows_fleet_installer
- if we find it, then we consider this to be an "update" rather than an "initial install". We don't want to rollback the IIS changes in case of an update, so we leave the variables.Test coverage
Yeah... I still need to add integration tests
Other details
With this design, there's still a risk that we remove variables when we shouldn't. e.g. if the customer has manually added instrumentation to the app pools using the same method, we would delete these variables.
Similarly, if they have explicitly opted out of instrumentation, by setting
COR_ENABLE_PROFILING=0
for example, then this would be removed. But currently we already stomp on these (which is something else for us to think about behaviour-wise)Requires
DD_INSTRUMENTATION_INSTALL_TYPE
variables for known install methods #6695