Skip to content

Conversation

@andrewlock
Copy link
Member

@andrewlock andrewlock commented Oct 22, 2025

Summary of changes

  • Introduces SettingsManager responsible for managing MutableSettings and ExporterSettings

Reason for change

We need to be notified about runtime changes to settings (i.e. config in code or remote config) but don't want to tear down the world and rebuild every time. SettingsManager is responsible for handling this. Consumers subscribe to changes and can be notified about updates.

This is a first step which just introduces the type, but doesn't force users to consume changes or remove the current places settings are exposed. Instead, it just encapsulates the changes.

Implementation details

  • Introduce SettingsManager
  • Move code duplicated in DynamicConfigurationManager and ConfigureIntegration into SettingsManager
  • Create a new instance of SettingsManager (and maintain it throughout the app lifetime)
  • Subscribe to changes one time in TracerManager to do the "full rebuild"
    • This is a stop gap before we use it "properly" and stop exposing the settings on TracerSettings

Test coverage

  • Mostly a refactor so covered by integration tests
  • Unit tests for SettingsManager functionality

Other details

https://datadoghq.atlassian.net/browse/LANGPLAT-819

Part of a config stack

@andrewlock andrewlock added area:tracer The core tracer library (Datadog.Trace, does not include OpenTracing, native code, or integrations) type:refactor area:dynamic-configuration labels Oct 22, 2025
andrewlock added a commit that referenced this pull request Oct 22, 2025
…tIntegrationAnalyticsSampleRate()` (#7544)

## Summary of changes

Fix usages of `IsIntegrationEnabled()`, `IsErrorStatusCode()`, and
`GetIntegrationAnalyticsSampleRate()` to use `MutableSettings` instead
of `TracerSettings`

## Reason for change

These functions are dependent on `MutableSettings`, and are exposed
there, so making sure we call the methods there, and remove the
delegation from `TracerSettings` entirely.

## Implementation details

- Find and replace usages
- Remove the old delegating methods

## Test coverage

Just a refactor, so covered by existing tests

## Other details

https://datadoghq.atlassian.net/browse/LANGPLAT-819

Part of a config stack

- #7522
- #7525
- #7530
- #7532
- #7543
- #7544 👈
- #7695
Base automatically changed from andrew/settings/4b-fix-integration-enabled to master October 22, 2025 12:16
@dd-trace-dotnet-ci-bot
Copy link

dd-trace-dotnet-ci-bot bot commented Oct 22, 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.8) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7695) - mean (85ms)  : crit, 77, 92
     .   : crit, milestone, 85,
    master - mean (72ms)  : 71, 73
     .   : milestone, 72,

    section Baseline
    This PR (7695) - mean (81ms)  : 71, 92
     .   : milestone, 81,
    master - mean (68ms)  : 66, 69
     .   : milestone, 68,

    section CallTarget+Inlining+NGEN
    This PR (7695) - mean (1,161ms)  : crit, 1076, 1246
     .   : crit, milestone, 1161,
    master - mean (1,040ms)  : 997, 1084
     .   : milestone, 1040,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7695) - mean (127ms)  : crit, 115, 140
     .   : crit, milestone, 127,
    master - mean (106ms)  : 105, 108
     .   : milestone, 106,

    section Baseline
    This PR (7695) - mean (128ms)  : 115, 141
     .   : milestone, 128,
    master - mean (105ms)  : 103, 107
     .   : milestone, 105,

    section CallTarget+Inlining+NGEN
    This PR (7695) - mean (838ms)  : crit, 788, 889
     .   : crit, milestone, 838,
    master - mean (746ms)  : 720, 772
     .   : milestone, 746,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7695) - mean (107ms)  : crit, 100, 115
     .   : crit, milestone, 107,
    master - mean (94ms)  : 93, 95
     .   : milestone, 94,

    section Baseline
    This PR (7695) - mean (108ms)  : 100, 115
     .   : milestone, 108,
    master - mean (93ms)  : 91, 95
     .   : milestone, 93,

    section CallTarget+Inlining+NGEN
    This PR (7695) - mean (790ms)  : crit, 710, 871
     .   : crit, milestone, 790,
    master - mean (707ms)  : 672, 742
     .   : milestone, 707,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET 8) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7695) - mean (109ms)  : crit, 100, 119
     .   : crit, milestone, 109,
    master - mean (92ms)  : 91, 93
     .   : milestone, 92,

    section Baseline
    This PR (7695) - mean (110ms)  : 101, 119
     .   : milestone, 110,
    master - mean (91ms)  : 89, 93
     .   : milestone, 91,

    section CallTarget+Inlining+NGEN
    This PR (7695) - mean (742ms)  : crit, 699, 785
     .   : crit, milestone, 742,
    master - mean (661ms)  : 646, 676
     .   : milestone, 661,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Framework 4.8) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7695) - mean (197ms)  : 194, 201
     .   : milestone, 197,
    master - mean (195ms)  : 192, 197
     .   : milestone, 195,

    section Baseline
    This PR (7695) - mean (193ms)  : 190, 196
     .   : milestone, 193,
    master - mean (191ms)  : 189, 194
     .   : milestone, 191,

    section CallTarget+Inlining+NGEN
    This PR (7695) - mean (1,172ms)  : 1109, 1234
     .   : milestone, 1172,
    master - mean (1,156ms)  : 1094, 1218
     .   : milestone, 1156,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7695) - mean (278ms)  : 274, 283
     .   : milestone, 278,
    master - mean (275ms)  : 272, 279
     .   : milestone, 275,

    section Baseline
    This PR (7695) - mean (279ms)  : 273, 285
     .   : milestone, 279,
    master - mean (276ms)  : 271, 281
     .   : milestone, 276,

    section CallTarget+Inlining+NGEN
    This PR (7695) - mean (947ms)  : 897, 997
     .   : milestone, 947,
    master - mean (942ms)  : 903, 980
     .   : milestone, 942,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7695) - mean (270ms)  : 267, 274
     .   : milestone, 270,
    master - mean (268ms)  : 264, 272
     .   : milestone, 268,

    section Baseline
    This PR (7695) - mean (271ms)  : 266, 276
     .   : milestone, 271,
    master - mean (267ms)  : 264, 271
     .   : milestone, 267,

    section CallTarget+Inlining+NGEN
    This PR (7695) - mean (936ms)  : 881, 990
     .   : milestone, 936,
    master - mean (922ms)  : 875, 969
     .   : milestone, 922,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET 8) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7695) - mean (273ms)  : 265, 281
     .   : milestone, 273,
    master - mean (266ms)  : 262, 269
     .   : milestone, 266,

    section Baseline
    This PR (7695) - mean (272ms)  : 266, 277
     .   : milestone, 272,
    master - mean (266ms)  : 260, 271
     .   : milestone, 266,

    section CallTarget+Inlining+NGEN
    This PR (7695) - mean (855ms)  : 830, 880
     .   : milestone, 855,
    master - mean (850ms)  : 828, 872
     .   : milestone, 850,

Loading

@andrewlock andrewlock force-pushed the andrew/settings/4-mutable-settings-service branch from c29eb56 to 9c790a3 Compare October 22, 2025 14:05
@pr-commenter
Copy link

pr-commenter bot commented Oct 22, 2025

Benchmarks

Benchmarks Report for benchmark platform 🐌

Benchmarks for #7695 compared to master:

  • 1 benchmarks are faster, with geometric mean 2.113
  • 1 benchmarks are slower, with geometric mean 2.392
  • 4 benchmarks have fewer allocations
  • 4 benchmarks have more 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 11.1μs 36.7ns 142ns 0 0 0 5.51 KB
master StartStopWithChild netcoreapp3.1 13.4μs 69.2ns 360ns 0 0 0 5.7 KB
master StartStopWithChild net472 22.1μs 120ns 697ns 1.07 0.32 0.107 6.09 KB
#7695 StartStopWithChild net6.0 10.9μs 59.7ns 337ns 0 0 0 5.5 KB
#7695 StartStopWithChild netcoreapp3.1 13.8μs 43.7ns 169ns 0 0 0 5.68 KB
#7695 StartStopWithChild net472 22.4μs 126ns 834ns 1.07 0.321 0.107 6.07 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 942μs 288ns 1.12μs 0 0 0 2.71 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 1.02ms 210ns 812ns 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces net472 1.2ms 37.3ns 135ns 0 0 0 3.31 KB
#7695 WriteAndFlushEnrichedTraces net6.0 934μs 481ns 1.86μs 0 0 0 2.71 KB
#7695 WriteAndFlushEnrichedTraces netcoreapp3.1 1.01ms 109ns 394ns 0 0 0 2.7 KB
#7695 WriteAndFlushEnrichedTraces net472 1.22ms 315ns 1.18μs 0 0 0 3.31 KB
Benchmarks.Trace.Asm.AppSecBodyBenchmark - Unknown 🤷 Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master AllCycleSimpleBody net6.0 N/A N/A N/A NaN NaN NaN 0 b
master AllCycleSimpleBody netcoreapp3.1 N/A N/A N/A NaN NaN NaN 0 b
master AllCycleSimpleBody net472 N/A N/A N/A NaN NaN NaN 0 b
master AllCycleMoreComplexBody net6.0 N/A N/A N/A NaN NaN NaN 0 b
master AllCycleMoreComplexBody netcoreapp3.1 N/A N/A N/A NaN NaN NaN 0 b
master AllCycleMoreComplexBody net472 N/A N/A N/A NaN NaN NaN 0 b
master ObjectExtractorSimpleBody net6.0 315ns 1.8ns 13.1ns 0 0 0 280 B
master ObjectExtractorSimpleBody netcoreapp3.1 415ns 2.23ns 12ns 0 0 0 272 B
master ObjectExtractorSimpleBody net472 296ns 0.0431ns 0.167ns 0.0433 0 0 281 B
master ObjectExtractorMoreComplexBody net6.0 6.24μs 30.4ns 129ns 0 0 0 3.78 KB
master ObjectExtractorMoreComplexBody netcoreapp3.1 7.79μs 37.2ns 158ns 0 0 0 3.69 KB
master ObjectExtractorMoreComplexBody net472 6.64μs 4.22ns 16.3ns 0.596 0 0 3.8 KB
#7695 AllCycleSimpleBody net6.0 N/A N/A N/A NaN NaN NaN 0 b
#7695 AllCycleSimpleBody netcoreapp3.1 N/A N/A N/A NaN NaN NaN 0 b
#7695 AllCycleSimpleBody net472 N/A N/A N/A NaN NaN NaN 0 b
#7695 AllCycleMoreComplexBody net6.0 N/A N/A N/A NaN NaN NaN 0 b
#7695 AllCycleMoreComplexBody netcoreapp3.1 N/A N/A N/A NaN NaN NaN 0 b
#7695 AllCycleMoreComplexBody net472 N/A N/A N/A NaN NaN NaN 0 b
#7695 ObjectExtractorSimpleBody net6.0 329ns 1.77ns 9.87ns 0 0 0 280 B
#7695 ObjectExtractorSimpleBody netcoreapp3.1 397ns 2.23ns 15.1ns 0 0 0 272 B
#7695 ObjectExtractorSimpleBody net472 300ns 0.0287ns 0.111ns 0.0438 0 0 281 B
#7695 ObjectExtractorMoreComplexBody net6.0 6.31μs 34ns 189ns 0 0 0 3.78 KB
#7695 ObjectExtractorMoreComplexBody netcoreapp3.1 7.8μs 35.5ns 137ns 0 0 0 3.69 KB
#7695 ObjectExtractorMoreComplexBody net472 6.64μs 3.61ns 14ns 0.598 0 0 3.8 KB
Benchmarks.Trace.Asm.AppSecEncoderBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EncodeArgs net6.0 77.1μs 247ns 923ns 0 0 0 32.4 KB
master EncodeArgs netcoreapp3.1 97.1μs 270ns 973ns 0 0 0 32.4 KB
master EncodeArgs net472 112μs 14.1ns 54.5ns 5.05 0 0 32.51 KB
master EncodeLegacyArgs net6.0 141μs 14.7ns 56.9ns 0 0 0 2.15 KB
master EncodeLegacyArgs netcoreapp3.1 199μs 589ns 2.28μs 0 0 0 2.14 KB
master EncodeLegacyArgs net472 264μs 91.4ns 342ns 0 0 0 2.16 KB
#7695 EncodeArgs net6.0 77.7μs 86.5ns 335ns 0 0 0 32.4 KB
#7695 EncodeArgs netcoreapp3.1 96.3μs 434ns 1.68μs 0 0 0 32.4 KB
#7695 EncodeArgs net472 110μs 12.7ns 45.7ns 4.95 0 0 32.51 KB
#7695 EncodeLegacyArgs net6.0 144μs 25ns 93.5ns 0 0 0 2.15 KB
#7695 EncodeLegacyArgs netcoreapp3.1 196μs 193ns 720ns 0 0 0 2.14 KB
#7695 EncodeLegacyArgs net472 261μs 30.8ns 119ns 0 0 0 2.16 KB
Benchmarks.Trace.Asm.AppSecWafBenchmark - Slower ⚠️ Same allocations ✔️

Slower ⚠️ in #7695

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack‑netcoreapp3.1 2.392 302,738.03 724,288.57

Faster 🎉 in #7695

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark‑netcoreapp3.1 2.113 863,571.46 408,757.92

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master RunWafRealisticBenchmark net6.0 395μs 111ns 401ns 0 0 0 4.56 KB
master RunWafRealisticBenchmark netcoreapp3.1 824μs 12.8μs 127μs 0 0 0 4.48 KB
master RunWafRealisticBenchmark net472 428μs 63ns 244ns 0 0 0 4.66 KB
master RunWafRealisticBenchmarkWithAttack net6.0 285μs 49.3ns 185ns 0 0 0 2.24 KB
master RunWafRealisticBenchmarkWithAttack netcoreapp3.1 303μs 133ns 496ns 0 0 0 2.22 KB
master RunWafRealisticBenchmarkWithAttack net472 309μs 45ns 174ns 0 0 0 2.29 KB
#7695 RunWafRealisticBenchmark net6.0 389μs 138ns 499ns 0 0 0 4.55 KB
#7695 RunWafRealisticBenchmark netcoreapp3.1 409μs 309ns 1.2μs 0 0 0 4.48 KB
#7695 RunWafRealisticBenchmark net472 430μs 57.8ns 224ns 0 0 0 4.66 KB
#7695 RunWafRealisticBenchmarkWithAttack net6.0 286μs 39.2ns 141ns 0 0 0 2.24 KB
#7695 RunWafRealisticBenchmarkWithAttack netcoreapp3.1 720μs 3.12μs 12.1μs 0 0 0 2.22 KB
#7695 RunWafRealisticBenchmarkWithAttack net472 309μs 16.9ns 60.8ns 0 0 0 2.29 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 61.5μs 28.7ns 103ns 0 0 0 14.52 KB
master SendRequest netcoreapp3.1 73.3μs 370ns 1.57μs 0 0 0 17.42 KB
master SendRequest net472 0.00229ns 0.00138ns 0.00536ns 0 0 0 0 b
#7695 SendRequest net6.0 61.7μs 49ns 183ns 0 0 0 14.52 KB
#7695 SendRequest netcoreapp3.1 71.2μs 93.4ns 362ns 0 0 0 17.42 KB
#7695 SendRequest net472 0.00628ns 0.00219ns 0.00849ns 0 0 0 0 b
Benchmarks.Trace.CharSliceBenchmark - Same speed ✔️ Fewer allocations 🎉

Fewer allocations 🎉 in #7695

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net472 48 B 47 B -1 B -2.08%
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net6.0 3 B 2 B -1 B -33.33%
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net6.0 7 B 2 B -5 B -71.43%
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑netcoreapp3.1 1 B 0 b -1 B -100.00%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master OriginalCharSlice net6.0 2.03ms 2.52μs 9.75μs 0 0 0 640.01 KB
master OriginalCharSlice netcoreapp3.1 2.08ms 6.3μs 24.4μs 0 0 0 640 KB
master OriginalCharSlice net472 2.7ms 94.9ns 342ns 100 0 0 641.95 KB
master OptimizedCharSlice net6.0 1.42ms 113ns 409ns 0 0 0 7 B
master OptimizedCharSlice netcoreapp3.1 1.67ms 417ns 1.61μs 0 0 0 1 B
master OptimizedCharSlice net472 1.95ms 530ns 2.05μs 0 0 0 73 B
master OptimizedCharSliceWithPool net6.0 846μs 41.7ns 156ns 0 0 0 3 B
master OptimizedCharSliceWithPool netcoreapp3.1 829μs 94.3ns 365ns 0 0 0 1 B
master OptimizedCharSliceWithPool net472 1.2ms 184ns 712ns 0 0 0 48 B
#7695 OriginalCharSlice net6.0 1.92ms 257ns 960ns 0 0 0 640.01 KB
#7695 OriginalCharSlice netcoreapp3.1 2.1ms 6.57μs 27.9μs 0 0 0 640 KB
#7695 OriginalCharSlice net472 2.67ms 3.22μs 12.5μs 100 0 0 641.95 KB
#7695 OptimizedCharSlice net6.0 1.4ms 436ns 1.63μs 0 0 0 2 B
#7695 OptimizedCharSlice netcoreapp3.1 1.64ms 425ns 1.65μs 0 0 0 1 B
#7695 OptimizedCharSlice net472 1.96ms 260ns 1.01μs 0 0 0 73 B
#7695 OptimizedCharSliceWithPool net6.0 883μs 43.4ns 168ns 0 0 0 2 B
#7695 OptimizedCharSliceWithPool netcoreapp3.1 869μs 70.4ns 273ns 0 0 0 0 b
#7695 OptimizedCharSliceWithPool net472 1.21ms 166ns 643ns 0 0 0 47 B
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed ✔️ More allocations ⚠️

More allocations ⚠️ in #7695

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net472 55.61 KB 56.32 KB 711 B 1.28%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 645μs 601ns 2.33μs 0 0 0 41.78 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 712μs 3.87μs 20.9μs 0 0 0 42.05 KB
master WriteAndFlushEnrichedTraces net472 896μs 3.34μs 12.5μs 4.46 0 0 55.61 KB
#7695 WriteAndFlushEnrichedTraces net6.0 681μs 3.63μs 18.8μs 0 0 0 41.61 KB
#7695 WriteAndFlushEnrichedTraces netcoreapp3.1 705μs 3.68μs 17.3μs 0 0 0 41.99 KB
#7695 WriteAndFlushEnrichedTraces net472 875μs 1.77μs 6.12μs 8.33 0 0 56.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.87μs 3.3ns 12.8ns 0 0 0 1.02 KB
master ExecuteNonQuery netcoreapp3.1 2.68μs 9.23ns 35.7ns 0 0 0 1.02 KB
master ExecuteNonQuery net472 2.8μs 4.94ns 19.1ns 0.156 0.0142 0 987 B
#7695 ExecuteNonQuery net6.0 1.89μs 9.36ns 39.7ns 0 0 0 1.02 KB
#7695 ExecuteNonQuery netcoreapp3.1 2.62μs 7.46ns 27.9ns 0 0 0 1.02 KB
#7695 ExecuteNonQuery net472 2.82μs 12.8ns 58.8ns 0.153 0.0139 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.69μs 9.07ns 49.7ns 0 0 0 1.03 KB
master CallElasticsearch netcoreapp3.1 2.18μs 11.4ns 53.5ns 0 0 0 1.03 KB
master CallElasticsearch net472 3.58μs 4.16ns 16.1ns 0.161 0 0 1.04 KB
master CallElasticsearchAsync net6.0 1.83μs 1.99ns 7.72ns 0 0 0 1.01 KB
master CallElasticsearchAsync netcoreapp3.1 2.35μs 11.9ns 47.5ns 0 0 0 1.08 KB
master CallElasticsearchAsync net472 3.59μs 2.1ns 7.87ns 0.161 0 0 1.1 KB
#7695 CallElasticsearch net6.0 1.79μs 2.32ns 8.97ns 0 0 0 1.03 KB
#7695 CallElasticsearch netcoreapp3.1 2.2μs 10.2ns 38.2ns 0 0 0 1.03 KB
#7695 CallElasticsearch net472 3.58μs 13.5ns 52.1ns 0.163 0 0 1.04 KB
#7695 CallElasticsearchAsync net6.0 1.91μs 3.33ns 12.9ns 0 0 0 1.01 KB
#7695 CallElasticsearchAsync netcoreapp3.1 2.59μs 12.2ns 48.7ns 0 0 0 1.08 KB
#7695 CallElasticsearchAsync net472 3.68μs 2.17ns 8.39ns 0.166 0 0 1.1 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.83μs 8.88ns 35.5ns 0 0 0 952 B
master ExecuteAsync netcoreapp3.1 2.58μs 5.79ns 22.4ns 0 0 0 952 B
master ExecuteAsync net472 2.6μs 6.41ns 24.8ns 0.142 0 0 915 B
#7695 ExecuteAsync net6.0 1.86μs 8.01ns 30ns 0 0 0 952 B
#7695 ExecuteAsync netcoreapp3.1 2.39μs 7.8ns 30.2ns 0 0 0 952 B
#7695 ExecuteAsync net472 2.59μs 5.45ns 21.1ns 0.141 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 6.95μs 12.7ns 47.4ns 0 0 0 2.36 KB
master SendAsync netcoreapp3.1 8.7μs 31.4ns 122ns 0 0 0 2.9 KB
master SendAsync net472 12.4μs 6.52ns 25.2ns 0.492 0 0 3.18 KB
#7695 SendAsync net6.0 7.04μs 14.3ns 55.3ns 0 0 0 2.36 KB
#7695 SendAsync netcoreapp3.1 8.98μs 17.2ns 66.5ns 0 0 0 2.9 KB
#7695 SendAsync net472 12.4μs 13.2ns 51.1ns 0.495 0 0 3.18 KB
Benchmarks.Trace.Iast.StringAspectsBenchmark - Same speed ✔️ More allocations ⚠️

More allocations ⚠️ in #7695

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0 258.03 KB 279.37 KB 21.34 KB 8.27%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net6.0 43.44 KB 45.13 KB 1.69 KB 3.89%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1 273.05 KB 275.23 KB 2.18 KB 0.80%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StringConcatBenchmark net6.0 45μs 257ns 1.93μs 0 0 0 43.44 KB
master StringConcatBenchmark netcoreapp3.1 53μs 545ns 5.11μs 0 0 0 42.78 KB
master StringConcatBenchmark net472 57.3μs 308ns 1.57μs 0 0 0 57.34 KB
master StringConcatAspectBenchmark net6.0 455μs 2.23μs 9.96μs 0 0 0 258.03 KB
master StringConcatAspectBenchmark netcoreapp3.1 521μs 2.26μs 8.46μs 0 0 0 273.05 KB
master StringConcatAspectBenchmark net472 406μs 2.23μs 12.6μs 0 0 0 278.53 KB
#7695 StringConcatBenchmark net6.0 46.4μs 354ns 3.36μs 0 0 0 45.13 KB
#7695 StringConcatBenchmark netcoreapp3.1 49.2μs 286ns 2.38μs 0 0 0 42.7 KB
#7695 StringConcatBenchmark net472 56.6μs 298ns 1.43μs 0 0 0 57.34 KB
#7695 StringConcatAspectBenchmark net6.0 499μs 1.99μs 6.88μs 0 0 0 279.37 KB
#7695 StringConcatAspectBenchmark netcoreapp3.1 508μs 1.97μs 7.1μs 0 0 0 275.23 KB
#7695 StringConcatAspectBenchmark net472 406μs 2.16μs 13.3μs 0 0 0 278.53 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 2.66μs 0.541ns 2.02ns 0 0 0 1.7 KB
master EnrichedLog netcoreapp3.1 3.53μs 17.1ns 72.7ns 0 0 0 1.7 KB
master EnrichedLog net472 4.05μs 4.5ns 17.4ns 0.243 0 0 1.64 KB
#7695 EnrichedLog net6.0 2.7μs 13.8ns 66ns 0 0 0 1.7 KB
#7695 EnrichedLog netcoreapp3.1 3.72μs 13.6ns 52.7ns 0 0 0 1.7 KB
#7695 EnrichedLog net472 3.81μs 2.34ns 8.1ns 0.247 0 0 1.64 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 124μs 80.5ns 312ns 0 0 0 4.31 KB
master EnrichedLog netcoreapp3.1 127μs 68.5ns 256ns 0 0 0 4.31 KB
master EnrichedLog net472 170μs 193ns 746ns 0 0 0 4.52 KB
#7695 EnrichedLog net6.0 124μs 87.1ns 337ns 0 0 0 4.31 KB
#7695 EnrichedLog netcoreapp3.1 127μs 67.9ns 254ns 0 0 0 4.31 KB
#7695 EnrichedLog net472 168μs 83ns 321ns 0 0 0 4.52 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 5.02μs 13.3ns 51.4ns 0 0 0 2.26 KB
master EnrichedLog netcoreapp3.1 6.69μs 22.2ns 85.9ns 0 0 0 2.26 KB
master EnrichedLog net472 7.75μs 8.73ns 33.8ns 0.31 0 0 2.08 KB
#7695 EnrichedLog net6.0 5.05μs 21.4ns 82.8ns 0 0 0 2.26 KB
#7695 EnrichedLog netcoreapp3.1 6.93μs 21.4ns 83.1ns 0 0 0 2.26 KB
#7695 EnrichedLog net472 7.5μs 3.36ns 13ns 0.3 0 0 2.08 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 2.02μs 5.79ns 22.4ns 0 0 0 1.2 KB
master SendReceive netcoreapp3.1 2.62μs 9.68ns 37.5ns 0 0 0 1.2 KB
master SendReceive net472 3.1μs 1.91ns 7.39ns 0.185 0 0 1.2 KB
#7695 SendReceive net6.0 2.01μs 9.44ns 37.7ns 0 0 0 1.2 KB
#7695 SendReceive netcoreapp3.1 2.61μs 10.4ns 40.3ns 0 0 0 1.2 KB
#7695 SendReceive net472 3.31μs 2.85ns 9.87ns 0.184 0 0 1.2 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 4.23μs 5.67ns 22ns 0 0 0 1.58 KB
master EnrichedLog netcoreapp3.1 5.53μs 12.5ns 48.2ns 0 0 0 1.63 KB
master EnrichedLog net472 6.39μs 6.69ns 25ns 0.32 0 0 2.03 KB
#7695 EnrichedLog net6.0 4.38μs 2.17ns 8.41ns 0 0 0 1.58 KB
#7695 EnrichedLog netcoreapp3.1 5.65μs 5.13ns 18.5ns 0 0 0 1.63 KB
#7695 EnrichedLog net472 6.58μs 5.76ns 21.6ns 0.296 0 0 2.03 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 763ns 3.94ns 19.3ns 0 0 0 576 B
master StartFinishSpan netcoreapp3.1 967ns 4.88ns 21.3ns 0 0 0 576 B
master StartFinishSpan net472 955ns 0.17ns 0.636ns 0.0909 0 0 578 B
master StartFinishScope net6.0 905ns 4.64ns 20.7ns 0 0 0 696 B
master StartFinishScope netcoreapp3.1 1.19μs 6.4ns 34.5ns 0 0 0 696 B
master StartFinishScope net472 1.14μs 0.463ns 1.79ns 0.103 0 0 658 B
#7695 StartFinishSpan net6.0 777ns 1.28ns 4.94ns 0 0 0 576 B
#7695 StartFinishSpan netcoreapp3.1 980ns 0.244ns 0.943ns 0 0 0 576 B
#7695 StartFinishSpan net472 957ns 0.169ns 0.632ns 0.0914 0 0 578 B
#7695 StartFinishScope net6.0 920ns 0.804ns 3.11ns 0 0 0 696 B
#7695 StartFinishScope netcoreapp3.1 1.21μs 5.32ns 20.6ns 0 0 0 696 B
#7695 StartFinishScope net472 1.14μs 0.711ns 2.75ns 0.102 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 1.06μs 0.909ns 3.15ns 0 0 0 696 B
master RunOnMethodBegin netcoreapp3.1 1.42μs 6.95ns 29.5ns 0 0 0 696 B
master RunOnMethodBegin net472 1.45μs 2.29ns 8.86ns 0.101 0 0 658 B
#7695 RunOnMethodBegin net6.0 1.04μs 5.11ns 20.4ns 0 0 0 696 B
#7695 RunOnMethodBegin netcoreapp3.1 1.39μs 7.4ns 37ns 0 0 0 697 B
#7695 RunOnMethodBegin net472 1.42μs 0.733ns 2.84ns 0.0999 0 0 658 B

@andrewlock andrewlock force-pushed the andrew/settings/4-mutable-settings-service branch from 9c790a3 to 9f05223 Compare October 22, 2025 16:39
@andrewlock
Copy link
Member Author

@codex review

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. Chef's kiss.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@andrewlock andrewlock force-pushed the andrew/settings/4-mutable-settings-service branch from 9f05223 to 6b9a134 Compare October 24, 2025 16:42
@datadog-datadog-prod-us1
Copy link

datadog-datadog-prod-us1 bot commented Oct 24, 2025

⚠️ Tests

⚠️ Warnings

🧪 2 Tests failed

TestEventHubsEnumerableIntegrationWithoutBatchLinks from Datadog.Trace.ClrProfiler.IntegrationTests.Azure.AzureEventHubsTests (Datadog)
Expected receiveSpans to contain 1 item(s) because Expected 1 receive span, but found 2: {{TraceId: 15423160404093118151, SpanId: 1636482117609792554, Name: azure_eventhubs.receive, Resource: samples-eventhubs-hub, Service: Samples.AzureEventHubs}, {TraceId: 6492559047774480397, SpanId: 5290906938567818767, Name: azure_eventhubs.receive, Resource: samples-eventhubs-hub, Service: Samples.AzureEventHubs}}.
TestSessionTimeoutVulnerability from Datadog.Trace.Security.IntegrationTests.Iast.AspNetCore5IastTestsRestartedSampleIastEnabled (Datadog)
Couldn't verify the application is ready to receive requests.

ℹ️ Info

❄️ No new flaky tests detected

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 36d5027 | Docs | Datadog PR Page | Was this helpful? Give us feedback!

@andrewlock andrewlock force-pushed the andrew/settings/4-mutable-settings-service branch from 6b9a134 to c04decc Compare October 28, 2025 12:46
@andrewlock andrewlock changed the base branch from master to andrew/settings/4b-helper October 28, 2025 13:11
@andrewlock andrewlock force-pushed the andrew/settings/4-mutable-settings-service branch from c04decc to 60c7874 Compare October 28, 2025 13:41
@andrewlock andrewlock force-pushed the andrew/settings/4b-helper branch from a6b40ae to 1ed4e84 Compare October 28, 2025 13:41
@andrewlock andrewlock marked this pull request as ready for review October 28, 2025 13:41
@andrewlock andrewlock requested review from a team as code owners October 28, 2025 13:41
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@andrewlock andrewlock force-pushed the andrew/settings/4-mutable-settings-service branch from 60c7874 to c691a0e Compare October 28, 2025 15:20
@andrewlock andrewlock force-pushed the andrew/settings/4b-helper branch from 1ed4e84 to 1477479 Compare October 28, 2025 15:20
andrewlock

This comment was marked as resolved.

andrewlock

This comment was marked as resolved.

andrewlock

This comment was marked as resolved.

@andrewlock andrewlock force-pushed the andrew/settings/4-mutable-settings-service branch from c691a0e to a52caed Compare October 28, 2025 18:13
@andrewlock andrewlock requested review from a team as code owners October 28, 2025 18:13
@andrewlock andrewlock requested review from anna-git and removed request for a team October 28, 2025 18:13
@andrewlock andrewlock force-pushed the andrew/settings/4b-helper branch from 1477479 to e27c515 Compare October 28, 2025 18:13
andrewlock added a commit that referenced this pull request Oct 31, 2025
…ndows (#7721)

## Summary of changes

Enforces that you can't _change_ the `AgentUri` to be a UDS Uri if
you're on Windows

## Reason for change

The trace exporter doesn't work with UDS on Windows, so we have a check
in `TracerSettings` that disables the pipeline if we find this scenario.
However, user's can still _change_ the agent URI at runtime in code (😭).

We currently assume that the data pipeline won't be toggled at runtime
(we _do_ allow for reconfiguring it in general, but not for completely
removing or reintroducing). Changing this to allow the scenario would be
a pain, so instead this PR blocks you from setting a UDS URI in code if
you're on Windows.

The good news is that as far as I can tell, noone does this today, so
while _technically_ it could be considered a breaking change, I think
it's ok.

## Implementation details

- Throw an `ArgumentException` in the Datadog.Trace.Manual library, if
you're on Windows (or .NET FX) and you try to set a UDS agent URI (using
the same "detection" we do in `ExporterSettings`.
- Add a check in the Instrumentation of `Tracer.Configure()` to make
sure it hasn't slipped through. This could happen if a customer was
using an old version of the Datadog.Trace NuGet package with a newer
version of auto instrumentation.

Note that this adds two additional framework references for .NET Core
3.1+, to check if we're on Windows.

## Test coverage

Added an extra step to the manual instrumentation integration test to
confirm we throw

## Other details

https://datadoghq.atlassian.net/browse/LANGPLAT-819

Part of a config stack

- #7522
- #7525
- #7530
- #7532
- #7543
- #7544
- #7721 👈
- #7722
- #7695
- #7723
- #7724
@andrewlock andrewlock force-pushed the andrew/settings/4-mutable-settings-service branch from a52caed to 36d5027 Compare October 31, 2025 18:04
@andrewlock andrewlock requested review from a team as code owners October 31, 2025 18:04
@andrewlock andrewlock force-pushed the andrew/settings/4b-helper branch from e27c515 to 41ce09f Compare October 31, 2025 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:dynamic-configuration area:tracer The core tracer library (Datadog.Trace, does not include OpenTracing, native code, or integrations) type:refactor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants