[Config Registry] 5/6 Replace manual ConfigurationKeys by generated ones in the whole solution#7697
Conversation
a74a26f to
864cbb6
Compare
BenchmarksBenchmarks Report for benchmark platform 🐌Benchmarks for #7697 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 ✔️ Fewer allocations 🎉
|
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.ActivityBenchmark.StartStopWithChild‑net472 | 6 KB | 5.93 KB | -69 B | -1.15% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | StartStopWithChild |
net6.0 | 11.1μs | 59.6ns | 332ns | 0 | 0 | 0 | 5.5 KB |
| master | StartStopWithChild |
netcoreapp3.1 | 13.8μs | 71.7ns | 344ns | 0 | 0 | 0 | 5.72 KB |
| master | StartStopWithChild |
net472 | 21.8μs | 111ns | 497ns | 0.903 | 0.226 | 0 | 6 KB |
| #7697 | StartStopWithChild |
net6.0 | 10.9μs | 57.7ns | 305ns | 0 | 0 | 0 | 5.51 KB |
| #7697 | StartStopWithChild |
netcoreapp3.1 | 13.4μs | 71.5ns | 372ns | 0 | 0 | 0 | 5.71 KB |
| #7697 | StartStopWithChild |
net472 | 21.8μs | 118ns | 711ns | 0.874 | 0.219 | 0 | 5.93 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 | 1.25ms | 167ns | 625ns | 0 | 0 | 0 | 2.7 KB |
| master | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 1.39ms | 3.22μs | 12.5μs | 0 | 0 | 0 | 2.7 KB |
| master | WriteAndFlushEnrichedTraces |
net472 | 1.72ms | 1.71μs | 6.63μs | 0 | 0 | 0 | 3.26 KB |
| #7697 | WriteAndFlushEnrichedTraces |
net6.0 | 1.26ms | 141ns | 528ns | 0 | 0 | 0 | 2.7 KB |
| #7697 | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 1.36ms | 106ns | 381ns | 0 | 0 | 0 | 2.7 KB |
| #7697 | WriteAndFlushEnrichedTraces |
net472 | 1.7ms | 169ns | 608ns | 0 | 0 | 0 | 3.26 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 | 1.09μs | 6.25ns | 51.5ns | 0 | 0 | 0 | 1.22 KB |
| master | AllCycleSimpleBody |
netcoreapp3.1 | 1.37μs | 7.84ns | 58.1ns | 0 | 0 | 0 | 1.2 KB |
| master | AllCycleSimpleBody |
net472 | 1E+03ns | 0.202ns | 0.727ns | 0.194 | 0 | 0 | 1.23 KB |
| master | AllCycleMoreComplexBody |
net6.0 | 7.43μs | 5.7ns | 22.1ns | 0 | 0 | 0 | 4.72 KB |
| master | AllCycleMoreComplexBody |
netcoreapp3.1 | 8.97μs | 47.2ns | 227ns | 0 | 0 | 0 | 4.62 KB |
| master | AllCycleMoreComplexBody |
net472 | 7.66μs | 4.93ns | 19.1ns | 0.727 | 0 | 0 | 4.74 KB |
| master | ObjectExtractorSimpleBody |
net6.0 | 322ns | 1.63ns | 7.28ns | 0 | 0 | 0 | 280 B |
| master | ObjectExtractorSimpleBody |
netcoreapp3.1 | 396ns | 2.18ns | 12.5ns | 0 | 0 | 0 | 272 B |
| master | ObjectExtractorSimpleBody |
net472 | 305ns | 0.0335ns | 0.126ns | 0.0445 | 0 | 0 | 281 B |
| master | ObjectExtractorMoreComplexBody |
net6.0 | 6.27μs | 31.3ns | 133ns | 0 | 0 | 0 | 3.78 KB |
| master | ObjectExtractorMoreComplexBody |
netcoreapp3.1 | 7.81μs | 38.3ns | 158ns | 0 | 0 | 0 | 3.69 KB |
| master | ObjectExtractorMoreComplexBody |
net472 | 6.87μs | 7.99ns | 29.9ns | 0.584 | 0 | 0 | 3.8 KB |
| #7697 | AllCycleSimpleBody |
net6.0 | 1.13μs | 1.05ns | 3.95ns | 0 | 0 | 0 | 1.22 KB |
| #7697 | AllCycleSimpleBody |
netcoreapp3.1 | 1.38μs | 7.89ns | 49.9ns | 0 | 0 | 0 | 1.2 KB |
| #7697 | AllCycleSimpleBody |
net472 | 1μs | 0.676ns | 2.62ns | 0.195 | 0 | 0 | 1.23 KB |
| #7697 | AllCycleMoreComplexBody |
net6.0 | 7.23μs | 35.3ns | 158ns | 0 | 0 | 0 | 4.72 KB |
| #7697 | AllCycleMoreComplexBody |
netcoreapp3.1 | 8.88μs | 41.9ns | 168ns | 0 | 0 | 0 | 4.62 KB |
| #7697 | AllCycleMoreComplexBody |
net472 | 7.6μs | 2.21ns | 8.25ns | 0.719 | 0 | 0 | 4.74 KB |
| #7697 | ObjectExtractorSimpleBody |
net6.0 | 325ns | 1.84ns | 10.1ns | 0 | 0 | 0 | 280 B |
| #7697 | ObjectExtractorSimpleBody |
netcoreapp3.1 | 391ns | 2.14ns | 12.3ns | 0 | 0 | 0 | 272 B |
| #7697 | ObjectExtractorSimpleBody |
net472 | 305ns | 0.0939ns | 0.351ns | 0.0431 | 0 | 0 | 281 B |
| #7697 | ObjectExtractorMoreComplexBody |
net6.0 | 6.37μs | 32.7ns | 153ns | 0 | 0 | 0 | 3.78 KB |
| #7697 | ObjectExtractorMoreComplexBody |
netcoreapp3.1 | 7.85μs | 35.2ns | 136ns | 0 | 0 | 0 | 3.69 KB |
| #7697 | ObjectExtractorMoreComplexBody |
net472 | 6.83μs | 7.56ns | 29.3ns | 0.576 | 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 | 75.6μs | 228ns | 884ns | 0 | 0 | 0 | 32.4 KB |
| master | EncodeArgs |
netcoreapp3.1 | 97.9μs | 119ns | 446ns | 0 | 0 | 0 | 32.4 KB |
| master | EncodeArgs |
net472 | 109μs | 17.9ns | 69.3ns | 4.91 | 0 | 0 | 32.5 KB |
| master | EncodeLegacyArgs |
net6.0 | 145μs | 8.91ns | 33.3ns | 0 | 0 | 0 | 2.14 KB |
| master | EncodeLegacyArgs |
netcoreapp3.1 | 200μs | 186ns | 722ns | 0 | 0 | 0 | 2.14 KB |
| master | EncodeLegacyArgs |
net472 | 265μs | 38.7ns | 150ns | 0 | 0 | 0 | 2.14 KB |
| #7697 | EncodeArgs |
net6.0 | 77.2μs | 41.5ns | 161ns | 0 | 0 | 0 | 32.4 KB |
| #7697 | EncodeArgs |
netcoreapp3.1 | 98.8μs | 198ns | 765ns | 0 | 0 | 0 | 32.4 KB |
| #7697 | EncodeArgs |
net472 | 109μs | 27.9ns | 108ns | 4.89 | 0 | 0 | 32.5 KB |
| #7697 | EncodeLegacyArgs |
net6.0 | 149μs | 9.94ns | 34.4ns | 0 | 0 | 0 | 2.14 KB |
| #7697 | EncodeLegacyArgs |
netcoreapp3.1 | 200μs | 277ns | 1.07μs | 0 | 0 | 0 | 2.14 KB |
| #7697 | EncodeLegacyArgs |
net472 | 265μs | 24ns | 92.8ns | 0 | 0 | 0 | 2.15 KB |
Benchmarks.Trace.Asm.AppSecWafBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | RunWafRealisticBenchmark |
net6.0 | 427μs | 909ns | 3.15μs | 0 | 0 | 0 | 4.55 KB |
| master | RunWafRealisticBenchmark |
netcoreapp3.1 | 466μs | 3.45μs | 32.9μs | 0 | 0 | 0 | 4.48 KB |
| master | RunWafRealisticBenchmark |
net472 | 486μs | 431ns | 1.61μs | 0 | 0 | 0 | 0 b |
| master | RunWafRealisticBenchmarkWithAttack |
net6.0 | 310μs | 1.39μs | 4.99μs | 0 | 0 | 0 | 2.24 KB |
| master | RunWafRealisticBenchmarkWithAttack |
netcoreapp3.1 | 318μs | 1.07μs | 6.83μs | 0 | 0 | 0 | 2.22 KB |
| master | RunWafRealisticBenchmarkWithAttack |
net472 | 364μs | 413ns | 1.55μs | 0 | 0 | 0 | 0 b |
| #7697 | RunWafRealisticBenchmark |
net6.0 | 430μs | 1.26μs | 4.71μs | 0 | 0 | 0 | 4.55 KB |
| #7697 | RunWafRealisticBenchmark |
netcoreapp3.1 | 451μs | 2.58μs | 19.2μs | 0 | 0 | 0 | 4.48 KB |
| #7697 | RunWafRealisticBenchmark |
net472 | 493μs | 357ns | 1.34μs | 0 | 0 | 0 | 0 b |
| #7697 | RunWafRealisticBenchmarkWithAttack |
net6.0 | 316μs | 1μs | 3.47μs | 0 | 0 | 0 | 2.24 KB |
| #7697 | RunWafRealisticBenchmarkWithAttack |
netcoreapp3.1 | 354μs | 4.03μs | 39.1μs | 0 | 0 | 0 | 2.22 KB |
| #7697 | RunWafRealisticBenchmarkWithAttack |
net472 | 369μs | 360ns | 1.35μs | 0 | 0 | 0 | 0 b |
Benchmarks.Trace.AspNetCoreBenchmark - Unknown 🤷 Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | SendRequest |
net6.0 | 85.1μs | 266ns | 1.25μs | 0 | 0 | 0 | 18.97 KB |
| master | SendRequest |
netcoreapp3.1 | 97μs | 324ns | 1.86μs | 0 | 0 | 0 | 21.19 KB |
| master | SendRequest |
net472 | 0ns | 0ns | 0ns | 0 | 0 | 0 | 0 b |
| #7697 | SendRequest |
net6.0 | 85.3μs | 174ns | 675ns | 0 | 0 | 0 | 18.97 KB |
| #7697 | SendRequest |
netcoreapp3.1 | 96.9μs | 189ns | 1.24μs | 0 | 0 | 0 | 21.18 KB |
| #7697 | SendRequest |
net472 | 0ns | 0ns | 0ns | 0 | 0 | 0 | 0 b |
Benchmarks.Trace.CharSliceBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | OriginalCharSlice |
net6.0 | 1.96ms | 2.41μs | 9.35μs | 0 | 0 | 0 | 640 KB |
| master | OriginalCharSlice |
netcoreapp3.1 | 3.87ms | 863ns | 3.34μs | 0 | 0 | 0 | 640.05 KB |
| master | OriginalCharSlice |
net472 | 2.63ms | 419ns | 1.57μs | 0 | 0 | 0 | 638.98 KB |
| master | OptimizedCharSlice |
net6.0 | 1.41ms | 1.17μs | 4.52μs | 0 | 0 | 0 | 0 b |
| master | OptimizedCharSlice |
netcoreapp3.1 | 2.83ms | 785ns | 2.94μs | 0 | 0 | 0 | 0 b |
| master | OptimizedCharSlice |
net472 | 1.99ms | 966ns | 3.48μs | 0 | 0 | 0 | 0 b |
| master | OptimizedCharSliceWithPool |
net6.0 | 1.06ms | 445ns | 1.72μs | 0 | 0 | 0 | 0 b |
| master | OptimizedCharSliceWithPool |
netcoreapp3.1 | 1.86ms | 1.1μs | 4.27μs | 0 | 0 | 0 | 0 b |
| master | OptimizedCharSliceWithPool |
net472 | 1.14ms | 712ns | 2.66μs | 0 | 0 | 0 | 0 b |
| #7697 | OriginalCharSlice |
net6.0 | 1.98ms | 741ns | 2.67μs | 0 | 0 | 0 | 640 KB |
| #7697 | OriginalCharSlice |
netcoreapp3.1 | 3.87ms | 1.42μs | 5.11μs | 0 | 0 | 0 | 640.05 KB |
| #7697 | OriginalCharSlice |
net472 | 2.7ms | 795ns | 3.08μs | 0 | 0 | 0 | 638.98 KB |
| #7697 | OptimizedCharSlice |
net6.0 | 1.45ms | 473ns | 1.64μs | 0 | 0 | 0 | 0 b |
| #7697 | OptimizedCharSlice |
netcoreapp3.1 | 2.73ms | 630ns | 2.36μs | 0 | 0 | 0 | 0 b |
| #7697 | OptimizedCharSlice |
net472 | 1.91ms | 588ns | 2.2μs | 0 | 0 | 0 | 0 b |
| #7697 | OptimizedCharSliceWithPool |
net6.0 | 1.1ms | 477ns | 1.85μs | 0 | 0 | 0 | 0 b |
| #7697 | OptimizedCharSliceWithPool |
netcoreapp3.1 | 1.87ms | 1.52μs | 5.88μs | 0 | 0 | 0 | 0 b |
| #7697 | OptimizedCharSliceWithPool |
net472 | 1.16ms | 942ns | 3.65μs | 0 | 0 | 0 | 0 b |
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Slower ⚠️ More allocations ⚠️
Slower ⚠️ in #7697
Benchmark
diff/base
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net472
1.141
887,026.79
1,012,051.79
More allocations ⚠️ in #7697
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net472
55.47 KB
56.05 KB
577 B
1.04%
| Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
|---|---|---|---|---|
| Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net472 | 1.141 | 887,026.79 | 1,012,051.79 |
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net472 | 55.47 KB | 56.05 KB | 577 B | 1.04% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | WriteAndFlushEnrichedTraces |
net6.0 | 665μs | 871ns | 3.14μs | 0 | 0 | 0 | 41.69 KB |
| master | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 640μs | 3.08μs | 11.9μs | 0 | 0 | 0 | 42 KB |
| master | WriteAndFlushEnrichedTraces |
net472 | 888μs | 3.71μs | 14.4μs | 4.46 | 0 | 0 | 55.47 KB |
| #7697 | WriteAndFlushEnrichedTraces |
net6.0 | 678μs | 3.79μs | 25.4μs | 0 | 0 | 0 | 41.68 KB |
| #7697 | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 683μs | 1.43μs | 5.16μs | 0 | 0 | 0 | 41.88 KB |
| #7697 | WriteAndFlushEnrichedTraces |
net472 | 1ms | 5.12μs | 25.1μs | 4.46 | 0 | 0 | 56.05 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.96μs | 2.24ns | 8.68ns | 0 | 0 | 0 | 968 B |
| master | ExecuteNonQuery |
netcoreapp3.1 | 2.61μs | 12.6ns | 50.5ns | 0 | 0 | 0 | 960 B |
| master | ExecuteNonQuery |
net472 | 2.65μs | 0.789ns | 2.95ns | 0.144 | 0 | 0 | 931 B |
| #7697 | ExecuteNonQuery |
net6.0 | 1.88μs | 5.2ns | 20.1ns | 0 | 0 | 0 | 968 B |
| #7697 | ExecuteNonQuery |
netcoreapp3.1 | 2.42μs | 11ns | 44.1ns | 0 | 0 | 0 | 960 B |
| #7697 | ExecuteNonQuery |
net472 | 2.74μs | 1.1ns | 4.26ns | 0.138 | 0 | 0 | 931 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.67μs | 1.51ns | 5.83ns | 0 | 0 | 0 | 952 B |
| master | CallElasticsearch |
netcoreapp3.1 | 2.22μs | 6.02ns | 23.3ns | 0 | 0 | 0 | 968 B |
| master | CallElasticsearch |
net472 | 3.34μs | 5.86ns | 22.7ns | 0.15 | 0 | 0 | 955 B |
| master | CallElasticsearchAsync |
net6.0 | 1.88μs | 2.82ns | 10.9ns | 0 | 0 | 0 | 928 B |
| master | CallElasticsearchAsync |
netcoreapp3.1 | 2.48μs | 7.51ns | 29.1ns | 0 | 0 | 0 | 1.02 KB |
| master | CallElasticsearchAsync |
net472 | 3.47μs | 4.91ns | 19ns | 0.156 | 0 | 0 | 1.01 KB |
| #7697 | CallElasticsearch |
net6.0 | 1.71μs | 0.643ns | 2.23ns | 0 | 0 | 0 | 952 B |
| #7697 | CallElasticsearch |
netcoreapp3.1 | 2.21μs | 9.64ns | 37.4ns | 0 | 0 | 0 | 968 B |
| #7697 | CallElasticsearch |
net472 | 3.34μs | 2.57ns | 9.96ns | 0.151 | 0 | 0 | 955 B |
| #7697 | CallElasticsearchAsync |
net6.0 | 1.7μs | 8.12ns | 31.4ns | 0 | 0 | 0 | 928 B |
| #7697 | CallElasticsearchAsync |
netcoreapp3.1 | 2.5μs | 7.44ns | 28.8ns | 0 | 0 | 0 | 1.02 KB |
| #7697 | CallElasticsearchAsync |
net472 | 3.64μs | 3.93ns | 15.2ns | 0.145 | 0 | 0 | 1.01 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.96μs | 10.5ns | 55.3ns | 0 | 0 | 0 | 896 B |
| master | ExecuteAsync |
netcoreapp3.1 | 2.34μs | 9.24ns | 32ns | 0 | 0 | 0 | 896 B |
| master | ExecuteAsync |
net472 | 2.55μs | 1.43ns | 5.55ns | 0.128 | 0 | 0 | 858 B |
| #7697 | ExecuteAsync |
net6.0 | 1.84μs | 9.71ns | 48.6ns | 0 | 0 | 0 | 896 B |
| #7697 | ExecuteAsync |
netcoreapp3.1 | 2.38μs | 2.96ns | 11.5ns | 0 | 0 | 0 | 896 B |
| #7697 | ExecuteAsync |
net472 | 2.58μs | 3.68ns | 14.2ns | 0.129 | 0 | 0 | 858 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.11μs | 14.1ns | 52.7ns | 0 | 0 | 0 | 2.29 KB |
| master | SendAsync |
netcoreapp3.1 | 8.28μs | 25.7ns | 92.6ns | 0 | 0 | 0 | 2.83 KB |
| master | SendAsync |
net472 | 12μs | 6.28ns | 24.3ns | 0.479 | 0 | 0 | 3.08 KB |
| #7697 | SendAsync |
net6.0 | 6.82μs | 2.51ns | 9.03ns | 0 | 0 | 0 | 2.29 KB |
| #7697 | SendAsync |
netcoreapp3.1 | 8.47μs | 17.2ns | 64.5ns | 0 | 0 | 0 | 2.83 KB |
| #7697 | SendAsync |
net472 | 11.8μs | 10ns | 38.9ns | 0.471 | 0 | 0 | 3.08 KB |
Benchmarks.Trace.Iast.StringAspectsBenchmark - Same speed ✔️ More allocations ⚠️
More allocations ⚠️ in #7697
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1
256.22 KB
275.27 KB
19.06 KB
7.44%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0
256.95 KB
258.86 KB
1.91 KB
0.74%
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1 | 256.22 KB | 275.27 KB | 19.06 KB | 7.44% |
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0 | 256.95 KB | 258.86 KB | 1.91 KB | 0.74% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | StringConcatBenchmark |
net6.0 | 45.1μs | 266ns | 2.41μs | 0 | 0 | 0 | 42.51 KB |
| master | StringConcatBenchmark |
netcoreapp3.1 | 49.3μs | 272ns | 1.82μs | 0 | 0 | 0 | 42.54 KB |
| master | StringConcatBenchmark |
net472 | 56.7μs | 259ns | 1.04μs | 0 | 0 | 0 | 49.15 KB |
| master | StringConcatAspectBenchmark |
net6.0 | 463μs | 2.31μs | 10.6μs | 0 | 0 | 0 | 256.95 KB |
| master | StringConcatAspectBenchmark |
netcoreapp3.1 | 456μs | 6.65μs | 65.5μs | 0 | 0 | 0 | 256.22 KB |
| master | StringConcatAspectBenchmark |
net472 | 399μs | 2.18μs | 18.3μs | 0 | 0 | 0 | 270.34 KB |
| #7697 | StringConcatBenchmark |
net6.0 | 45.3μs | 251ns | 1.55μs | 0 | 0 | 0 | 42.51 KB |
| #7697 | StringConcatBenchmark |
netcoreapp3.1 | 50.6μs | 257ns | 1.69μs | 0 | 0 | 0 | 42.54 KB |
| #7697 | StringConcatBenchmark |
net472 | 57.1μs | 107ns | 386ns | 0 | 0 | 0 | 49.15 KB |
| #7697 | StringConcatAspectBenchmark |
net6.0 | 475μs | 2.32μs | 9.27μs | 0 | 0 | 0 | 258.86 KB |
| #7697 | StringConcatAspectBenchmark |
netcoreapp3.1 | 514μs | 2.44μs | 11.7μs | 0 | 0 | 0 | 275.27 KB |
| #7697 | StringConcatAspectBenchmark |
net472 | 402μs | 2.19μs | 12μs | 0 | 0 | 0 | 270.34 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.67μs | 1.78ns | 6.88ns | 0 | 0 | 0 | 1.69 KB |
| master | EnrichedLog |
netcoreapp3.1 | 3.43μs | 17.7ns | 81.3ns | 0 | 0 | 0 | 1.7 KB |
| master | EnrichedLog |
net472 | 3.97μs | 5.44ns | 21.1ns | 0.238 | 0 | 0 | 1.6 KB |
| #7697 | EnrichedLog |
net6.0 | 2.7μs | 14ns | 68.8ns | 0 | 0 | 0 | 1.69 KB |
| #7697 | EnrichedLog |
netcoreapp3.1 | 3.52μs | 17.3ns | 79.2ns | 0 | 0 | 0 | 1.7 KB |
| #7697 | EnrichedLog |
net472 | 3.84μs | 3.74ns | 14.5ns | 0.25 | 0 | 0 | 1.6 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 | 103ns | 358ns | 0 | 0 | 0 | 4.31 KB |
| master | EnrichedLog |
netcoreapp3.1 | 130μs | 212ns | 821ns | 0 | 0 | 0 | 4.31 KB |
| master | EnrichedLog |
net472 | 170μs | 140ns | 524ns | 0 | 0 | 0 | 4.51 KB |
| #7697 | EnrichedLog |
net6.0 | 124μs | 167ns | 601ns | 0 | 0 | 0 | 4.31 KB |
| #7697 | EnrichedLog |
netcoreapp3.1 | 131μs | 257ns | 928ns | 0 | 0 | 0 | 4.31 KB |
| #7697 | EnrichedLog |
net472 | 171μs | 137ns | 529ns | 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.06μs | 22.2ns | 86ns | 0 | 0 | 0 | 2.24 KB |
| master | EnrichedLog |
netcoreapp3.1 | 6.91μs | 6.93ns | 26.9ns | 0 | 0 | 0 | 2.26 KB |
| master | EnrichedLog |
net472 | 7.52μs | 7.83ns | 30.3ns | 0.3 | 0 | 0 | 2.05 KB |
| #7697 | EnrichedLog |
net6.0 | 5.14μs | 15.8ns | 61.2ns | 0 | 0 | 0 | 2.24 KB |
| #7697 | EnrichedLog |
netcoreapp3.1 | 6.83μs | 15.9ns | 61.7ns | 0 | 0 | 0 | 2.26 KB |
| #7697 | EnrichedLog |
net472 | 7.68μs | 8.49ns | 31.8ns | 0.308 | 0 | 0 | 2.05 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.87μs | 9.26ns | 42.4ns | 0 | 0 | 0 | 1.12 KB |
| master | SendReceive |
netcoreapp3.1 | 2.54μs | 12ns | 48ns | 0 | 0 | 0 | 1.14 KB |
| master | SendReceive |
net472 | 2.95μs | 2.56ns | 9.9ns | 0.176 | 0 | 0 | 1.12 KB |
| #7697 | SendReceive |
net6.0 | 1.95μs | 0.52ns | 2.01ns | 0 | 0 | 0 | 1.12 KB |
| #7697 | SendReceive |
netcoreapp3.1 | 2.51μs | 12.1ns | 49.9ns | 0 | 0 | 0 | 1.14 KB |
| #7697 | SendReceive |
net472 | 2.83μs | 0.8ns | 2.77ns | 0.17 | 0 | 0 | 1.12 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.46μs | 2.01ns | 7.8ns | 0 | 0 | 0 | 1.58 KB |
| master | EnrichedLog |
netcoreapp3.1 | 5.72μs | 20.9ns | 81.1ns | 0 | 0 | 0 | 1.63 KB |
| master | EnrichedLog |
net472 | 6.65μs | 7.28ns | 27.2ns | 0.298 | 0 | 0 | 2.03 KB |
| #7697 | EnrichedLog |
net6.0 | 4.38μs | 10.4ns | 36ns | 0 | 0 | 0 | 1.58 KB |
| #7697 | EnrichedLog |
netcoreapp3.1 | 5.77μs | 10.5ns | 40.8ns | 0 | 0 | 0 | 1.63 KB |
| #7697 | EnrichedLog |
net472 | 6.66μs | 5.68ns | 22ns | 0.298 | 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 | 750ns | 3.73ns | 17.1ns | 0 | 0 | 0 | 520 B |
| master | StartFinishSpan |
netcoreapp3.1 | 963ns | 5.2ns | 28.5ns | 0 | 0 | 0 | 520 B |
| master | StartFinishSpan |
net472 | 899ns | 0.12ns | 0.434ns | 0.0812 | 0 | 0 | 522 B |
| master | StartFinishScope |
net6.0 | 914ns | 1.11ns | 4.16ns | 0 | 0 | 0 | 640 B |
| master | StartFinishScope |
netcoreapp3.1 | 1.14μs | 5.95ns | 26.6ns | 0 | 0 | 0 | 640 B |
| master | StartFinishScope |
net472 | 1.11μs | 0.577ns | 2.16ns | 0.0948 | 0 | 0 | 602 B |
| master | StartFinishTwoScopes |
net6.0 | 1.76μs | 1.34ns | 5.21ns | 0 | 0 | 0 | 1.19 KB |
| master | StartFinishTwoScopes |
netcoreapp3.1 | 2.17μs | 11.2ns | 53.6ns | 0 | 0 | 0 | 1.19 KB |
| master | StartFinishTwoScopes |
net472 | 2.14μs | 1.58ns | 6.11ns | 0.161 | 0 | 0 | 1.08 KB |
| #7697 | StartFinishSpan |
net6.0 | 767ns | 0.139ns | 0.519ns | 0 | 0 | 0 | 520 B |
| #7697 | StartFinishSpan |
netcoreapp3.1 | 954ns | 5.06ns | 27.3ns | 0 | 0 | 0 | 520 B |
| #7697 | StartFinishSpan |
net472 | 894ns | 0.0775ns | 0.3ns | 0.0806 | 0 | 0 | 522 B |
| #7697 | StartFinishScope |
net6.0 | 911ns | 4.25ns | 17.5ns | 0 | 0 | 0 | 640 B |
| #7697 | StartFinishScope |
netcoreapp3.1 | 1.16μs | 1.92ns | 7.44ns | 0 | 0 | 0 | 640 B |
| #7697 | StartFinishScope |
net472 | 1.07μs | 0.155ns | 0.582ns | 0.0909 | 0 | 0 | 602 B |
| #7697 | StartFinishTwoScopes |
net6.0 | 1.76μs | 8.64ns | 37.7ns | 0 | 0 | 0 | 1.19 KB |
| #7697 | StartFinishTwoScopes |
netcoreapp3.1 | 2.22μs | 9.93ns | 37.2ns | 0 | 0 | 0 | 1.19 KB |
| #7697 | StartFinishTwoScopes |
net472 | 2.1μs | 3.27ns | 12.7ns | 0.168 | 0 | 0 | 1.08 KB |
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.07μs | 1.83ns | 7.09ns | 0 | 0 | 0 | 640 B |
| master | RunOnMethodBegin |
netcoreapp3.1 | 1.44μs | 6.31ns | 24.4ns | 0 | 0 | 0 | 640 B |
| master | RunOnMethodBegin |
net472 | 1.44μs | 0.503ns | 1.88ns | 0.0934 | 0 | 0 | 602 B |
| #7697 | RunOnMethodBegin |
net6.0 | 1.05μs | 1.04ns | 3.88ns | 0 | 0 | 0 | 640 B |
| #7697 | RunOnMethodBegin |
netcoreapp3.1 | 1.35μs | 5.01ns | 19.4ns | 0 | 0 | 0 | 640 B |
| #7697 | RunOnMethodBegin |
net472 | 1.4μs | 1.24ns | 4.81ns | 0.0908 | 0 | 0 | 602 B |
c1f7943 to
56bd199
Compare
a70301b to
caf072d
Compare
52bf0a8 to
38efd42
Compare
|
83d9c7d to
22a4a69
Compare
38efd42 to
77c76ec
Compare
22a4a69 to
8c8402b
Compare
77c76ec to
5959568
Compare
8c8402b to
15b3e9b
Compare
5959568 to
0672899
Compare
15b3e9b to
071fbd4
Compare
0672899 to
64b591b
Compare
071fbd4 to
0a751b8
Compare
64b591b to
4b52ac0
Compare
0a751b8 to
f5dd040
Compare
4b52ac0 to
cf4f9e4
Compare
f5dd040 to
df4a547
Compare
cf4f9e4 to
d5e1ed2
Compare
2839ecf to
93a324c
Compare
fc26b53 to
cc850d6
Compare
93a324c to
0d30b67
Compare
cc850d6 to
2a09875
Compare
0d30b67 to
b95387d
Compare
… yaml for doc (#7548) ## Context Part of **Configuration Inversion (Step 1)** - Stack progress: 1. **→ [#7548](#7548) - Add GitLab step and JSON configuration file (this PR)** 2. [#7688](#7688) - Reorganize keys, split config keys and platform keys 3. [#7698](#7698) - Generate ConfigurationKeys with source generator 4. [#7689](#7689) - Aliases handling and analyzers 5. [#7697](#7697) - Replace manual ConfigurationKeys by generated ones in the whole solution ## Summary Adds centralized configuration registry (`supported-configurations.json` + [supported-configurations-docs.yaml](cci:7://file:///Users/anna.yafi/go/src/github.com/DataDog/dd-trace-dotnet3/tracer/src/Datadog.Trace/Configuration/supported-configurations-docs.yaml:0:0-0:0)) containing ~280 configuration keys with automated GitLab CI validation. ## Changes **Configuration Files:** - `supported-configurations.json` - Machine-readable registry of all configuration keys with versions, aliases, and deprecations - [supported-configurations-docs.yaml](cci:7://file:///Users/anna.yafi/go/src/github.com/DataDog/dd-trace-dotnet3/tracer/src/Datadog.Trace/Configuration/supported-configurations-docs.yaml:0:0-0:0) - Human-readable documentation for each configuration key **CI/CD:** - Added `validate_supported_configurations_local_file` step to `.gitlab-ci.yml` - Updated `.gitlab/one-pipeline.locked.yaml` to reference validation template **File Structure:** ```json { "supportedConfigurations": { "DD_TRACE_ENABLED": { "version": ["A"] }, ... }, "aliases": { "DD_AGENT_HOST": ["DD_TRACE_AGENT_HOSTNAME", ...], ... }, "deprecations": { "DD_TRACE_ANALYTICS_ENABLED": "Deprecated - ...", ... } } ``` ## Motivation Provides single source of truth for configuration keys to enable: - Automated documentation validation - Cross-tracer compatibility checks - Configuration migration tooling - Automated doc generation See: [Configuration Registry Design Doc](https://docs.google.com/document/d/1VIvOyQPfuQIWBIgNY68A9hzLir0-3eJijTwmpWASO8s/edit?tab=t.0#heading=h.jy2ajbk2b8ba) ## Validation GitLab CI validates JSON structure, naming conventions, and schema compliance on every build. ## Commit Details **`2639cf0` - Initial Configuration Registry** - Added `supported-configurations.json` with ~280 configuration keys organized by version (A/B/C) - Includes `aliases` section mapping primary keys to deprecated/alternative names - Includes `deprecations` section with deprecation messages - Added GitLab CI validation step to ensure file integrity - Updated one-pipeline lock file to reference validation template **`70e632e` - Configuration Documentation** - Added [supported-configurations-docs.yaml](cci:7://file:///Users/anna.yafi/go/src/github.com/DataDog/dd-trace-dotnet3/tracer/src/Datadog.Trace/Configuration/supported-configurations-docs.yaml:0:0-0:0) with detailed XML documentation for each configuration key - Provides human-readable descriptions, default values, and usage examples - Includes `<seealso>` references to relevant code classes - Complements the machine-readable JSON with developer-friendly documentation - Enables automated generation of configuration documentation from a single source
|
|
||
| ### 2. Add Documentation | ||
|
|
||
| Add XML documentation for your key in `tracer/src/Datadog.Trace/Configuration/supported-configurations-docs.yaml`. |
There was a problem hiding this comment.
It makes me wonder, why can't we include this in supportedConfigurations to keep everything together? 🤔 Having to edit multiple files to add a new config is a bit annoying
There was a problem hiding this comment.
the problem was the json format... at first I did that and for some of the keys that have long documentation, it was an absolute mess, impossible to read, ie:
{
"DD_TRACE_SAMPLING_RULES": "Configuration key for setting custom sampling rules based on regular expressions.\n Semi-colon separated list of sampling rules.\n The rule is matched in order of specification. The first match in a list is used.\n\n Per entry:\n The item "sample_rate" is required in decimal format.\n The item "service" is optional in regular expression format, to match on service name.\n The item "name" is optional in regular expression format, to match on operation name.\n\n To give a rate of 50% to any traces in a service starting with the text "cart":\n '[{"sample_rate":0.5, "service":"cart."}]'\n\n To give a rate of 20% to any traces which have an operation name of "http.request":\n '[{"sample_rate":0.2, "name":"http.request"}]'\n\n To give a rate of 100% to any traces within a service named "background" and with an operation name of "sql.query":\n '[{"sample_rate":1.0, "service":"background", "name":"sql.query"}]'\n\n To give a rate of 10% to all traces\n '[{"sample_rate":0.1}]'\n\n To configure multiple rules, separate by semi-colon and order from most specific to least specific:\n '[{"sample_rate":0.5, "service":"cart."}, {"sample_rate":0.2, "name":"http.request"}, {"sample_rate":1.0, "service":"background", "name":"sql.query"}, {"sample_rate":0.1}]'\n\n If no rules are specified, or none match, default internal sampling logic will be used.\n <seealso cref="Datadog.Trace.Configuration.MutableSettings.CustomSamplingRules" />"
}
There was a problem hiding this comment.
we could do it the other way though potentially? i.e. we edit the yaml file (which is designed to be easier for humans to read)? 😄
tracer/src/Datadog.Trace.Tools.dd_dotnet/Datadog.Trace.Tools.dd_dotnet.csproj
Show resolved
Hide resolved
2a09875 to
279b292
Compare
b95387d to
e3ec6e4
Compare
279b292 to
9860a88
Compare
e3ec6e4 to
98f48d6
Compare
… keys (#7688) ## Context Part of **Configuration Inversion (Step 2)** - Stack progress: 1. [#7548](#7548) - Add GitLab step and JSON configuration file 2. **→ [#7688](#7688) - [Config registry] Reorganize keys, split config keys and platform keys(this PR)** 3. [#7698](#7698) - Generate ConfigurationKeys with source generator 4. [#7689](#7689) - Aliases handling and analyzers 5. [#7697](#7697) - Replace manual ConfigurationKeys by generated ones in the whole solution ## Summary Separates platform-specific environment variables into `PlatformKeys` class and adds Roslyn analyzers to enforce proper usage of configuration keys throughout the codebase. ## Changes **Platform Keys Separation:** - Created `PlatformKeys` class for external platform environment variables (AWS, Azure, GCP, Kubernetes, CLR Profiler), those that don't start with DD_ and come from other platforms. - Updated all references throughout codebase to use `PlatformKeys` for platform-specific variables - Keeps `ConfigurationKeys` focused only on Datadog configuration **Roslyn Analyzers:** - **DD0007**: Platform key analyzer - Enforces use of `PlatformKeys` for external platform environment variables - **DD0008**: ConfigurationBuilder analyzer - Enforces use of `ConfigurationKeys` or `PlatformKeys` constants in `ConfigurationBuilder.WithKeys()` calls - Prevents hardcoded strings and ensures type safety **Configuration Mapping:** - Added `configuration_keys_mapping.json` to map environment variable names to their `ConfigurationKeys` constant names, so that we avoid renaming hundreds of variables according to automatically source generated deducted ones. - Enables preservation of original constant names during refactoring - Supports source generator integration **Code Updates:** - Updated `TracerSettings`, test files, and profiler code to use `PlatformKeys` - Replaced manual `ConfigurationKeys` with generated version from `supported-configurations.json` - Added missing `DD_TRACE_LOG_PATH` to configuration registry ## Motivation Ensures clean separation between Datadog and platform configuration by: - Preventing accidental mixing of platform and Datadog keys - Enforcing compile-time validation of configuration key usage - Making it clear which keys are owned by Datadog vs external platforms - Catching configuration errors at build time instead of runtime ## Validation - Roslyn analyzers run on every build - All existing tests pass with updated key references - Analyzers report clear diagnostic messages for violations ## Related Work This PR builds on the configuration registry foundation established in #7548: - **Commit `2639cf0`** added `supported-configurations.json` with ~280 keys, aliases, deprecations, and GitLab CI validation - **Commit `70e632e`** added [supported-configurations-docs.yaml](cci:7://file:///Users/anna.yafi/go/src/github.com/DataDog/dd-trace-dotnet3/tracer/src/Datadog.Trace/Configuration/supported-configurations-docs.yaml:0:0-0:0) with XML documentation for automated doc generation
9860a88 to
3197af6
Compare
4289adc to
efb749a
Compare
3197af6 to
e6d6574
Compare
efb749a to
4a09baa
Compare
e6d6574 to
dcd2f3c
Compare
4a09baa to
6d0d644
Compare
dcd2f3c to
196d5e0
Compare
6d0d644 to
0949fba
Compare
196d5e0 to
3d682bd
Compare
0949fba to
4f85efe
Compare
3d682bd to
e99b9b3
Compare
4f85efe to
3ea1404
Compare
e99b9b3 to
667cda0
Compare
3ea1404 to
9662e0f
Compare
This PR was accidentally merged by auto merge, please see #7931
Context
Part of Configuration Inversion (Step 5) - Stack progress:
Summary of changes
Fixed the ConfigurationKeysGenerator to properly read and apply the configuration_keys_mapping.json file, and extracted common file header comments to a reusable constant.
Key changes:
"mappings"field as an object instead of an arrayConstants.ConfigurationGeneratorCommentfor reuse across multiple generatorsReason for change
The configuration_keys_mapping.json file was being ignored during code generation, causing the generator to produce incorrect constant names. This meant that any manual edits to constant names in the mapping file were not being respected, and the generated code would use auto-generated names instead of the explicitly mapped ones.
Additionally, the file header comments explaining that files are auto-generated were duplicated across generators, violating DRY principles.
Implementation details
Fixed array extraction logic: Replaced the call to JsonReader.ExtractJsonObjectSection() with custom array extraction code that:
"mappings":key in the JSON[bracket]Resolved variable scope issue: Reused existing
inStringandescapeNextvariables from the outer scope instead of redeclaring them, fixing compilation errors.Centralized header comments: Created
Constants.ConfigurationGeneratorCommentcontaining the standardized auto-generation notice and updated both generators to use it.Test coverage
Other details
This fix ensures that the explicit naming conventions defined in configuration_keys_mapping.json are respected, maintaining consistency with the existing codebase and preventing future confusion when constant names don't match their expected values.