[Debugger] Add global rate limiter and clean up adaptive samplers#8480
[Debugger] Add global rate limiter and clean up adaptive samplers#8480dudikeleti wants to merge 1 commit intomasterfrom
Conversation
…im rate-limit overhead
Execution-Time Benchmarks Report ⏱️Execution-time results for samples comparing This PR (8480) and master. ✅ No regressions detected - check the details below Full Metrics ComparisonFakeDbCommand
HttpMessageHandler
Comparison explanationExecution-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 highlighted 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). Duration chartsFakeDbCommand (.NET Framework 4.8)gantt
title Execution time (ms) FakeDbCommand (.NET Framework 4.8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8480) - mean (74ms) : 70, 79
master - mean (75ms) : 70, 80
section Bailout
This PR (8480) - mean (78ms) : 74, 82
master - mean (78ms) : 74, 81
section CallTarget+Inlining+NGEN
This PR (8480) - mean (1,072ms) : 1028, 1116
master - mean (1,079ms) : 1029, 1130
FakeDbCommand (.NET Core 3.1)gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8480) - mean (117ms) : 110, 124
master - mean (118ms) : 112, 124
section Bailout
This PR (8480) - mean (115ms) : 111, 119
master - mean (115ms) : 112, 117
section CallTarget+Inlining+NGEN
This PR (8480) - mean (791ms) : 769, 814
master - mean (797ms) : 769, 824
FakeDbCommand (.NET 6)gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8480) - mean (101ms) : 97, 104
master - mean (101ms) : 96, 107
section Bailout
This PR (8480) - mean (102ms) : 99, 105
master - mean (102ms) : 99, 105
section CallTarget+Inlining+NGEN
This PR (8480) - mean (939ms) : 899, 979
master - mean (942ms) : 897, 987
FakeDbCommand (.NET 8)gantt
title Execution time (ms) FakeDbCommand (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8480) - mean (102ms) : 97, 108
master - mean (103ms) : 97, 110
section Bailout
This PR (8480) - mean (101ms) : 98, 104
master - mean (102ms) : 97, 107
section CallTarget+Inlining+NGEN
This PR (8480) - mean (825ms) : 792, 858
master - mean (832ms) : 791, 873
HttpMessageHandler (.NET Framework 4.8)gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8480) - mean (191ms) : 186, 196
master - mean (209ms) : 205, 214
section Bailout
This PR (8480) - mean (194ms) : 192, 196
master - mean (214ms) : 209, 218
section CallTarget+Inlining+NGEN
This PR (8480) - mean (1,152ms) : 1103, 1202
master - mean (1,228ms) : 1183, 1274
HttpMessageHandler (.NET Core 3.1)gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8480) - mean (274ms) : 270, 277
master - mean (303ms) : 292, 313
section Bailout
This PR (8480) - mean (275ms) : 271, 278
master - mean (303ms) : 297, 309
section CallTarget+Inlining+NGEN
This PR (8480) - mean (927ms) : 911, 943
master - mean (1,006ms) : 967, 1044
HttpMessageHandler (.NET 6)gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8480) - mean (268ms) : 264, 273
master - mean (296ms) : 290, 303
section Bailout
This PR (8480) - mean (268ms) : 265, 271
master - mean (298ms) : 292, 305
section CallTarget+Inlining+NGEN
This PR (8480) - mean (1,133ms) : 1095, 1171
master - mean (1,175ms) : 1140, 1210
HttpMessageHandler (.NET 8)gantt
title Execution time (ms) HttpMessageHandler (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8480) - mean (266ms) : 262, 270
master - mean (295ms) : 287, 304
section Bailout
This PR (8480) - mean (265ms) : 262, 269
master - mean (295ms) : 288, 302
section CallTarget+Inlining+NGEN
This PR (8480) - mean (1,022ms) : 977, 1068
master - mean (1,070ms) : 1000, 1140
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
BenchmarksBenchmark execution time: 2026-04-18 00:58:50 Comparing candidate commit caecce0 in PR branch Found 0 performance improvements and 1 performance regressions! Performance is the same for 26 metrics, 0 unstable metrics, 87 known flaky benchmarks.
|
Summary of changes
ConfigurationUpdater,DebuggerFactory, andDynamicInstrumentation.ProbeProcessor, while leaving metric and span-decoration probes unchanged.Reason for change
Implementation details
ServiceConfiguration.Sampling.SnapshotsPerSecondas the global cap source, with fallback snapshot/log defaults in the global limiter.HasRateLimitChangedtrack service sampling only, so rate-limit updates do not run on unrelated probe/filter changes.Test coverage
dotnet test "tracer/test/Datadog.Trace.Tests/Datadog.Trace.Tests.csproj" --filter "FullyQualifiedName~Datadog.Trace.Tests.Debugger.DebuggerGlobalRateLimiterTests|FullyQualifiedName~Datadog.Trace.Tests.Debugger.ProbeRateLimiterTests|FullyQualifiedName~Datadog.Trace.Tests.Debugger.ProbeProcessorTests|FullyQualifiedName~Datadog.Trace.Tests.Debugger.ConfigurationUpdaterTests|FullyQualifiedName~Datadog.Trace.Tests.Debugger.DynamicInstrumentationTests|FullyQualifiedName~Datadog.Trace.Tests.Debugger.AdaptiveSamplerTests|FullyQualifiedName~Datadog.Trace.Tests.Debugger.ProbeConfigurationComparerTests"