Skip to content

Conversation

GreenMatan
Copy link
Contributor

@GreenMatan GreenMatan commented Aug 27, 2025

Summary of changes

Most of the work for DI&ER to support Stable Config is already done in #7304.
This PR completes the effort by decoupling DI/ER env vars from the native side of the tracer.

For DI/ER products to function correctly, the native side, among other things, need to inject a new field into each and every StateMachine type that is generated for async methods. Our injected field is used during the execution of DI/ER instrumentation to capture continuation of async flows.
The only point in time where it's possible to change type's layout is in ModuleLoadFinished event, and this event is fired only once per module.
Until Stable Configuration we only injected that field when DI/ER env vars were enable, but now we can not rely on these env var anymore as they're no longer the source of truth. With Stable Config we can not know if DI/ER will be enabled or not at startup. To accommodate that, the native side now acts as if DI/ER is enabled, just in case it will.
This is true not only for Stable Config, but also for Remote Enablement.

There are two new env vars:

  1. DD_DYNAMIC_INSTRUMENTATION_MANAGED_ACTIVATION_ENABLED
  2. DD_EXCEPTION_REPLAY_MANAGED_ACTIVATION_ENABLED

These env vars, as described in Stable Config Standby mode doc, are used to deactivate hot standby for ER/DI in case it'll be needed in the future, as a kill switch.

Reason for change

Fully support Stable Config.

Resolves DEBUG-4421

@dd-trace-dotnet-ci-bot
Copy link

dd-trace-dotnet-ci-bot bot commented Aug 27, 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 (7441) - mean (72ms)  : 72, 73
     .   : milestone, 72,
    master - mean (72ms)  : 71, 73
     .   : milestone, 72,

    section Baseline
    This PR (7441) - mean (69ms)  : 64, 74
     .   : milestone, 69,
    master - mean (69ms)  : 63, 76
     .   : milestone, 69,

    section CallTarget+Inlining+NGEN
    This PR (7441) - mean (993ms)  : 967, 1018
     .   : milestone, 993,
    master - mean (989ms)  : 965, 1013
     .   : milestone, 989,

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

    section Baseline
    This PR (7441) - mean (107ms)  : 104, 109
     .   : milestone, 107,
    master - mean (106ms)  : 104, 108
     .   : milestone, 106,

    section CallTarget+Inlining+NGEN
    This PR (7441) - mean (708ms)  : 691, 724
     .   : milestone, 708,
    master - mean (701ms)  : 679, 723
     .   : milestone, 701,

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

    section Baseline
    This PR (7441) - mean (94ms)  : 92, 95
     .   : milestone, 94,
    master - mean (93ms)  : 92, 95
     .   : milestone, 93,

    section CallTarget+Inlining+NGEN
    This PR (7441) - mean (663ms)  : 644, 682
     .   : milestone, 663,
    master - mean (657ms)  : 635, 679
     .   : milestone, 657,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET 8) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7441) - mean (93ms)  : 92, 95
     .   : milestone, 93,
    master - mean (93ms)  : 92, 95
     .   : milestone, 93,

    section Baseline
    This PR (7441) - mean (92ms)  : 90, 95
     .   : milestone, 92,
    master - mean (92ms)  : 90, 94
     .   : milestone, 92,

    section CallTarget+Inlining+NGEN
    This PR (7441) - mean (592ms)  : 580, 603
     .   : milestone, 592,
    master - mean (598ms)  : 588, 607
     .   : milestone, 598,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Framework 4.8) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7441) - mean (198ms)  : 195, 202
     .   : milestone, 198,
    master - mean (190ms)  : 184, 197
     .   : milestone, 190,

    section Baseline
    This PR (7441) - mean (195ms)  : 187, 202
     .   : milestone, 195,
    master - mean (186ms)  : 178, 194
     .   : milestone, 186,

    section CallTarget+Inlining+NGEN
    This PR (7441) - mean (1,117ms)  : 1083, 1151
     .   : milestone, 1117,
    master - mean (1,075ms)  : 1039, 1111
     .   : milestone, 1075,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7441) - mean (280ms)  : 275, 284
     .   : milestone, 280,
    master - mean (269ms)  : 260, 279
     .   : milestone, 269,

    section Baseline
    This PR (7441) - mean (279ms)  : 274, 285
     .   : milestone, 279,
    master - mean (267ms)  : 258, 276
     .   : milestone, 267,

    section CallTarget+Inlining+NGEN
    This PR (7441) - mean (905ms)  : 864, 946
     .   : milestone, 905,
    master - mean (867ms)  : 840, 894
     .   : milestone, 867,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7441) - mean (272ms)  : 266, 277
     .   : milestone, 272,
    master - mean (260ms)  : 253, 267
     .   : milestone, 260,

    section Baseline
    This PR (7441) - mean (274ms)  : 268, 280
     .   : milestone, 274,
    master - mean (261ms)  : 253, 269
     .   : milestone, 261,

    section CallTarget+Inlining+NGEN
    This PR (7441) - mean (889ms)  : 844, 934
     .   : milestone, 889,
    master - mean (860ms)  : 822, 898
     .   : milestone, 860,

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

    section Baseline
    This PR (7441) - mean (280ms)  : 266, 294
     .   : milestone, 280,
    master - mean (259ms)  : 251, 268
     .   : milestone, 259,

    section CallTarget+Inlining+NGEN
    This PR (7441) - mean (799ms)  : 770, 829
     .   : milestone, 799,
    master - mean (771ms)  : 747, 795
     .   : milestone, 771,

Loading

@datadog-datadog-prod-us1
Copy link

datadog-datadog-prod-us1 bot commented Aug 27, 2025

⚠️ Tests

⚠️ Warnings

🧪 5 Tests failed

WhenDynamicCodeIsDisabled_DoesNotInstrument from Datadog.Trace.ClrProfiler.IntegrationTests.InstrumentationTests (Datadog)
Expected exit code: 0, actual exit code: -532462766.
WhenDynamicCodeIsDisabled_DoesNotInstrument from Datadog.Trace.ClrProfiler.IntegrationTests.InstrumentationTests (Datadog)
Expected exit code: 0, actual exit code: 134.
WhenDynamicCodeIsDisabled_DoesNotInstrument from Datadog.Trace.ClrProfiler.IntegrationTests.InstrumentationTests (Datadog)
Expected exit code: 0, actual exit code: 255.
View all

ℹ️ Info

❄️ No new flaky tests detected

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

@pr-commenter
Copy link

pr-commenter bot commented Aug 27, 2025

Benchmarks

Benchmarks Report for benchmark platform 🐌

Benchmarks for #7441 compared to master:

  • 1 benchmarks are faster, with geometric mean 2.080
  • 1 benchmarks are slower, with geometric mean 2.434
  • 4 benchmarks have fewer allocations
  • 5 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 ✔️ More allocations ⚠️

More allocations ⚠️ in #7441

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.ActivityBenchmark.StartStopWithChild‑net472 6.04 KB 6.11 KB 67 B 1.11%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartStopWithChild net6.0 10.7μs 48.8ns 189ns 0 0 0 5.5 KB
master StartStopWithChild netcoreapp3.1 13.5μs 70.5ns 330ns 0 0 0 5.69 KB
master StartStopWithChild net472 22.1μs 122ns 751ns 0.96 0.32 0 6.04 KB
#7441 StartStopWithChild net6.0 10.6μs 57.9ns 352ns 0 0 0 5.49 KB
#7441 StartStopWithChild netcoreapp3.1 13.6μs 70.6ns 353ns 0 0 0 5.69 KB
#7441 StartStopWithChild net472 22.3μs 123ns 727ns 0.888 0.333 0 6.11 KB
Benchmarks.Trace.AgentWriterBenchmark - Same speed ✔️ Fewer allocations 🎉

Fewer allocations 🎉 in #7441

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces‑net6.0 2.72 KB 2.7 KB -15 B -0.55%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 931μs 83.3ns 312ns 0 0 0 2.72 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 1.02ms 107ns 400ns 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces net472 1.21ms 97.2ns 364ns 0 0 0 3.31 KB
#7441 WriteAndFlushEnrichedTraces net6.0 948μs 121ns 471ns 0 0 0 2.7 KB
#7441 WriteAndFlushEnrichedTraces netcoreapp3.1 1.03ms 202ns 781ns 0 0 0 2.7 KB
#7441 WriteAndFlushEnrichedTraces net472 1.2ms 1.19μs 4.6μs 0 0 0 3.31 KB
Benchmarks.Trace.Asm.AppSecBodyBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master AllCycleSimpleBody net6.0 323μs 312ns 1.21μs 0 0 0 172.07 KB
master AllCycleSimpleBody netcoreapp3.1 496μs 168ns 582ns 0 0 0 174.19 KB
master AllCycleSimpleBody net472 429μs 132ns 510ns 29.2 0 0 195.47 KB
master AllCycleMoreComplexBody net6.0 326μs 1.63μs 6.72μs 0 0 0 175.58 KB
master AllCycleMoreComplexBody netcoreapp3.1 504μs 186ns 720ns 0 0 0 177.6 KB
master AllCycleMoreComplexBody net472 438μs 191ns 738ns 30.2 0 0 198.98 KB
master ObjectExtractorSimpleBody net6.0 320ns 0.266ns 1.03ns 0 0 0 280 B
master ObjectExtractorSimpleBody netcoreapp3.1 400ns 1.93ns 8.42ns 0 0 0 272 B
master ObjectExtractorSimpleBody net472 301ns 0.0489ns 0.176ns 0.0439 0 0 281 B
master ObjectExtractorMoreComplexBody net6.0 6.2μs 32.7ns 163ns 0 0 0 3.78 KB
master ObjectExtractorMoreComplexBody netcoreapp3.1 7.76μs 33.2ns 129ns 0 0 0 3.69 KB
master ObjectExtractorMoreComplexBody net472 6.74μs 1.73ns 6.69ns 0.574 0 0 3.8 KB
#7441 AllCycleSimpleBody net6.0 326μs 1.44μs 5.57μs 0 0 0 172.08 KB
#7441 AllCycleSimpleBody netcoreapp3.1 476μs 1.82μs 6.81μs 0 0 0 174.18 KB
#7441 AllCycleSimpleBody net472 433μs 221ns 857ns 30.2 0 0 195.46 KB
#7441 AllCycleMoreComplexBody net6.0 329μs 1.09μs 4.24μs 0 0 0 175.58 KB
#7441 AllCycleMoreComplexBody netcoreapp3.1 498μs 1.33μs 4.6μs 0 0 0 177.6 KB
#7441 AllCycleMoreComplexBody net472 438μs 92ns 356ns 30.2 0 0 198.98 KB
#7441 ObjectExtractorSimpleBody net6.0 326ns 0.129ns 0.482ns 0 0 0 280 B
#7441 ObjectExtractorSimpleBody netcoreapp3.1 396ns 2.19ns 13.7ns 0 0 0 272 B
#7441 ObjectExtractorSimpleBody net472 301ns 0.086ns 0.333ns 0.0438 0 0 281 B
#7441 ObjectExtractorMoreComplexBody net6.0 6.34μs 1.63ns 6.3ns 0 0 0 3.78 KB
#7441 ObjectExtractorMoreComplexBody netcoreapp3.1 7.8μs 8.34ns 32.3ns 0 0 0 3.69 KB
#7441 ObjectExtractorMoreComplexBody net472 6.73μs 1.25ns 4.67ns 0.574 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 76.4μs 144ns 556ns 0 0 0 32.4 KB
master EncodeArgs netcoreapp3.1 99μs 42.7ns 165ns 0 0 0 32.4 KB
master EncodeArgs net472 116μs 40.2ns 156ns 4.65 0 0 32.51 KB
master EncodeLegacyArgs net6.0 145μs 30.9ns 119ns 0 0 0 2.15 KB
master EncodeLegacyArgs netcoreapp3.1 199μs 153ns 594ns 0 0 0 2.14 KB
master EncodeLegacyArgs net472 260μs 36.2ns 131ns 0 0 0 2.16 KB
#7441 EncodeArgs net6.0 75.7μs 156ns 582ns 0 0 0 32.4 KB
#7441 EncodeArgs netcoreapp3.1 96.8μs 288ns 1.12μs 0 0 0 32.4 KB
#7441 EncodeArgs net472 116μs 8.89ns 34.4ns 4.62 0 0 32.5 KB
#7441 EncodeLegacyArgs net6.0 148μs 34.1ns 132ns 0 0 0 2.14 KB
#7441 EncodeLegacyArgs netcoreapp3.1 197μs 178ns 666ns 0 0 0 2.14 KB
#7441 EncodeLegacyArgs net472 263μs 28.2ns 102ns 0 0 0 2.16 KB
Benchmarks.Trace.Asm.AppSecWafBenchmark - Slower ⚠️ Same allocations ✔️

Slower ⚠️ in #7441

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack‑netcoreapp3.1 2.434 300,328.35 730,941.92

Faster 🎉 in #7441

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark‑netcoreapp3.1 2.080 862,150.21 414,516.46

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master RunWafRealisticBenchmark net6.0 392μs 50ns 193ns 0 0 0 4.55 KB
master RunWafRealisticBenchmark netcoreapp3.1 813μs 10.7μs 103μs 0 0 0 4.48 KB
master RunWafRealisticBenchmark net472 434μs 50.4ns 195ns 0 0 0 4.66 KB
master RunWafRealisticBenchmarkWithAttack net6.0 291μs 41.5ns 161ns 0 0 0 2.24 KB
master RunWafRealisticBenchmarkWithAttack netcoreapp3.1 300μs 86.3ns 323ns 0 0 0 2.22 KB
master RunWafRealisticBenchmarkWithAttack net472 312μs 63.3ns 245ns 0 0 0 2.29 KB
#7441 RunWafRealisticBenchmark net6.0 398μs 59.7ns 231ns 0 0 0 4.55 KB
#7441 RunWafRealisticBenchmark netcoreapp3.1 414μs 154ns 595ns 0 0 0 4.5 KB
#7441 RunWafRealisticBenchmark net472 439μs 136ns 526ns 0 0 0 4.66 KB
#7441 RunWafRealisticBenchmarkWithAttack net6.0 289μs 46.7ns 175ns 0 0 0 2.24 KB
#7441 RunWafRealisticBenchmarkWithAttack netcoreapp3.1 674μs 13.4μs 134μs 0 0 0 2.22 KB
#7441 RunWafRealisticBenchmarkWithAttack net472 317μs 87.1ns 337ns 0 0 0 2.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 61.4μs 126ns 487ns 0 0 0 14.52 KB
master SendRequest netcoreapp3.1 72.9μs 168ns 651ns 0 0 0 17.42 KB
master SendRequest net472 0.0139ns 0.00232ns 0.00899ns 0 0 0 0 b
#7441 SendRequest net6.0 59.9μs 31.9ns 111ns 0 0 0 14.52 KB
#7441 SendRequest netcoreapp3.1 71.2μs 127ns 476ns 0 0 0 17.42 KB
#7441 SendRequest net472 0.0189ns 0.00203ns 0.00786ns 0 0 0 0 b
Benchmarks.Trace.CharSliceBenchmark - Same speed ✔️ More allocations ⚠️

More allocations ⚠️ in #7441

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑netcoreapp3.1 0 b 1 B 1 B

Fewer allocations 🎉 in #7441

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net6.0 8 B 2 B -6 B -75.00%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master OriginalCharSlice net6.0 1.93ms 537ns 2.01μs 0 0 0 640.01 KB
master OriginalCharSlice netcoreapp3.1 2.11ms 6.25μs 24.2μs 0 0 0 640 KB
master OriginalCharSlice net472 2.6ms 207ns 746ns 100 0 0 641.95 KB
master OptimizedCharSlice net6.0 1.45ms 339ns 1.31μs 0 0 0 8 B
master OptimizedCharSlice netcoreapp3.1 1.66ms 216ns 835ns 0 0 0 1 B
master OptimizedCharSlice net472 1.95ms 146ns 565ns 0 0 0 0 b
master OptimizedCharSliceWithPool net6.0 856μs 37.3ns 134ns 0 0 0 4 B
master OptimizedCharSliceWithPool netcoreapp3.1 800μs 41ns 159ns 0 0 0 0 b
master OptimizedCharSliceWithPool net472 1.14ms 68.3ns 265ns 0 0 0 0 b
#7441 OriginalCharSlice net6.0 1.87ms 7.73μs 27.9μs 0 0 0 640 KB
#7441 OriginalCharSlice netcoreapp3.1 2.16ms 10.8μs 49.7μs 0 0 0 640 KB
#7441 OriginalCharSlice net472 2.66ms 176ns 683ns 100 0 0 641.95 KB
#7441 OptimizedCharSlice net6.0 1.52ms 337ns 1.31μs 0 0 0 2 B
#7441 OptimizedCharSlice netcoreapp3.1 1.75ms 240ns 928ns 0 0 0 1 B
#7441 OptimizedCharSlice net472 1.95ms 309ns 1.11μs 0 0 0 0 b
#7441 OptimizedCharSliceWithPool net6.0 890μs 54.3ns 210ns 0 0 0 4 B
#7441 OptimizedCharSliceWithPool netcoreapp3.1 871μs 51ns 198ns 0 0 0 1 B
#7441 OptimizedCharSliceWithPool net472 1.2ms 967ns 3.74μs 0 0 0 0 b
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed ✔️ More allocations ⚠️

More allocations ⚠️ in #7441

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net6.0 41.65 KB 41.92 KB 269 B 0.65%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 720μs 3.97μs 25.1μs 0 0 0 41.65 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 711μs 2.74μs 10.6μs 0 0 0 41.76 KB
master WriteAndFlushEnrichedTraces net472 893μs 3.4μs 12.7μs 4.46 0 0 55.84 KB
#7441 WriteAndFlushEnrichedTraces net6.0 690μs 3.66μs 17.9μs 0 0 0 41.92 KB
#7441 WriteAndFlushEnrichedTraces netcoreapp3.1 659μs 1.24μs 4.29μs 0 0 0 41.87 KB
#7441 WriteAndFlushEnrichedTraces net472 878μs 1.6μs 5.77μs 8.33 0 0 55.74 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.86μs 9.83ns 47.1ns 0 0 0 1.02 KB
master ExecuteNonQuery netcoreapp3.1 2.63μs 11.4ns 44.2ns 0 0 0 1.02 KB
master ExecuteNonQuery net472 2.86μs 5.11ns 19.8ns 0.157 0.0142 0 987 B
#7441 ExecuteNonQuery net6.0 1.86μs 7.24ns 28ns 0 0 0 1.02 KB
#7441 ExecuteNonQuery netcoreapp3.1 2.52μs 11.2ns 42ns 0 0 0 1.02 KB
#7441 ExecuteNonQuery net472 2.73μs 3.12ns 12.1ns 0.15 0.0136 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.7μs 9.22ns 49.6ns 0 0 0 1.03 KB
master CallElasticsearch netcoreapp3.1 2.26μs 11.4ns 49.6ns 0 0 0 1.03 KB
master CallElasticsearch net472 3.57μs 7.34ns 28.4ns 0.161 0 0 1.04 KB
master CallElasticsearchAsync net6.0 1.76μs 7.34ns 27.5ns 0 0 0 1.01 KB
master CallElasticsearchAsync netcoreapp3.1 2.37μs 6.65ns 25.8ns 0 0 0 1.08 KB
master CallElasticsearchAsync net472 3.79μs 3.77ns 14.6ns 0.17 0 0 1.1 KB
#7441 CallElasticsearch net6.0 1.75μs 8.26ns 32ns 0 0 0 1.03 KB
#7441 CallElasticsearch netcoreapp3.1 2.19μs 10.2ns 41.9ns 0 0 0 1.03 KB
#7441 CallElasticsearch net472 3.6μs 7.46ns 28.9ns 0.162 0 0 1.04 KB
#7441 CallElasticsearchAsync net6.0 1.86μs 7.41ns 27.7ns 0 0 0 1.01 KB
#7441 CallElasticsearchAsync netcoreapp3.1 2.44μs 7.9ns 30.6ns 0 0 0 1.08 KB
#7441 CallElasticsearchAsync net472 3.99μs 1.88ns 7.02ns 0.158 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.84μs 3.4ns 13.2ns 0 0 0 952 B
master ExecuteAsync netcoreapp3.1 2.33μs 7.62ns 29.5ns 0 0 0 952 B
master ExecuteAsync net472 2.62μs 1.48ns 5.75ns 0.144 0 0 915 B
#7441 ExecuteAsync net6.0 1.89μs 0.687ns 2.57ns 0 0 0 952 B
#7441 ExecuteAsync netcoreapp3.1 2.28μs 3ns 10.8ns 0 0 0 952 B
#7441 ExecuteAsync net472 2.44μs 2.57ns 9.6ns 0.134 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 7.17μs 14.5ns 54.4ns 0 0 0 2.36 KB
master SendAsync netcoreapp3.1 8.64μs 18.8ns 67.9ns 0 0 0 2.9 KB
master SendAsync net472 12.2μs 13.2ns 51.3ns 0.488 0 0 3.18 KB
#7441 SendAsync net6.0 7.2μs 21.8ns 81.6ns 0 0 0 2.36 KB
#7441 SendAsync netcoreapp3.1 8.36μs 30.5ns 118ns 0 0 0 2.9 KB
#7441 SendAsync net472 12.4μs 11.4ns 44.2ns 0.493 0 0 3.18 KB
Benchmarks.Trace.Iast.StringAspectsBenchmark - Same speed ✔️ More allocations ⚠️

More allocations ⚠️ in #7441

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net472 278.53 KB 286.72 KB 8.19 KB 2.94%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1 272.39 KB 276.69 KB 4.3 KB 1.58%

Fewer allocations 🎉 in #7441

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0 276.65 KB 274.24 KB -2.41 KB -0.87%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net472 65.54 KB 57.34 KB -8.19 KB -12.50%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StringConcatBenchmark net6.0 44.1μs 428ns 4μs 0 0 0 43.1 KB
master StringConcatBenchmark netcoreapp3.1 50.8μs 368ns 3.42μs 0 0 0 42.82 KB
master StringConcatBenchmark net472 57.6μs 128ns 461ns 0 0 0 65.54 KB
master StringConcatAspectBenchmark net6.0 509μs 1.36μs 4.72μs 0 0 0 276.65 KB
master StringConcatAspectBenchmark netcoreapp3.1 506μs 2.33μs 9.03μs 0 0 0 272.39 KB
master StringConcatAspectBenchmark net472 408μs 2.28μs 14.4μs 0 0 0 278.53 KB
#7441 StringConcatBenchmark net6.0 44.4μs 208ns 1.41μs 0 0 0 43.22 KB
#7441 StringConcatBenchmark netcoreapp3.1 55.9μs 666ns 6.56μs 0 0 0 42.78 KB
#7441 StringConcatBenchmark net472 56.7μs 150ns 543ns 0 0 0 57.34 KB
#7441 StringConcatAspectBenchmark net6.0 469μs 2.13μs 7.99μs 0 0 0 274.24 KB
#7441 StringConcatAspectBenchmark netcoreapp3.1 534μs 1.58μs 5.9μs 0 0 0 276.69 KB
#7441 StringConcatAspectBenchmark net472 403μs 2.01μs 8.53μs 0 0 0 286.72 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.6μs 1.67ns 6.26ns 0 0 0 1.7 KB
master EnrichedLog netcoreapp3.1 3.44μs 16.7ns 66.8ns 0 0 0 1.7 KB
master EnrichedLog net472 4.02μs 6.83ns 26.5ns 0.243 0 0 1.64 KB
#7441 EnrichedLog net6.0 2.56μs 12.1ns 48.5ns 0 0 0 1.7 KB
#7441 EnrichedLog netcoreapp3.1 3.45μs 3.84ns 14.9ns 0 0 0 1.7 KB
#7441 EnrichedLog net472 4.08μs 4.68ns 18.1ns 0.245 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 84.8ns 317ns 0 0 0 4.31 KB
master EnrichedLog netcoreapp3.1 127μs 243ns 941ns 0 0 0 4.31 KB
master EnrichedLog net472 169μs 96.6ns 361ns 0 0 0 4.52 KB
#7441 EnrichedLog net6.0 122μs 65.5ns 236ns 0 0 0 4.31 KB
#7441 EnrichedLog netcoreapp3.1 127μs 241ns 934ns 0 0 0 4.31 KB
#7441 EnrichedLog net472 166μs 73.9ns 266ns 0 0 0 4.51 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 4.91μs 5.3ns 20.5ns 0 0 0 2.26 KB
master EnrichedLog netcoreapp3.1 6.53μs 20.4ns 79.2ns 0 0 0 2.26 KB
master EnrichedLog net472 7.41μs 3.73ns 14.4ns 0.296 0 0 2.08 KB
#7441 EnrichedLog net6.0 5.07μs 4.41ns 17.1ns 0 0 0 2.26 KB
#7441 EnrichedLog netcoreapp3.1 6.76μs 21.1ns 78.9ns 0 0 0 2.26 KB
#7441 EnrichedLog net472 7.32μs 7.3ns 28.3ns 0.328 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 1.96μs 9.86ns 44.1ns 0 0 0 1.2 KB
master SendReceive netcoreapp3.1 2.59μs 12.4ns 51.3ns 0 0 0 1.2 KB
master SendReceive net472 3.08μs 0.722ns 2.5ns 0.185 0 0 1.2 KB
#7441 SendReceive net6.0 1.98μs 9.59ns 37.1ns 0 0 0 1.2 KB
#7441 SendReceive netcoreapp3.1 2.7μs 3.67ns 14.2ns 0 0 0 1.2 KB
#7441 SendReceive net472 3.14μs 4.12ns 16ns 0.19 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 2.75ns 10.3ns 0 0 0 1.58 KB
master EnrichedLog netcoreapp3.1 5.53μs 12.3ns 47.5ns 0 0 0 1.63 KB
master EnrichedLog net472 6.45μs 5.31ns 20.5ns 0.322 0 0 2.03 KB
#7441 EnrichedLog net6.0 4.21μs 13.5ns 52.4ns 0 0 0 1.58 KB
#7441 EnrichedLog netcoreapp3.1 5.59μs 12.1ns 46.7ns 0 0 0 1.63 KB
#7441 EnrichedLog net472 6.62μs 5.98ns 23.2ns 0.299 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 739ns 1.23ns 4.75ns 0 0 0 576 B
master StartFinishSpan netcoreapp3.1 937ns 1.58ns 6.12ns 0 0 0 576 B
master StartFinishSpan net472 914ns 0.286ns 1.11ns 0.0875 0 0 578 B
master StartFinishScope net6.0 877ns 4.77ns 27ns 0 0 0 696 B
master StartFinishScope netcoreapp3.1 1.1μs 5.9ns 30.7ns 0 0 0 696 B
master StartFinishScope net472 1.14μs 0.0855ns 0.331ns 0.103 0 0 658 B
#7441 StartFinishSpan net6.0 733ns 3.71ns 17.4ns 0 0 0 576 B
#7441 StartFinishSpan netcoreapp3.1 938ns 3.07ns 11.9ns 0 0 0 576 B
#7441 StartFinishSpan net472 939ns 4.63ns 19.7ns 0.0873 0 0 578 B
#7441 StartFinishScope net6.0 880ns 4.34ns 21.7ns 0 0 0 696 B
#7441 StartFinishScope netcoreapp3.1 1.13μs 0.479ns 1.79ns 0 0 0 696 B
#7441 StartFinishScope net472 1.1μs 0.0897ns 0.347ns 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 1.04μs 0.296ns 1.15ns 0 0 0 696 B
master RunOnMethodBegin netcoreapp3.1 1.34μs 4.83ns 18.7ns 0 0 0 696 B
master RunOnMethodBegin net472 1.39μs 1.47ns 5.68ns 0.104 0 0 658 B
#7441 RunOnMethodBegin net6.0 1.04μs 1.93ns 7.48ns 0 0 0 696 B
#7441 RunOnMethodBegin netcoreapp3.1 1.37μs 5.98ns 23.2ns 0 0 0 696 B
#7441 RunOnMethodBegin net472 1.39μs 0.921ns 3.57ns 0.098 0 0 658 B

@GreenMatan GreenMatan force-pushed the matang/handsoff-config-di branch from c68d1f2 to c42cbea Compare August 27, 2025 11:56
@GreenMatan GreenMatan marked this pull request as ready for review August 27, 2025 11:57
@GreenMatan GreenMatan requested a review from a team as a code owner August 27, 2025 11:57
@GreenMatan GreenMatan requested a review from anna-git August 27, 2025 12:02
@GreenMatan GreenMatan changed the title [HandsOff Config] Decouple native code from DI/ER env vars [Stable Configuration] Decouple native code from DI/ER env vars Aug 27, 2025
@GreenMatan GreenMatan force-pushed the matang/handsoff-config-di branch 3 times, most recently from 6492b8b to 04e7415 Compare August 28, 2025 11:37
Copy link
Contributor

@anna-git anna-git left a comment

Choose a reason for hiding this comment

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

thank you! I left one small NIT comment

@GreenMatan GreenMatan changed the title [Stable Configuration] Decouple native code from DI/ER env vars [Stable Configuration] Keep DI/ER in hot standby Aug 30, 2025
@GreenMatan GreenMatan force-pushed the matang/handsoff-config-di branch 4 times, most recently from 982e215 to d353039 Compare September 1, 2025 20:28
@GreenMatan GreenMatan force-pushed the matang/handsoff-config-di branch 6 times, most recently from c6243a9 to d21eeec Compare September 8, 2025 13:51
@GreenMatan GreenMatan force-pushed the matang/handsoff-config-di branch from d21eeec to b6023b3 Compare September 8, 2025 13:53
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.

3 participants