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

Dudik/debugger dynamic configuration #6627

Draft
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

dudikeleti
Copy link
Contributor

Summary of changes

Reason for change

Implementation details

Test coverage

Other details

@datadog-ddstaging
Copy link

datadog-ddstaging bot commented Feb 5, 2025

Datadog Report

Branch report: dudik/debugger-dynamic-configuration
Commit report: 5c60b47
Test service: dd-trace-dotnet

❌ 5424 Failed (0 Known Flaky), 220149 Passed, 3325 Skipped, 31h 21m 53.32s Total Time

❌ Failed Tests (5424)

This report shows up to 5 failed tests.

  • TestExceptionReplay - Datadog.Trace.Debugger.IntegrationTests.ExceptionReplay.AspNetCore5ExceptionReplayEnabledDynamicInstrumentationDisabled - Details

    Expand for error
     Results do not match.
     Differences:
     Received: ExceptionReplay.AspNetCore5.RethrowTest.received.txt
     Verified: ExceptionReplay.AspNetCore5.RethrowTest.verified.txt
     Received Content:
     [
       {
         "dd.span_id": "ScrubbedValue",
         "dd.trace_id": "ScrubbedValue",
         "ddsource": "dd_debugger",
     ...
    
  • TestExceptionReplay - Datadog.Trace.Debugger.IntegrationTests.ExceptionReplay.AspNetCore5ExceptionReplayEnabledDynamicInstrumentationDisabled - Details

    Expand for error
     Results do not match.
     Differences:
     Received: ExceptionReplay.AspNetCore5.RecursiveExceptionTest.received.txt
     Verified: ExceptionReplay.AspNetCore5.RecursiveExceptionTest.verified.txt
     Received Content:
     [
       {
         "dd.span_id": "ScrubbedValue",
         "dd.trace_id": "ScrubbedValue",
         "ddsource": "dd_debugger",
     ...
    
  • TestExceptionReplay - Datadog.Trace.Debugger.IntegrationTests.ExceptionReplay.AspNetCore5ExceptionReplayEnabledDynamicInstrumentationDisabled - Details

    Expand for error
     Results do not match.
     Differences:
     Received: ExceptionReplay.AspNetCore5.ExceptionCaughtAndRethrownAsInnerTest.received.txt
     Verified: ExceptionReplay.AspNetCore5.ExceptionCaughtAndRethrownAsInnerTest.verified.txt
     Received Content:
     [
       {
         "dd.span_id": "ScrubbedValue",
         "dd.trace_id": "ScrubbedValue",
         "ddsource": "dd_debugger",
     ...
    
  • TestExceptionReplay - Datadog.Trace.Debugger.IntegrationTests.ExceptionReplay.AspNetCore5ExceptionReplayEnabledDynamicInstrumentationDisabled - Details

    Expand for error
     Results do not match.
     Differences:
     Received: ExceptionReplay.AspNetCore5.DeterministicComplexExceptionPropagationTest.received.txt
     Verified: ExceptionReplay.AspNetCore5.DeterministicComplexExceptionPropagationTest.verified.txt
     Received Content:
     [
       {
         "dd.span_id": "ScrubbedValue",
         "dd.trace_id": "ScrubbedValue",
         "ddsource": "dd_debugger",
     ...
    
  • TestExceptionReplay - Datadog.Trace.Debugger.IntegrationTests.ExceptionReplay.AspNetCore5ExceptionReplayEnabledDynamicInstrumentationDisabled - Details

    Expand for error
     Results do not match.
     Differences:
     Received: ExceptionReplay.AspNetCore5.ExceptionCaughtAndRethrownAsInnerTest.received.txt
     Verified: ExceptionReplay.AspNetCore5.ExceptionCaughtAndRethrownAsInnerTest.verified.txt
     Received Content:
     [
       {
         "dd.span_id": "ScrubbedValue",
         "dd.trace_id": "ScrubbedValue",
         "ddsource": "dd_debugger",
     ...
    

@andrewlock
Copy link
Member

andrewlock commented Feb 5, 2025

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 (6627) - mean (75ms)  : 72, 77
     .   : milestone, 75,
    master - mean (69ms)  : 67, 72
     .   : milestone, 69,

    section CallTarget+Inlining+NGEN
    This PR (6627) - mean (1,035ms)  : 1012, 1057
     .   : milestone, 1035,
    master - mean (993ms)  : 971, 1015
     .   : milestone, 993,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6627) - mean (111ms)  : 110, 113
     .   : milestone, 111,
    master - mean (102ms)  : 100, 104
     .   : milestone, 102,

    section CallTarget+Inlining+NGEN
    This PR (6627) - mean (708ms)  : 691, 724
     .   : milestone, 708,
    master - mean (673ms)  : 656, 690
     .   : milestone, 673,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6627) - mean (98ms)  : 96, 99
     .   : milestone, 98,
    master - mean (89ms)  : 88, 91
     .   : milestone, 89,

    section CallTarget+Inlining+NGEN
    This PR (6627) - mean (660ms)  : 647, 674
     .   : milestone, 660,
    master - mean (632ms)  : 614, 651
     .   : milestone, 632,

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

    section CallTarget+Inlining+NGEN
    This PR (6627) - mean (1,105ms)  : 1066, 1145
     .   : milestone, 1105,
    master - mean (1,102ms)  : 1064, 1140
     .   : milestone, 1102,

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

    section CallTarget+Inlining+NGEN
    This PR (6627) - mean (860ms)  : 821, 899
     .   : milestone, 860,
    master - mean (861ms)  : 832, 891
     .   : milestone, 861,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6627) - mean (261ms)  : 257, 265
     .   : milestone, 261,
    master - mean (262ms)  : 258, 265
     .   : milestone, 262,

    section CallTarget+Inlining+NGEN
    This PR (6627) - mean (838ms)  : 812, 863
     .   : milestone, 838,
    master - mean (846ms)  : 809, 883
     .   : milestone, 846,

Loading

@andrewlock
Copy link
Member

andrewlock commented Feb 5, 2025

Benchmarks Report for tracer 🐌

Benchmarks for #6627 compared to master:

  • 1 benchmarks are slower, with geometric mean 1.138
  • 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 8.26μs 47.3ns 344ns 0.016 0.008 0 5.61 KB
master StartStopWithChild netcoreapp3.1 10.3μs 59.1ns 454ns 0.0206 0.0103 0 5.8 KB
master StartStopWithChild net472 16.7μs 60.1ns 233ns 1.05 0.317 0.1 6.22 KB
#6627 StartStopWithChild net6.0 7.94μs 43.3ns 260ns 0.015 0.00752 0 5.61 KB
#6627 StartStopWithChild netcoreapp3.1 10.3μs 57ns 374ns 0.0209 0.0104 0 5.8 KB
#6627 StartStopWithChild net472 16.9μs 81.7ns 365ns 1.06 0.326 0.0919 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 525ns 2.03μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 658μs 288ns 1.08μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces net472 857μs 466ns 1.68μs 0.425 0 0 3.3 KB
#6627 WriteAndFlushEnrichedTraces net6.0 485μs 428ns 1.66μs 0 0 0 2.7 KB
#6627 WriteAndFlushEnrichedTraces netcoreapp3.1 644μs 425ns 1.65μs 0 0 0 2.7 KB
#6627 WriteAndFlushEnrichedTraces net472 860μs 625ns 2.42μ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 131μs 464ns 1.8μs 0.193 0 0 14.47 KB
master SendRequest netcoreapp3.1 145μs 297ns 1.15μs 0.217 0 0 17.27 KB
master SendRequest net472 0.00234ns 0.0011ns 0.00425ns 0 0 0 0 b
#6627 SendRequest net6.0 128μs 363ns 1.41μs 0.127 0 0 14.47 KB
#6627 SendRequest netcoreapp3.1 147μs 274ns 1.06μs 0.213 0 0 17.27 KB
#6627 SendRequest net472 0.00383ns 0.00112ns 0.00435ns 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 568μs 2.63μs 11.8μs 0.536 0 0 41.52 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 679μs 3.76μs 23.8μs 0.332 0 0 41.72 KB
master WriteAndFlushEnrichedTraces net472 837μs 3.74μs 14.5μs 8.28 2.48 0.414 53.29 KB
#6627 WriteAndFlushEnrichedTraces net6.0 546μs 2.56μs 10.3μs 0.558 0 0 41.62 KB
#6627 WriteAndFlushEnrichedTraces netcoreapp3.1 690μs 3.68μs 21.2μs 0.34 0 0 41.85 KB
#6627 WriteAndFlushEnrichedTraces net472 846μs 3.98μs 15.9μs 8.33 2.5 0.417 53.35 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.29μs 1.46ns 5.26ns 0.0143 0 0 1.02 KB
master ExecuteNonQuery netcoreapp3.1 1.79μs 2.08ns 8.05ns 0.0135 0 0 1.02 KB
master ExecuteNonQuery net472 2.04μs 2.32ns 8.97ns 0.157 0.00102 0 987 B
#6627 ExecuteNonQuery net6.0 1.33μs 0.958ns 3.71ns 0.014 0 0 1.02 KB
#6627 ExecuteNonQuery netcoreapp3.1 1.81μs 1.86ns 6.94ns 0.0137 0 0 1.02 KB
#6627 ExecuteNonQuery net472 2.17μs 3.12ns 12.1ns 0.156 0.00107 0 987 B
Benchmarks.Trace.ElasticsearchBenchmark - Slower ⚠️ Same allocations ✔️

Slower ⚠️ in #6627

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync‑net6.0 1.138 1,249.79 1,421.88

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master CallElasticsearch net6.0 1.23μs 0.636ns 2.38ns 0.0135 0 0 976 B
master CallElasticsearch netcoreapp3.1 1.51μs 1.8ns 6.97ns 0.013 0 0 976 B
master CallElasticsearch net472 2.49μs 2.14ns 8.28ns 0.157 0 0 995 B
master CallElasticsearchAsync net6.0 1.25μs 2.49ns 9.63ns 0.0134 0 0 952 B
master CallElasticsearchAsync netcoreapp3.1 1.6μs 0.843ns 3.26ns 0.0136 0 0 1.02 KB
master CallElasticsearchAsync net472 2.72μs 1.7ns 6.59ns 0.166 0 0 1.05 KB
#6627 CallElasticsearch net6.0 1.22μs 1.27ns 4.76ns 0.0134 0 0 976 B
#6627 CallElasticsearch netcoreapp3.1 1.53μs 0.789ns 2.95ns 0.013 0 0 976 B
#6627 CallElasticsearch net472 2.53μs 1.12ns 4.34ns 0.157 0 0 995 B
#6627 CallElasticsearchAsync net6.0 1.42μs 0.645ns 2.41ns 0.0132 0 0 952 B
#6627 CallElasticsearchAsync netcoreapp3.1 1.64μs 1.13ns 4.37ns 0.014 0 0 1.02 KB
#6627 CallElasticsearchAsync net472 2.62μs 1.47ns 5.69ns 0.166 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.21μs 1.51ns 5.67ns 0.0135 0 0 952 B
master ExecuteAsync netcoreapp3.1 1.58μs 0.469ns 1.76ns 0.0127 0 0 952 B
master ExecuteAsync net472 1.82μs 0.669ns 2.59ns 0.145 0 0 915 B
#6627 ExecuteAsync net6.0 1.33μs 0.776ns 2.9ns 0.0134 0 0 952 B
#6627 ExecuteAsync netcoreapp3.1 1.67μs 0.956ns 3.45ns 0.0125 0 0 952 B
#6627 ExecuteAsync net472 1.91μs 0.701ns 2.72ns 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 1.74ns 6.75ns 0.0332 0 0 2.31 KB
master SendAsync netcoreapp3.1 5.27μs 2.42ns 9.04ns 0.037 0 0 2.85 KB
master SendAsync net472 7.42μs 2.92ns 11.3ns 0.495 0 0 3.12 KB
#6627 SendAsync net6.0 4.4μs 2.36ns 9.15ns 0.0332 0 0 2.31 KB
#6627 SendAsync netcoreapp3.1 5.35μs 2.77ns 10.7ns 0.0377 0 0 2.85 KB
#6627 SendAsync net472 7.38μs 2.56ns 9.22ns 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.45μs 0.888ns 3.32ns 0.0226 0 0 1.64 KB
master EnrichedLog netcoreapp3.1 2.25μs 1.12ns 4.03ns 0.0215 0 0 1.64 KB
master EnrichedLog net472 2.6μs 1.75ns 6.76ns 0.25 0 0 1.57 KB
#6627 EnrichedLog net6.0 1.48μs 1.24ns 4.65ns 0.0227 0 0 1.64 KB
#6627 EnrichedLog netcoreapp3.1 2.17μs 0.811ns 3.04ns 0.0221 0 0 1.64 KB
#6627 EnrichedLog net472 2.75μs 0.958ns 3.58ns 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 113μs 97.7ns 378ns 0.0567 0 0 4.28 KB
master EnrichedLog netcoreapp3.1 116μs 90.9ns 352ns 0 0 0 4.28 KB
master EnrichedLog net472 150μs 177ns 687ns 0.674 0.225 0 4.46 KB
#6627 EnrichedLog net6.0 112μs 56.7ns 219ns 0.0556 0 0 4.28 KB
#6627 EnrichedLog netcoreapp3.1 115μs 136ns 492ns 0.0572 0 0 4.28 KB
#6627 EnrichedLog net472 150μs 139ns 537ns 0.674 0.225 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.05μs 0.85ns 2.94ns 0.0302 0 0 2.2 KB
master EnrichedLog netcoreapp3.1 4.08μs 1.67ns 6.23ns 0.0286 0 0 2.2 KB
master EnrichedLog net472 4.95μs 1.38ns 5.18ns 0.319 0 0 2.02 KB
#6627 EnrichedLog net6.0 3.09μs 0.42ns 1.51ns 0.0303 0 0 2.2 KB
#6627 EnrichedLog netcoreapp3.1 4.28μs 1.2ns 4.5ns 0.0299 0 0 2.2 KB
#6627 EnrichedLog net472 4.98μs 1.58ns 6.12ns 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.4μs 1.23ns 4.76ns 0.0159 0 0 1.14 KB
master SendReceive netcoreapp3.1 1.93μs 10.3ns 56.7ns 0.0153 0 0 1.14 KB
master SendReceive net472 2.13μs 1.25ns 4.85ns 0.183 0 0 1.16 KB
#6627 SendReceive net6.0 1.43μs 1.13ns 4.36ns 0.0158 0 0 1.14 KB
#6627 SendReceive netcoreapp3.1 1.73μs 1.48ns 5.56ns 0.0156 0 0 1.14 KB
#6627 SendReceive net472 2μs 0.889ns 3.44ns 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.72μs 0.912ns 3.41ns 0.0218 0 0 1.6 KB
master EnrichedLog netcoreapp3.1 3.76μs 1.38ns 5.35ns 0.0226 0 0 1.65 KB
master EnrichedLog net472 4.43μs 2.73ns 10.6ns 0.324 0 0 2.04 KB
#6627 EnrichedLog net6.0 2.73μs 0.958ns 3.71ns 0.0219 0 0 1.6 KB
#6627 EnrichedLog netcoreapp3.1 3.98μs 1.18ns 4.26ns 0.0222 0 0 1.65 KB
#6627 EnrichedLog net472 4.42μs 2.86ns 11.1ns 0.323 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 453ns 0.175ns 0.677ns 0.00818 0 0 576 B
master StartFinishSpan netcoreapp3.1 602ns 0.318ns 1.23ns 0.00757 0 0 576 B
master StartFinishSpan net472 663ns 0.581ns 2.25ns 0.0916 0 0 578 B
master StartFinishScope net6.0 547ns 0.391ns 1.51ns 0.00986 0 0 696 B
master StartFinishScope netcoreapp3.1 826ns 0.285ns 1.07ns 0.00953 0 0 696 B
master StartFinishScope net472 868ns 0.467ns 1.81ns 0.104 0 0 658 B
#6627 StartFinishSpan net6.0 418ns 0.11ns 0.382ns 0.00815 0 0 576 B
#6627 StartFinishSpan netcoreapp3.1 568ns 0.385ns 1.44ns 0.00767 0 0 576 B
#6627 StartFinishSpan net472 608ns 0.63ns 2.44ns 0.0916 0 0 578 B
#6627 StartFinishScope net6.0 505ns 0.167ns 0.647ns 0.00982 0 0 696 B
#6627 StartFinishScope netcoreapp3.1 828ns 0.58ns 2.25ns 0.00945 0 0 696 B
#6627 StartFinishScope net472 792ns 0.723ns 2.8ns 0.104 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 631ns 0.216ns 0.836ns 0.00974 0 0 696 B
master RunOnMethodBegin netcoreapp3.1 956ns 0.549ns 2.05ns 0.00962 0 0 696 B
master RunOnMethodBegin net472 1.02μs 0.741ns 2.87ns 0.104 0 0 658 B
#6627 RunOnMethodBegin net6.0 656ns 0.311ns 1.21ns 0.00983 0 0 696 B
#6627 RunOnMethodBegin netcoreapp3.1 931ns 0.464ns 1.67ns 0.00936 0 0 696 B
#6627 RunOnMethodBegin net472 1.12μs 1.06ns 4.09ns 0.105 0 0 658 B

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants