Skip to content

Log values of WCF settings on startup #6829

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

Closed
wants to merge 1 commit into from

Conversation

bouwkast
Copy link
Collaborator

@bouwkast bouwkast commented Apr 7, 2025

Summary of changes

Just logs a couple more settings in the startup.

I think we are probably missing more, but only adding these as delay one is commonly used by support to rule out WCF issues, but the value isn't actually logged on startup while another WCF-related one is and could be confusing.

Reason for change

They weren't there and would have been useful

Implementation details

Added them

Test coverage

None

Other details

@bouwkast bouwkast requested a review from a team as a code owner April 7, 2025 16:08
@bouwkast bouwkast changed the title Log a couple more property values Log values of WCF settings in startup Apr 7, 2025
@bouwkast bouwkast changed the title Log values of WCF settings in startup Log values of WCF settings on startup Apr 7, 2025
@github-actions github-actions bot added the area:tracer The core tracer library (Datadog.Trace, does not include OpenTracing, native code, or integrations) label Apr 7, 2025
@datadog-datadog-prod-us1
Copy link

datadog-datadog-prod-us1 bot commented Apr 7, 2025

Datadog Report

Branch report: steven/log-more-settings
Commit report: faaddc3
Test service: dd-trace-dotnet

✅ 0 Failed, 251610 Passed, 2377 Skipped, 21h 11m 4.55s Total Time

@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 (6829) - mean (69ms)  : 67, 71
     .   : milestone, 69,
    master - mean (69ms)  : 67, 72
     .   : milestone, 69,

    section CallTarget+Inlining+NGEN
    This PR (6829) - mean (1,004ms)  : 983, 1025
     .   : milestone, 1004,
    master - mean (1,011ms)  : 979, 1043
     .   : milestone, 1011,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6829) - mean (103ms)  : 101, 104
     .   : milestone, 103,
    master - mean (103ms)  : 100, 105
     .   : milestone, 103,

    section CallTarget+Inlining+NGEN
    This PR (6829) - mean (687ms)  : 667, 706
     .   : milestone, 687,
    master - mean (684ms)  : 669, 698
     .   : milestone, 684,

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

    section CallTarget+Inlining+NGEN
    This PR (6829) - mean (647ms)  : 633, 662
     .   : milestone, 647,
    master - mean (643ms)  : 630, 657
     .   : milestone, 643,

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

    section CallTarget+Inlining+NGEN
    This PR (6829) - mean (1,110ms)  : 1082, 1138
     .   : milestone, 1110,
    master - mean (1,110ms)  : 1078, 1141
     .   : milestone, 1110,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6829) - mean (269ms)  : 265, 273
     .   : milestone, 269,
    master - mean (270ms)  : 261, 279
     .   : milestone, 270,

    section CallTarget+Inlining+NGEN
    This PR (6829) - mean (872ms)  : 845, 900
     .   : milestone, 872,
    master - mean (877ms)  : 847, 907
     .   : milestone, 877,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6829) - mean (262ms)  : 258, 266
     .   : milestone, 262,
    master - mean (263ms)  : 260, 267
     .   : milestone, 263,

    section CallTarget+Inlining+NGEN
    This PR (6829) - mean (861ms)  : 831, 891
     .   : milestone, 861,
    master - mean (869ms)  : 835, 903
     .   : milestone, 869,

Loading

@andrewlock
Copy link
Member

Benchmarks Report for tracer 🐌

Benchmarks for #6829 compared to master:

  • 1 benchmarks are faster, with geometric mean 1.304
  • 3 benchmarks are slower, with geometric mean 1.151
  • 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.9μs 45.2ns 326ns 0.0158 0.00788 0 5.61 KB
master StartStopWithChild netcoreapp3.1 9.96μs 53.6ns 294ns 0.024 0.00959 0 5.8 KB
master StartStopWithChild net472 16.3μs 65.8ns 255ns 1.05 0.307 0.105 6.21 KB
#6829 StartStopWithChild net6.0 8.27μs 46.6ns 333ns 0.016 0.008 0 5.6 KB
#6829 StartStopWithChild netcoreapp3.1 10.1μs 56.6ns 388ns 0.0145 0.00484 0 5.8 KB
#6829 StartStopWithChild net472 16.5μs 68.6ns 266ns 1.04 0.294 0.0897 6.22 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 504μs 428ns 1.6μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 653μs 714ns 2.67μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces net472 850μs 754ns 2.92μs 0.422 0 0 3.3 KB
#6829 WriteAndFlushEnrichedTraces net6.0 500μs 493ns 1.85μs 0 0 0 2.7 KB
#6829 WriteAndFlushEnrichedTraces netcoreapp3.1 655μs 692ns 2.59μs 0 0 0 2.7 KB
#6829 WriteAndFlushEnrichedTraces net472 847μs 687ns 2.48μs 0.419 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 127μs 442ns 1.71μs 0.191 0 0 14.47 KB
master SendRequest netcoreapp3.1 147μs 136ns 528ns 0.22 0 0 17.27 KB
master SendRequest net472 0.000385ns 0.000222ns 0.00086ns 0 0 0 0 b
#6829 SendRequest net6.0 132μs 174ns 673ns 0.198 0 0 14.47 KB
#6829 SendRequest netcoreapp3.1 147μs 155ns 601ns 0.22 0 0 17.27 KB
#6829 SendRequest net472 0.00086ns 0.000333ns 0.00124ns 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 609μs 3.4μs 30.1μs 0.566 0 0 41.64 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 773μs 4.45μs 37μs 0.374 0 0 41.53 KB
master WriteAndFlushEnrichedTraces net472 859μs 4.14μs 16.6μs 8.19 2.59 0.431 53.34 KB
#6829 WriteAndFlushEnrichedTraces net6.0 579μs 3.38μs 29.7μs 0.579 0 0 41.56 KB
#6829 WriteAndFlushEnrichedTraces netcoreapp3.1 742μs 4.25μs 31.2μs 0.406 0 0 41.66 KB
#6829 WriteAndFlushEnrichedTraces net472 876μs 3.91μs 15.1μs 8.08 2.55 0.425 53.32 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.35μs 1.57ns 6.07ns 0.0142 0 0 1.02 KB
master ExecuteNonQuery netcoreapp3.1 1.78μs 2.7ns 9.74ns 0.0134 0 0 1.02 KB
master ExecuteNonQuery net472 2.13μs 3.31ns 12.8ns 0.156 0.00106 0 987 B
#6829 ExecuteNonQuery net6.0 1.32μs 1.38ns 5.35ns 0.0146 0 0 1.02 KB
#6829 ExecuteNonQuery netcoreapp3.1 1.82μs 3.12ns 12.1ns 0.0136 0 0 1.02 KB
#6829 ExecuteNonQuery net472 2.18μs 1.92ns 7.43ns 0.157 0.00109 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.27μs 0.683ns 2.55ns 0.0136 0 0 976 B
master CallElasticsearch netcoreapp3.1 1.63μs 0.896ns 3.35ns 0.0131 0 0 976 B
master CallElasticsearch net472 2.59μs 1.54ns 5.75ns 0.158 0 0 995 B
master CallElasticsearchAsync net6.0 1.3μs 0.873ns 3.38ns 0.0136 0 0 952 B
master CallElasticsearchAsync netcoreapp3.1 1.61μs 0.364ns 1.36ns 0.0137 0 0 1.02 KB
master CallElasticsearchAsync net472 2.65μs 0.819ns 3.17ns 0.167 0 0 1.05 KB
#6829 CallElasticsearch net6.0 1.16μs 0.543ns 2.03ns 0.0134 0 0 976 B
#6829 CallElasticsearch netcoreapp3.1 1.6μs 0.619ns 2.4ns 0.0136 0 0 976 B
#6829 CallElasticsearch net472 2.63μs 2.1ns 8.12ns 0.158 0 0 995 B
#6829 CallElasticsearchAsync net6.0 1.29μs 0.837ns 3.13ns 0.0136 0 0 952 B
#6829 CallElasticsearchAsync netcoreapp3.1 1.74μs 1.14ns 4.25ns 0.0138 0 0 1.02 KB
#6829 CallElasticsearchAsync net472 2.69μs 1.23ns 4.6ns 0.167 0 0 1.05 KB
Benchmarks.Trace.GraphQLBenchmark - Slower ⚠️ Same allocations ✔️

Slower ⚠️ in #6829

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync‑net6.0 1.125 1,283.20 1,444.24

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master ExecuteAsync net6.0 1.28μs 0.423ns 1.58ns 0.0135 0 0 952 B
master ExecuteAsync netcoreapp3.1 1.64μs 0.475ns 1.84ns 0.0122 0 0 952 B
master ExecuteAsync net472 1.83μs 0.42ns 1.63ns 0.145 0 0 915 B
#6829 ExecuteAsync net6.0 1.44μs 1.91ns 7.39ns 0.0129 0 0 952 B
#6829 ExecuteAsync netcoreapp3.1 1.64μs 5.32ns 20.6ns 0.0129 0 0 952 B
#6829 ExecuteAsync net472 1.71μs 0.437ns 1.64ns 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.42μs 2.14ns 8.02ns 0.0309 0 0 2.31 KB
master SendAsync netcoreapp3.1 5.31μs 2.2ns 8.52ns 0.0372 0 0 2.85 KB
master SendAsync net472 7.67μs 2.04ns 7.88ns 0.496 0 0 3.12 KB
#6829 SendAsync net6.0 4.33μs 2.56ns 9.58ns 0.0325 0 0 2.31 KB
#6829 SendAsync netcoreapp3.1 5.23μs 2.8ns 10.5ns 0.0367 0 0 2.85 KB
#6829 SendAsync net472 7.45μs 1.65ns 6.38ns 0.496 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.51μs 1.35ns 5.06ns 0.0239 0 0 1.69 KB
master EnrichedLog netcoreapp3.1 2.36μs 2.17ns 7.82ns 0.0235 0 0 1.69 KB
master EnrichedLog net472 2.62μs 2.35ns 8.47ns 0.257 0 0 1.62 KB
#6829 EnrichedLog net6.0 1.58μs 1.44ns 5.39ns 0.0238 0 0 1.69 KB
#6829 EnrichedLog netcoreapp3.1 2.25μs 3.49ns 13.5ns 0.0225 0 0 1.69 KB
#6829 EnrichedLog net472 2.59μs 0.95ns 3.56ns 0.257 0 0 1.62 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 112μs 113ns 438ns 0 0 0 4.3 KB
master EnrichedLog netcoreapp3.1 116μs 115ns 430ns 0.058 0 0 4.3 KB
master EnrichedLog net472 150μs 143ns 556ns 0.677 0.226 0 4.49 KB
#6829 EnrichedLog net6.0 112μs 46.7ns 162ns 0.0566 0 0 4.3 KB
#6829 EnrichedLog netcoreapp3.1 116μs 179ns 694ns 0.058 0 0 4.3 KB
#6829 EnrichedLog net472 151μs 132ns 511ns 0.68 0.227 0 4.49 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.89μs 0.478ns 1.72ns 0.0318 0 0 2.25 KB
master EnrichedLog netcoreapp3.1 4.19μs 1.37ns 5.14ns 0.0292 0 0 2.25 KB
master EnrichedLog net472 4.97μs 3.67ns 14.2ns 0.328 0 0 2.07 KB
#6829 EnrichedLog net6.0 3.16μs 0.813ns 3.04ns 0.0315 0 0 2.25 KB
#6829 EnrichedLog netcoreapp3.1 4.12μs 1.42ns 5.32ns 0.0289 0 0 2.25 KB
#6829 EnrichedLog net472 4.94μs 1.61ns 6.23ns 0.328 0 0 2.07 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.37μs 0.575ns 2.15ns 0.0165 0 0 1.14 KB
master SendReceive netcoreapp3.1 1.75μs 0.857ns 3.32ns 0.0149 0 0 1.14 KB
master SendReceive net472 2.2μs 1.58ns 6.11ns 0.184 0 0 1.16 KB
#6829 SendReceive net6.0 1.35μs 0.377ns 1.36ns 0.0162 0 0 1.14 KB
#6829 SendReceive netcoreapp3.1 1.79μs 0.735ns 2.75ns 0.0151 0 0 1.14 KB
#6829 SendReceive net472 2.2μs 2.77ns 10ns 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.86μs 2.39ns 9.27ns 0.023 0 0 1.62 KB
master EnrichedLog netcoreapp3.1 4.18μs 4.07ns 15.8ns 0.0229 0 0 1.67 KB
master EnrichedLog net472 4.46μs 1.87ns 7.23ns 0.328 0 0 2.07 KB
#6829 EnrichedLog net6.0 2.79μs 0.871ns 3.37ns 0.0224 0 0 1.62 KB
#6829 EnrichedLog netcoreapp3.1 4.01μs 4.2ns 16.3ns 0.022 0 0 1.67 KB
#6829 EnrichedLog net472 4.36μs 2.32ns 8.99ns 0.327 0 0 2.07 KB
Benchmarks.Trace.SpanBenchmark - Slower ⚠️ Same allocations ✔️

Slower ⚠️ in #6829

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑netcoreapp3.1 1.119 553.99 619.68

Faster 🎉 in #6829

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.SpanBenchmark.StartFinishScope‑net6.0 1.304 626.03 479.92

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartFinishSpan net6.0 411ns 0.132ns 0.495ns 0.00802 0 0 576 B
master StartFinishSpan netcoreapp3.1 554ns 0.438ns 1.7ns 0.00795 0 0 576 B
master StartFinishSpan net472 652ns 0.431ns 1.67ns 0.0918 0 0 578 B
master StartFinishScope net6.0 626ns 0.224ns 0.867ns 0.00997 0 0 696 B
master StartFinishScope netcoreapp3.1 836ns 0.316ns 1.22ns 0.0092 0 0 696 B
master StartFinishScope net472 910ns 0.166ns 0.599ns 0.104 0 0 658 B
#6829 StartFinishSpan net6.0 451ns 0.142ns 0.552ns 0.00806 0 0 576 B
#6829 StartFinishSpan netcoreapp3.1 619ns 0.662ns 2.56ns 0.00773 0 0 576 B
#6829 StartFinishSpan net472 652ns 0.239ns 0.927ns 0.0915 0 0 578 B
#6829 StartFinishScope net6.0 480ns 0.192ns 0.717ns 0.0099 0 0 696 B
#6829 StartFinishScope netcoreapp3.1 785ns 0.477ns 1.79ns 0.00914 0 0 696 B
#6829 StartFinishScope net472 955ns 0.351ns 1.31ns 0.104 0 0 658 B
Benchmarks.Trace.TraceAnnotationsBenchmark - Slower ⚠️ Same allocations ✔️

Slower ⚠️ in #6829

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin‑net6.0 1.212 609.09 738.39

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master RunOnMethodBegin net6.0 609ns 0.36ns 1.39ns 0.00974 0 0 696 B
master RunOnMethodBegin netcoreapp3.1 935ns 0.705ns 2.54ns 0.00947 0 0 696 B
master RunOnMethodBegin net472 1.2μs 0.384ns 1.49ns 0.104 0 0 658 B
#6829 RunOnMethodBegin net6.0 739ns 0.271ns 1.01ns 0.00965 0 0 696 B
#6829 RunOnMethodBegin netcoreapp3.1 996ns 0.512ns 1.98ns 0.00958 0 0 696 B
#6829 RunOnMethodBegin net472 1.11μs 0.519ns 2.01ns 0.104 0 0 658 B

Copy link
Member

@andrewlock andrewlock left a comment

Choose a reason for hiding this comment

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

We're getting to the point where we're logging everything here, which wasn't the intention. The idea is that we can get the full data from the telemetry endpoint. If that's not sufficient, maybe we should just be dumping the full config here directly? 🤔

@bouwkast
Copy link
Collaborator Author

bouwkast commented May 8, 2025

Closing this in favor of using / relying on telemetry data.

@bouwkast bouwkast closed this May 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:tracer The core tracer library (Datadog.Trace, does not include OpenTracing, native code, or integrations)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants