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

[Installer] Remove the CLR Profiler settings from W3SVC #4056

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zacharycmontoya
Copy link
Contributor

@zacharycmontoya zacharycmontoya commented Apr 18, 2023

Summary of changes

Removes the installer directive that adds the CLR Profiler settings to the W3SVC service

Reason for change

Previously, we were setting the CLR Profiler settings in both the WAS and the W3SVC. We had to set the W3SVC service to cover IIS versions 6 and below, since the WAS was introduced in IIS version 7, but this is no longer needed. Now that the minimum version of .NET Framework that we support is .NET Framework 4.6.1, and the corresponding minimum OS version is Windows Server 2008 R2 SP1, we will only encounter IIS 7+.

Resources:

Implementation details

Removes the lines.

Test coverage

Existing integration tests and smoke tests should pass

Other details

N/A

@datadog-ddstaging
Copy link

datadog-ddstaging bot commented Apr 18, 2023

Datadog Report

Branch report: zach/iis-environment-variables
Commit report: 2dcb6cb

❄️ dd-trace-dotnet: 0 Failed, 2 New Flaky, 242949 Passed, 915 Skipped, 35m 24.54s Wall Time

New Flaky Tests (2)

  • SubmitsTraces - Datadog.Trace.ClrProfiler.IntegrationTests.AgentMalfunctionTests - Last Failure

    Expand for error
     Expected exit code: 0, actual exit code: -1073741819.
    
  • NoExceptions - Datadog.Trace.ClrProfiler.IntegrationTests.SmokeTests.HttpHandlerStackOverflowExceptionSmokeTest - Last Failure

    Expand for error
     The smoke test is running for too long or was lost.
    

@andrewlock

This comment has been minimized.

@andrewlock

This comment has been minimized.

…sary for IIS versions 6 and below, since the WAS was introduced in IIS version 7. Since the minimum version of .NET Framework we support is .NET Framework 4.6.1, and the corresponding minimum OS version is Windows Server 2008 R2 SP1, we will only encounter IIS 7+, so we can always rely on the WAS for our environment variables.

Resources:
- https://techcommunity.microsoft.com/t5/iis-support-blog/iis-services-http-sys-w3svc-was-w3wp-oh-my/ba-p/287856
- https://learn.microsoft.com/en-us/iis/manage/provisioning-and-managing-iis/features-of-the-windows-process-activation-service-was
- https://learn.microsoft.com/en-us/lifecycle/products/internet-information-services-iis
- https://learn.microsoft.com/en-us/dotnet/framework/migration-guide/versions-and-dependencies#net-framework-461
-
@zacharycmontoya zacharycmontoya force-pushed the zach/iis-environment-variables branch from 644b9dd to 2dcb6cb Compare April 19, 2023 23:53
@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).

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET Framework 4.6.2) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (4056) - mean (3,019ms)  : 2886, 3151
     .   : milestone, 3019,
    master - mean (3,015ms)  : 2891, 3139
     .   : milestone, 3015,

    section CallTarget+Inlining+NGEN
    This PR (4056) - mean (3,665ms)  : 3588, 3742
     .   : milestone, 3665,
    master - mean (3,683ms)  : 3609, 3757
     .   : milestone, 3683,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (4056) - mean (3,145ms)  : 3012, 3278
     .   : milestone, 3145,
    master - mean (3,122ms)  : 3008, 3235
     .   : milestone, 3122,

    section CallTarget+Inlining+NGEN
    This PR (4056) - mean (3,551ms)  : 3441, 3660
     .   : milestone, 3551,
    master - mean (3,530ms)  : 3432, 3628
     .   : milestone, 3530,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (4056) - mean (3,113ms)  : 3014, 3212
     .   : milestone, 3113,
    master - mean (3,100ms)  : 2964, 3236
     .   : milestone, 3100,

    section CallTarget+Inlining+NGEN
    This PR (4056) - mean (3,521ms)  : 3440, 3602
     .   : milestone, 3521,
    master - mean (3,511ms)  : 3435, 3587
     .   : milestone, 3511,

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

    section CallTarget+Inlining+NGEN
    This PR (4056) - mean (941ms)  : 906, 975
     .   : milestone, 941,
    master - mean (940ms)  : 918, 963
     .   : milestone, 940,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (4056) - mean (368ms)  : 361, 374
     .   : milestone, 368,
    master - mean (368ms)  : 363, 373
     .   : milestone, 368,

    section CallTarget+Inlining+NGEN
    This PR (4056) - mean (1,090ms)  : 1060, 1119
     .   : milestone, 1090,
    master - mean (1,089ms)  : 1063, 1115
     .   : milestone, 1089,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (4056) - mean (356ms)  : 349, 364
     .   : milestone, 356,
    master - mean (357ms)  : 353, 362
     .   : milestone, 357,

    section CallTarget+Inlining+NGEN
    This PR (4056) - mean (1,036ms)  : 1010, 1062
     .   : milestone, 1036,
    master - mean (1,042ms)  : 1017, 1068
     .   : milestone, 1042,

@andrewlock
Copy link
Member

Benchmarks Report 🐌

Benchmarks for #4056 compared to master:

  • All benchmarks have the same speed
  • 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.AgentWriterBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces netcoreapp3.1 601μs 121ns 436ns 0 0 0 2.63 KB
master WriteAndFlushEnrichedTraces net472 794μs 328ns 1.23μs 0.396 0 0 3.22 KB
#4056 WriteAndFlushEnrichedTraces netcoreapp3.1 589μs 400ns 1.5μs 0 0 0 2.63 KB
#4056 WriteAndFlushEnrichedTraces net472 807μs 278ns 1.04μs 0.406 0 0 3.22 KB
Benchmarks.Trace.AppSecBodyBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master AllCycleSimpleBody netcoreapp3.1 38.9μs 28.4ns 106ns 0.0195 0 0 1.66 KB
master AllCycleSimpleBody net472 39μs 57.3ns 222ns 0.27 0 0 1.71 KB
master AllCycleMoreComplexBody netcoreapp3.1 207μs 205ns 767ns 0.103 0 0 9.15 KB
master AllCycleMoreComplexBody net472 214μs 96.7ns 374ns 1.38 0 0 9.31 KB
master ObjectExtractorSimpleBody netcoreapp3.1 168ns 0.0396ns 0.143ns 0.00373 0 0 272 B
master ObjectExtractorSimpleBody net472 147ns 0.279ns 1.08ns 0.0446 0 0 281 B
master ObjectExtractorMoreComplexBody netcoreapp3.1 4.14μs 1.09ns 3.92ns 0.0517 0 0 3.78 KB
master ObjectExtractorMoreComplexBody net472 4.07μs 4.17ns 16.1ns 0.618 0.0061 0 3.89 KB
#4056 AllCycleSimpleBody netcoreapp3.1 37.5μs 59.7ns 223ns 0.0187 0 0 1.66 KB
#4056 AllCycleSimpleBody net472 38.4μs 26.8ns 104ns 0.268 0 0 1.71 KB
#4056 AllCycleMoreComplexBody netcoreapp3.1 205μs 375ns 1.4μs 0.103 0 0 9.14 KB
#4056 AllCycleMoreComplexBody net472 217μs 307ns 1.19μs 1.4 0 0 9.31 KB
#4056 ObjectExtractorSimpleBody netcoreapp3.1 183ns 0.128ns 0.496ns 0.00376 0 0 272 B
#4056 ObjectExtractorSimpleBody net472 146ns 0.187ns 0.725ns 0.0446 0 0 281 B
#4056 ObjectExtractorMoreComplexBody netcoreapp3.1 4.13μs 3.61ns 13.5ns 0.0493 0 0 3.78 KB
#4056 ObjectExtractorMoreComplexBody net472 4.08μs 3.53ns 13.7ns 0.617 0.00613 0 3.89 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 netcoreapp3.1 181μs 187ns 723ns 0.181 0 0 20.36 KB
master SendRequest net472 0.00124ns 0.000312ns 0.00121ns 0 0 0 0 b
#4056 SendRequest netcoreapp3.1 183μs 271ns 1.05μs 0.182 0 0 20.36 KB
#4056 SendRequest net472 0.000414ns 0.000234ns 0.000875ns 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 netcoreapp3.1 607μs 1.34μs 5.2μs 0.306 0 0 41.88 KB
master WriteAndFlushEnrichedTraces net472 772μs 1.98μs 7.66μs 8.25 2.36 0.393 53.24 KB
#4056 WriteAndFlushEnrichedTraces netcoreapp3.1 598μs 1.78μs 6.91μs 0.309 0 0 41.67 KB
#4056 WriteAndFlushEnrichedTraces net472 774μs 3.17μs 12.3μs 8.44 2.68 0.383 53.22 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 netcoreapp3.1 1.29μs 4.14ns 15.5ns 0.0126 0 0 904 B
master ExecuteNonQuery net472 1.65μs 2.3ns 8.91ns 0.144 0 0 907 B
#4056 ExecuteNonQuery netcoreapp3.1 1.3μs 1.19ns 4.59ns 0.0123 0 0 904 B
#4056 ExecuteNonQuery net472 1.7μs 2.5ns 9.7ns 0.144 0.000852 0 907 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 netcoreapp3.1 1.3μs 0.603ns 2.25ns 0.0142 0 0 1.06 KB
master CallElasticsearch net472 2.14μs 1.52ns 5.91ns 0.176 0.00108 0 1.11 KB
master CallElasticsearchAsync netcoreapp3.1 1.4μs 0.698ns 2.61ns 0.0162 0 0 1.18 KB
master CallElasticsearchAsync net472 2.36μs 4.62ns 17.9ns 0.198 0.00117 0 1.24 KB
#4056 CallElasticsearch netcoreapp3.1 1.3μs 0.527ns 1.97ns 0.0144 0 0 1.06 KB
#4056 CallElasticsearch net472 2.15μs 0.925ns 3.58ns 0.175 0.00107 0 1.11 KB
#4056 CallElasticsearchAsync netcoreapp3.1 1.36μs 0.589ns 2.12ns 0.0157 0 0 1.18 KB
#4056 CallElasticsearchAsync net472 2.47μs 1.46ns 5.65ns 0.197 0.00124 0 1.24 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 netcoreapp3.1 1.39μs 0.298ns 1.07ns 0.0173 0 0 1.28 KB
master ExecuteAsync net472 1.8μs 0.629ns 2.44ns 0.206 0 0 1.3 KB
#4056 ExecuteAsync netcoreapp3.1 1.48μs 0.809ns 3.03ns 0.0176 0 0 1.28 KB
#4056 ExecuteAsync net472 1.75μs 0.527ns 2.04ns 0.206 0.000873 0 1.3 KB
Benchmarks.Trace.HttpClientBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendAsync netcoreapp3.1 4.21μs 2.92ns 11.3ns 0.0356 0 0 2.66 KB
master SendAsync net472 6.76μs 2.01ns 7.52ns 0.478 0 0 3.03 KB
#4056 SendAsync netcoreapp3.1 4.34μs 1.2ns 4.66ns 0.0346 0 0 2.66 KB
#4056 SendAsync net472 6.74μs 1.24ns 4.79ns 0.478 0 0 3.03 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 netcoreapp3.1 2.1μs 5.14ns 19.2ns 0.0243 0 0 1.83 KB
master EnrichedLog net472 2.53μs 2.3ns 8.59ns 0.284 0 0 1.79 KB
#4056 EnrichedLog netcoreapp3.1 1.94μs 0.502ns 1.88ns 0.0254 0 0 1.83 KB
#4056 EnrichedLog net472 2.45μs 1.54ns 5.78ns 0.284 0 0 1.79 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 netcoreapp3.1 119μs 136ns 509ns 0.0594 0 0 4.42 KB
master EnrichedLog net472 148μs 91.7ns 355ns 0.667 0.222 0 4.63 KB
#4056 EnrichedLog netcoreapp3.1 119μs 133ns 517ns 0.059 0 0 4.42 KB
#4056 EnrichedLog net472 149μs 63.7ns 238ns 0.671 0.224 0 4.63 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 netcoreapp3.1 3.84μs 5.18ns 19.4ns 0.0541 0 0 3.9 KB
master EnrichedLog net472 5.05μs 1.29ns 4.84ns 0.566 0.00252 0 3.56 KB
#4056 EnrichedLog netcoreapp3.1 3.9μs 1.38ns 5.18ns 0.0528 0 0 3.9 KB
#4056 EnrichedLog net472 5μs 0.966ns 3.62ns 0.564 0.00249 0 3.56 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 netcoreapp3.1 1.57μs 0.647ns 2.51ns 0.018 0 0 1.3 KB
master SendReceive net472 2.01μs 1.56ns 6.03ns 0.212 0.001 0 1.34 KB
#4056 SendReceive netcoreapp3.1 1.59μs 0.818ns 3.06ns 0.0175 0 0 1.3 KB
#4056 SendReceive net472 1.97μs 1.41ns 5.45ns 0.212 0.000983 0 1.34 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 netcoreapp3.1 3.63μs 1.14ns 4.41ns 0.0239 0 0 1.78 KB
master EnrichedLog net472 4.38μs 1.38ns 4.97ns 0.349 0 0 2.21 KB
#4056 EnrichedLog netcoreapp3.1 3.65μs 1.26ns 4.89ns 0.0236 0 0 1.78 KB
#4056 EnrichedLog net472 4.43μs 1.68ns 6.53ns 0.349 0 0 2.21 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 netcoreapp3.1 683ns 0.45ns 1.68ns 0.00991 0 0 720 B
master StartFinishSpan net472 940ns 0.476ns 1.84ns 0.121 0 0 762 B
master StartFinishScope netcoreapp3.1 862ns 0.86ns 3.33ns 0.0113 0 0 840 B
master StartFinishScope net472 1.15μs 0.439ns 1.7ns 0.134 0 0 842 B
#4056 StartFinishSpan netcoreapp3.1 712ns 0.271ns 0.978ns 0.00964 0 0 720 B
#4056 StartFinishSpan net472 921ns 0.331ns 1.28ns 0.121 0 0 762 B
#4056 StartFinishScope netcoreapp3.1 838ns 0.537ns 2.08ns 0.0113 0 0 840 B
#4056 StartFinishScope net472 1.13μs 1.05ns 4.07ns 0.134 0 0 842 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 netcoreapp3.1 938ns 0.482ns 1.87ns 0.0113 0 0 840 B
master RunOnMethodBegin net472 1.19μs 0.91ns 3.53ns 0.134 0 0 842 B
#4056 RunOnMethodBegin netcoreapp3.1 985ns 0.862ns 3.11ns 0.0114 0 0 840 B
#4056 RunOnMethodBegin net472 1.2μs 0.787ns 3.05ns 0.133 0 0 842 B

@zacharycmontoya zacharycmontoya marked this pull request as ready for review April 20, 2023 19:58
@zacharycmontoya zacharycmontoya requested a review from a team as a code owner April 20, 2023 19:58
@@ -21,14 +21,6 @@
</ComponentGroup>

<ComponentGroup Id="Shared.EnvironmentVariables.IIS" Directory="INSTALLFOLDER">
<Component Id="Shared.Registry.EnvironmentVariables.W3SVC" Guid="{702DB265-F33E-47F4-A6B0-E21FA0FC21C1}" Win64="$(var.Win64)">
<CreateFolder/>
Copy link
Contributor

Choose a reason for hiding this comment

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

What does createFolder does here? It creates the group in the registry for Shared.Registry.EnvironmentVariables.W3SVC if it didn't exist? Just to be sure I understand what I'm approving? (I looked at the documentation but I'm not sure so I'd rather ask)

@zacharycmontoya zacharycmontoya added the status:do-not-merge Work is done. Can review, but do not merge yet. label Oct 17, 2024
@zacharycmontoya
Copy link
Contributor Author

Revisiting this PR, I'd still like to move forward with this change, but I'd also like to verify with telemetry that we're not running on these systems. I've added the status:do-not-merge label in the meantime

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:installers area:shared-components status:do-not-merge Work is done. Can review, but do not merge yet.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants