- 
                Notifications
    You must be signed in to change notification settings 
- Fork 150
          Remove properties from TracerSettings which can change at runtime
          #7723
        
          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
base: andrew/settings/4-mutable-settings-service
Are you sure you want to change the base?
  
    Remove properties from TracerSettings which can change at runtime
  
  #7723
              Conversation
e347879    to
    8c472a5      
    Compare
  
    | BenchmarksBenchmarks Report for benchmark platform 🐌Benchmarks for #7723 compared to master: 
 The following thresholds were used for comparing the benchmark speeds: 
 Allocation changes below 0.5% are ignored. Benchmark detailsBenchmarks.Trace.ActivityBenchmark - Same speed ✔️ Same allocations ✔️Raw results
 Benchmarks.Trace.AgentWriterBenchmark - Same speed ✔️ More allocations  | 
| Benchmark | Base Allocated | Diff Allocated | Change | Change % | 
|---|---|---|---|---|
| Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces‑net472 | 3.31 KB | 3.35 KB | 46 B | 1.39% | 
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 | 
| #7723 | WriteAndFlushEnrichedTraces | net6.0 | 931μs | 220ns | 850ns | 0 | 0 | 0 | 2.7 KB | 
| #7723 | WriteAndFlushEnrichedTraces | netcoreapp3.1 | 1.02ms | 630ns | 2.44μs | 0 | 0 | 0 | 2.7 KB | 
| #7723 | WriteAndFlushEnrichedTraces | net472 | 1.21ms | 506ns | 1.96μs | 0 | 0 | 0 | 3.35 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 | 
| #7723 | AllCycleSimpleBody | net6.0 | N/A | N/A | N/A | NaN | NaN | NaN | 0 b | 
| #7723 | AllCycleSimpleBody | netcoreapp3.1 | N/A | N/A | N/A | NaN | NaN | NaN | 0 b | 
| #7723 | AllCycleSimpleBody | net472 | N/A | N/A | N/A | NaN | NaN | NaN | 0 b | 
| #7723 | AllCycleMoreComplexBody | net6.0 | N/A | N/A | N/A | NaN | NaN | NaN | 0 b | 
| #7723 | AllCycleMoreComplexBody | netcoreapp3.1 | N/A | N/A | N/A | NaN | NaN | NaN | 0 b | 
| #7723 | AllCycleMoreComplexBody | net472 | N/A | N/A | N/A | NaN | NaN | NaN | 0 b | 
| #7723 | ObjectExtractorSimpleBody | net6.0 | 317ns | 1.73ns | 9.77ns | 0 | 0 | 0 | 280 B | 
| #7723 | ObjectExtractorSimpleBody | netcoreapp3.1 | 396ns | 2.15ns | 11.8ns | 0 | 0 | 0 | 272 B | 
| #7723 | ObjectExtractorSimpleBody | net472 | 303ns | 0.124ns | 0.465ns | 0.0442 | 0 | 0 | 281 B | 
| #7723 | ObjectExtractorMoreComplexBody | net6.0 | 6.26μs | 32.4ns | 162ns | 0 | 0 | 0 | 3.78 KB | 
| #7723 | ObjectExtractorMoreComplexBody | netcoreapp3.1 | 7.73μs | 35.5ns | 142ns | 0 | 0 | 0 | 3.69 KB | 
| #7723 | ObjectExtractorMoreComplexBody | net472 | 6.68μs | 3.9ns | 15.1ns | 0.601 | 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 | 
| #7723 | EncodeArgs | net6.0 | 76.7μs | 189ns | 730ns | 0 | 0 | 0 | 32.4 KB | 
| #7723 | EncodeArgs | netcoreapp3.1 | 96.8μs | 189ns | 707ns | 0 | 0 | 0 | 32.4 KB | 
| #7723 | EncodeArgs | net472 | 110μs | 17.8ns | 68.9ns | 4.97 | 0 | 0 | 32.51 KB | 
| #7723 | EncodeLegacyArgs | net6.0 | 143μs | 22.4ns | 80.9ns | 0 | 0 | 0 | 2.15 KB | 
| #7723 | EncodeLegacyArgs | netcoreapp3.1 | 198μs | 125ns | 469ns | 0 | 0 | 0 | 2.14 KB | 
| #7723 | EncodeLegacyArgs | net472 | 266μs | 89ns | 345ns | 0 | 0 | 0 | 2.16 KB | 
Benchmarks.Trace.Asm.AppSecWafBenchmark - Slower ⚠️  Same allocations ✔️
Slower ⚠️  in #7723
Benchmark 
diff/base 
Base Median (ns) 
Diff Median (ns) 
Modality 
 
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack‑netcoreapp3.1 
2.443 
302,738.03 
739,610.71 
 
Faster 🎉 in #7723
Benchmark 
base/diff 
Base Median (ns) 
Diff Median (ns) 
Modality 
 
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark‑netcoreapp3.1 
2.087 
863,571.46 
413,811.46 
 
| Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality | 
|---|---|---|---|---|
| Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack‑netcoreapp3.1 | 2.443 | 302,738.03 | 739,610.71 | 
| Benchmark | base/diff | Base Median (ns) | Diff Median (ns) | Modality | 
|---|---|---|---|---|
| Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark‑netcoreapp3.1 | 2.087 | 863,571.46 | 413,811.46 | 
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 | 
| #7723 | RunWafRealisticBenchmark | net6.0 | 391μs | 57.9ns | 217ns | 0 | 0 | 0 | 4.55 KB | 
| #7723 | RunWafRealisticBenchmark | netcoreapp3.1 | 414μs | 366ns | 1.37μs | 0 | 0 | 0 | 4.48 KB | 
| #7723 | RunWafRealisticBenchmark | net472 | 428μs | 44ns | 159ns | 0 | 0 | 0 | 4.66 KB | 
| #7723 | RunWafRealisticBenchmarkWithAttack | net6.0 | 288μs | 39.1ns | 151ns | 0 | 0 | 0 | 2.24 KB | 
| #7723 | RunWafRealisticBenchmarkWithAttack | netcoreapp3.1 | 688μs | 11μs | 108μs | 0 | 0 | 0 | 2.22 KB | 
| #7723 | RunWafRealisticBenchmarkWithAttack | net472 | 313μs | 40.9ns | 158ns | 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 | 
| #7723 | SendRequest | net6.0 | 61.1μs | 57.2ns | 214ns | 0 | 0 | 0 | 14.52 KB | 
| #7723 | SendRequest | netcoreapp3.1 | 71.4μs | 353ns | 1.66μs | 0 | 0 | 0 | 17.5 KB | 
| #7723 | SendRequest | net472 | 0.011ns | 0.00298ns | 0.0115ns | 0 | 0 | 0 | 0 b | 
Benchmarks.Trace.CharSliceBenchmark - Same speed ✔️ More allocations ⚠️ 
More allocations ⚠️  in #7723
Benchmark 
Base Allocated 
Diff Allocated 
Change 
Change % 
 
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net6.0 
3 B 
4 B 
1 B 
33.33% 
 
Fewer allocations 🎉 in #7723
Benchmark 
Base Allocated 
Diff Allocated 
Change 
Change % 
 
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net6.0 
7 B 
4 B 
-3 B 
-42.86% 
 
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net472 
73 B 
0 b 
-73 B 
-100.00% 
 
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑netcoreapp3.1 
1 B 
0 b 
-1 B 
-100.00% 
 
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net472 
48 B 
0 b 
-48 B 
-100.00% 
 
| Benchmark | Base Allocated | Diff Allocated | Change | Change % | 
|---|---|---|---|---|
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net6.0 | 3 B | 4 B | 1 B | 33.33% | 
| Benchmark | Base Allocated | Diff Allocated | Change | Change % | 
|---|---|---|---|---|
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net6.0 | 7 B | 4 B | -3 B | -42.86% | 
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net472 | 73 B | 0 b | -73 B | -100.00% | 
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑netcoreapp3.1 | 1 B | 0 b | -1 B | -100.00% | 
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net472 | 48 B | 0 b | -48 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 | 
| #7723 | OriginalCharSlice | net6.0 | 1.9ms | 3.01μs | 11.6μs | 0 | 0 | 0 | 640.01 KB | 
| #7723 | OriginalCharSlice | netcoreapp3.1 | 2.11ms | 6.9μs | 25.8μs | 0 | 0 | 0 | 640 KB | 
| #7723 | OriginalCharSlice | net472 | 2.72ms | 1.33μs | 4.97μs | 100 | 0 | 0 | 641.95 KB | 
| #7723 | OptimizedCharSlice | net6.0 | 1.37ms | 112ns | 418ns | 0 | 0 | 0 | 4 B | 
| #7723 | OptimizedCharSlice | netcoreapp3.1 | 1.68ms | 468ns | 1.81μs | 0 | 0 | 0 | 1 B | 
| #7723 | OptimizedCharSlice | net472 | 2.01ms | 228ns | 885ns | 0 | 0 | 0 | 0 b | 
| #7723 | OptimizedCharSliceWithPool | net6.0 | 854μs | 40.9ns | 158ns | 0 | 0 | 0 | 4 B | 
| #7723 | OptimizedCharSliceWithPool | netcoreapp3.1 | 803μs | 122ns | 474ns | 0 | 0 | 0 | 0 b | 
| #7723 | OptimizedCharSliceWithPool | net472 | 1.15ms | 111ns | 431ns | 0 | 0 | 0 | 0 b | 
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed ✔️ More allocations ⚠️ 
More allocations ⚠️  in #7723
Benchmark 
Base Allocated 
Diff Allocated 
Change 
Change % 
 
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net472 
55.61 KB 
56.7 KB 
1.09 KB 
1.95% 
 
Fewer allocations 🎉 in #7723
Benchmark 
Base Allocated 
Diff Allocated 
Change 
Change % 
 
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net6.0 
41.78 KB 
41.51 KB 
-268 B 
-0.64% 
 
| Benchmark | Base Allocated | Diff Allocated | Change | Change % | 
|---|---|---|---|---|
| Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net472 | 55.61 KB | 56.7 KB | 1.09 KB | 1.95% | 
| Benchmark | Base Allocated | Diff Allocated | Change | Change % | 
|---|---|---|---|---|
| Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net6.0 | 41.78 KB | 41.51 KB | -268 B | -0.64% | 
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 | 
| #7723 | WriteAndFlushEnrichedTraces | net6.0 | 713μs | 3.56μs | 15.9μs | 0 | 0 | 0 | 41.51 KB | 
| #7723 | WriteAndFlushEnrichedTraces | netcoreapp3.1 | 748μs | 4.25μs | 29.8μs | 0 | 0 | 0 | 41.98 KB | 
| #7723 | WriteAndFlushEnrichedTraces | net472 | 967μs | 5.12μs | 25.1μs | 8.33 | 0 | 0 | 56.7 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 | 
| #7723 | ExecuteNonQuery | net6.0 | 1.85μs | 8.1ns | 30.3ns | 0 | 0 | 0 | 1.02 KB | 
| #7723 | ExecuteNonQuery | netcoreapp3.1 | 2.56μs | 1.47ns | 5.68ns | 0 | 0 | 0 | 1.02 KB | 
| #7723 | ExecuteNonQuery | net472 | 2.8μs | 7.04ns | 27.3ns | 0.15 | 0.0137 | 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 | 
| #7723 | CallElasticsearch | net6.0 | 1.78μs | 3.57ns | 13.8ns | 0 | 0 | 0 | 1.03 KB | 
| #7723 | CallElasticsearch | netcoreapp3.1 | 2.17μs | 10.4ns | 41.7ns | 0 | 0 | 0 | 1.03 KB | 
| #7723 | CallElasticsearch | net472 | 3.59μs | 2.33ns | 9.04ns | 0.163 | 0 | 0 | 1.04 KB | 
| #7723 | CallElasticsearchAsync | net6.0 | 1.85μs | 7.46ns | 28.9ns | 0 | 0 | 0 | 1.01 KB | 
| #7723 | CallElasticsearchAsync | netcoreapp3.1 | 2.42μs | 11.9ns | 49ns | 0 | 0 | 0 | 1.08 KB | 
| #7723 | CallElasticsearchAsync | net472 | 3.87μs | 5.55ns | 21.5ns | 0.156 | 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 | 
| #7723 | ExecuteAsync | net6.0 | 1.95μs | 0.696ns | 2.7ns | 0 | 0 | 0 | 952 B | 
| #7723 | ExecuteAsync | netcoreapp3.1 | 2.46μs | 6.28ns | 24.3ns | 0 | 0 | 0 | 952 B | 
| #7723 | ExecuteAsync | net472 | 2.61μs | 5.92ns | 22.9ns | 0.142 | 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 | 
| #7723 | SendAsync | net6.0 | 6.98μs | 13.8ns | 51.8ns | 0 | 0 | 0 | 2.36 KB | 
| #7723 | SendAsync | netcoreapp3.1 | 8.57μs | 12ns | 44.8ns | 0 | 0 | 0 | 2.9 KB | 
| #7723 | SendAsync | net472 | 12.4μs | 7.68ns | 29.7ns | 0.496 | 0 | 0 | 3.18 KB | 
Benchmarks.Trace.Iast.StringAspectsBenchmark - Same speed ✔️ More allocations ⚠️ 
More allocations ⚠️  in #7723
Benchmark 
Base Allocated 
Diff Allocated 
Change 
Change % 
 
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net472 
57.34 KB 
65.54 KB 
8.19 KB 
14.29% 
 
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0 
258.03 KB 
274.74 KB 
16.71 KB 
6.48% 
 
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net6.0 
43.44 KB 
43.87 KB 
432 B 
0.99% 
 
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1 
273.05 KB 
274.87 KB 
1.82 KB 
0.67% 
 
Fewer allocations 🎉 in #7723
Benchmark 
Base Allocated 
Diff Allocated 
Change 
Change % 
 
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net472 
278.53 KB 
274.68 KB 
-3.85 KB 
-1.38% 
 
| Benchmark | Base Allocated | Diff Allocated | Change | Change % | 
|---|---|---|---|---|
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net472 | 57.34 KB | 65.54 KB | 8.19 KB | 14.29% | 
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0 | 258.03 KB | 274.74 KB | 16.71 KB | 6.48% | 
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net6.0 | 43.44 KB | 43.87 KB | 432 B | 0.99% | 
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1 | 273.05 KB | 274.87 KB | 1.82 KB | 0.67% | 
| Benchmark | Base Allocated | Diff Allocated | Change | Change % | 
|---|---|---|---|---|
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net472 | 278.53 KB | 274.68 KB | -3.85 KB | -1.38% | 
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 | 
| #7723 | StringConcatBenchmark | net6.0 | 41.7μs | 202ns | 858ns | 0 | 0 | 0 | 43.87 KB | 
| #7723 | StringConcatBenchmark | netcoreapp3.1 | 49.3μs | 330ns | 3.21μs | 0 | 0 | 0 | 42.76 KB | 
| #7723 | StringConcatBenchmark | net472 | 57.5μs | 110ns | 395ns | 0 | 0 | 0 | 65.54 KB | 
| #7723 | StringConcatAspectBenchmark | net6.0 | 473μs | 2.29μs | 9.72μs | 0 | 0 | 0 | 274.74 KB | 
| #7723 | StringConcatAspectBenchmark | netcoreapp3.1 | 505μs | 1.99μs | 7.69μs | 0 | 0 | 0 | 274.87 KB | 
| #7723 | StringConcatAspectBenchmark | net472 | 402μs | 2.17μs | 12.9μs | 0 | 0 | 0 | 274.68 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 | 
| #7723 | EnrichedLog | net6.0 | 2.67μs | 0.715ns | 2.77ns | 0 | 0 | 0 | 1.7 KB | 
| #7723 | EnrichedLog | netcoreapp3.1 | 3.63μs | 15.4ns | 55.6ns | 0 | 0 | 0 | 1.7 KB | 
| #7723 | EnrichedLog | net472 | 3.94μs | 4.45ns | 17.2ns | 0.257 | 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 | 
| #7723 | EnrichedLog | net6.0 | 122μs | 82.4ns | 297ns | 0 | 0 | 0 | 4.31 KB | 
| #7723 | EnrichedLog | netcoreapp3.1 | 128μs | 250ns | 968ns | 0 | 0 | 0 | 4.31 KB | 
| #7723 | EnrichedLog | net472 | 167μs | 127ns | 474ns | 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 | 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 | 
| #7723 | EnrichedLog | net6.0 | 5.08μs | 2.69ns | 10.1ns | 0 | 0 | 0 | 2.26 KB | 
| #7723 | EnrichedLog | netcoreapp3.1 | 6.81μs | 8.58ns | 33.2ns | 0 | 0 | 0 | 2.26 KB | 
| #7723 | EnrichedLog | net472 | 7.46μs | 9.75ns | 37.8ns | 0.299 | 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 | 
| #7723 | SendReceive | net6.0 | 2.03μs | 5.41ns | 21ns | 0 | 0 | 0 | 1.2 KB | 
| #7723 | SendReceive | netcoreapp3.1 | 2.71μs | 12.8ns | 52.7ns | 0 | 0 | 0 | 1.2 KB | 
| #7723 | SendReceive | net472 | 2.99μs | 2.64ns | 9.87ns | 0.179 | 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 | 
| #7723 | EnrichedLog | net6.0 | 4.21μs | 2.32ns | 8.02ns | 0 | 0 | 0 | 1.58 KB | 
| #7723 | EnrichedLog | netcoreapp3.1 | 5.64μs | 6.77ns | 24.4ns | 0 | 0 | 0 | 1.63 KB | 
| #7723 | EnrichedLog | net472 | 6.77μs | 9.22ns | 35.7ns | 0.302 | 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 | 
| #7723 | StartFinishSpan | net6.0 | 786ns | 0.457ns | 1.77ns | 0 | 0 | 0 | 576 B | 
| #7723 | StartFinishSpan | netcoreapp3.1 | 993ns | 5.18ns | 25.4ns | 0 | 0 | 0 | 576 B | 
| #7723 | StartFinishSpan | net472 | 950ns | 0.157ns | 0.567ns | 0.0904 | 0 | 0 | 578 B | 
| #7723 | StartFinishScope | net6.0 | 915ns | 5ns | 30.4ns | 0 | 0 | 0 | 696 B | 
| #7723 | StartFinishScope | netcoreapp3.1 | 1.2μs | 6.58ns | 36.6ns | 0 | 0 | 0 | 696 B | 
| #7723 | StartFinishScope | net472 | 1.13μs | 0.505ns | 1.89ns | 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 | 
| #7723 | RunOnMethodBegin | net6.0 | 1.08μs | 0.819ns | 3.17ns | 0 | 0 | 0 | 696 B | 
| #7723 | RunOnMethodBegin | netcoreapp3.1 | 1.42μs | 6.52ns | 26.1ns | 0 | 0 | 0 | 696 B | 
| #7723 | RunOnMethodBegin | net472 | 1.43μs | 0.751ns | 2.91ns | 0.1 | 0 | 0 | 658 B | 
8c472a5    to
    8e19e3a      
    Compare
  
    60c7874    to
    c691a0e      
    Compare
  
    8e19e3a    to
    7940c31      
    Compare
  
    c691a0e    to
    a52caed      
    Compare
  
    | 
 | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Automated code review by Claude Code
This PR successfully refactors TracerSettings to remove mutable properties and require explicit access through MutableSettings. The changes are generally consistent and well-executed. I've identified a few specific issues below for consideration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Automated code review by Claude Code
This PR successfully refactors TracerSettings to remove mutable properties and require explicit access through MutableSettings. The changes are generally consistent and well-executed.
…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
…"mutable" version This is a stop gap primarily to highlight everywhere that is _currently_ relying on these types, which will need to subscribe to updates
7940c31    to
    2dfae3d      
    Compare
  
    a52caed    to
    36d5027      
    Compare
  
    
Summary of changes
Instead of exposing settings like
ServiceVerionandEnvironmentonTracerSettings, only expose them onMutableSettingsReason for change
This is all part of the refactoring towards having
TracerSettingsbeing an immutable settings object, that's created once on app startup, and fixed for the lifetime.ServiceVerionandEnvironmentcurrently delegate to theMutableSettingsobject stored onTracerSettings, but are going to move that elsewhere shortly so that consumers can subscribe to changesImplementation details
For this PR, it's just a case of changing
TracerSettings.XXX=>TracerSettings.Mutable.XXX. A future PR will then subsequently "fix" these usages properly. This is just a small step to be able to remove the mutable properties fromTracerSettingsTest coverage
Just a refactoring, covered by existing tests.
Other details
https://datadoghq.atlassian.net/browse/LANGPLAT-819
Part of a config stack
MutableSettingsfromTracerSettings#7522MutableSettingson dynamic config changes #7525DefaultServiceNametoMutableSettings#7530PerTraceSettings.GetServiceName()#7532TracerSettingsto useMutableSettingswhere appropriate #7543IsIntegrationEnabled(),IsErrorStatusCode(), andGetIntegrationAnalyticsSampleRate()#7544DictionaryExtensions.SequenceEqual#7722SettingsManagerfor managing mutable settings and ExporterSettings #7695TracerSettingswhich can change at runtime #7723 👈MutableSettingsandExporterSettingswithout rebuilding #7724