-
Notifications
You must be signed in to change notification settings - Fork 151
[Config registry] 2/5 Reorganize keys, split config keys and platform keys #7688
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
[Config registry] 2/5 Reorganize keys, split config keys and platform keys #7688
Conversation
8232d48 to
d72f4ac
Compare
869594a to
f45278f
Compare
d72f4ac to
f242046
Compare
f45278f to
d40a9fb
Compare
153e7b3 to
9501463
Compare
BenchmarksBenchmarks Report for benchmark platform 🐌Benchmarks for #7688 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 ✔️ More allocations
|
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.ActivityBenchmark.StartStopWithChild‑net472 | 6.03 KB | 6.08 KB | 42 B | 0.70% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | StartStopWithChild |
net6.0 | 10.8μs | 56.7ns | 305ns | 0 | 0 | 0 | 5.53 KB |
| master | StartStopWithChild |
netcoreapp3.1 | 13.8μs | 67.5ns | 278ns | 0 | 0 | 0 | 5.72 KB |
| master | StartStopWithChild |
net472 | 21.8μs | 117ns | 631ns | 0.98 | 0.327 | 0.109 | 6.03 KB |
| #7688 | StartStopWithChild |
net6.0 | 10.6μs | 57ns | 328ns | 0 | 0 | 0 | 5.51 KB |
| #7688 | StartStopWithChild |
netcoreapp3.1 | 14μs | 65ns | 260ns | 0 | 0 | 0 | 5.72 KB |
| #7688 | StartStopWithChild |
net472 | 22.8μs | 123ns | 665ns | 0.911 | 0.228 | 0 | 6.08 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 | 945μs | 667ns | 2.58μs | 0 | 0 | 0 | 2.71 KB |
| master | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 1.03ms | 66.7ns | 231ns | 0 | 0 | 0 | 2.7 KB |
| master | WriteAndFlushEnrichedTraces |
net472 | 1.2ms | 87.7ns | 304ns | 0 | 0 | 0 | 3.31 KB |
| #7688 | WriteAndFlushEnrichedTraces |
net6.0 | 913μs | 59.5ns | 223ns | 0 | 0 | 0 | 2.71 KB |
| #7688 | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 1.02ms | 124ns | 465ns | 0 | 0 | 0 | 2.7 KB |
| #7688 | WriteAndFlushEnrichedTraces |
net472 | 1.18ms | 118ns | 455ns | 0 | 0 | 0 | 3.31 KB |
Benchmarks.Trace.Asm.AppSecBodyBenchmark - Unknown 🤷 Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | AllCycleSimpleBody |
net6.0 | N/A | N/A | N/A | NaN | NaN | NaN | 0 b |
| master | AllCycleSimpleBody |
netcoreapp3.1 | N/A | N/A | N/A | NaN | NaN | NaN | 0 b |
| master | AllCycleSimpleBody |
net472 | N/A | N/A | N/A | NaN | NaN | NaN | 0 b |
| master | AllCycleMoreComplexBody |
net6.0 | N/A | N/A | N/A | NaN | NaN | NaN | 0 b |
| master | AllCycleMoreComplexBody |
netcoreapp3.1 | N/A | N/A | N/A | NaN | NaN | NaN | 0 b |
| master | AllCycleMoreComplexBody |
net472 | N/A | N/A | N/A | NaN | NaN | NaN | 0 b |
| master | ObjectExtractorSimpleBody |
net6.0 | 326ns | 1.61ns | 7.22ns | 0 | 0 | 0 | 280 B |
| master | ObjectExtractorSimpleBody |
netcoreapp3.1 | 392ns | 2.22ns | 14.2ns | 0 | 0 | 0 | 272 B |
| master | ObjectExtractorSimpleBody |
net472 | 302ns | 0.0192ns | 0.0694ns | 0.0441 | 0 | 0 | 281 B |
| master | ObjectExtractorMoreComplexBody |
net6.0 | 6.4μs | 29.1ns | 113ns | 0 | 0 | 0 | 3.78 KB |
| master | ObjectExtractorMoreComplexBody |
netcoreapp3.1 | 7.82μs | 36.1ns | 140ns | 0 | 0 | 0 | 3.69 KB |
| master | ObjectExtractorMoreComplexBody |
net472 | 6.67μs | 1.91ns | 7.38ns | 0.601 | 0 | 0 | 3.8 KB |
| #7688 | AllCycleSimpleBody |
net6.0 | N/A | N/A | N/A | NaN | NaN | NaN | 0 b |
| #7688 | AllCycleSimpleBody |
netcoreapp3.1 | N/A | N/A | N/A | NaN | NaN | NaN | 0 b |
| #7688 | AllCycleSimpleBody |
net472 | N/A | N/A | N/A | NaN | NaN | NaN | 0 b |
| #7688 | AllCycleMoreComplexBody |
net6.0 | N/A | N/A | N/A | NaN | NaN | NaN | 0 b |
| #7688 | AllCycleMoreComplexBody |
netcoreapp3.1 | N/A | N/A | N/A | NaN | NaN | NaN | 0 b |
| #7688 | AllCycleMoreComplexBody |
net472 | N/A | N/A | N/A | NaN | NaN | NaN | 0 b |
| #7688 | ObjectExtractorSimpleBody |
net6.0 | 322ns | 1.73ns | 9.14ns | 0 | 0 | 0 | 280 B |
| #7688 | ObjectExtractorSimpleBody |
netcoreapp3.1 | 394ns | 2.2ns | 13.2ns | 0 | 0 | 0 | 272 B |
| #7688 | ObjectExtractorSimpleBody |
net472 | 303ns | 0.174ns | 0.65ns | 0.0441 | 0 | 0 | 281 B |
| #7688 | ObjectExtractorMoreComplexBody |
net6.0 | 6.26μs | 29.9ns | 119ns | 0 | 0 | 0 | 3.78 KB |
| #7688 | ObjectExtractorMoreComplexBody |
netcoreapp3.1 | 7.78μs | 37.3ns | 144ns | 0 | 0 | 0 | 3.69 KB |
| #7688 | ObjectExtractorMoreComplexBody |
net472 | 6.69μs | 4.76ns | 18.4ns | 0.603 | 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.8μs | 250ns | 934ns | 0 | 0 | 0 | 32.4 KB |
| master | EncodeArgs |
netcoreapp3.1 | 97μs | 183ns | 707ns | 0 | 0 | 0 | 32.4 KB |
| master | EncodeArgs |
net472 | 113μs | 11.8ns | 42.4ns | 5.1 | 0 | 0 | 32.5 KB |
| master | EncodeLegacyArgs |
net6.0 | 145μs | 19.8ns | 74.1ns | 0 | 0 | 0 | 2.14 KB |
| master | EncodeLegacyArgs |
netcoreapp3.1 | 199μs | 232ns | 897ns | 0 | 0 | 0 | 2.14 KB |
| master | EncodeLegacyArgs |
net472 | 272μs | 41.4ns | 155ns | 0 | 0 | 0 | 2.17 KB |
| #7688 | EncodeArgs |
net6.0 | 78.5μs | 21.7ns | 78.4ns | 0 | 0 | 0 | 32.4 KB |
| #7688 | EncodeArgs |
netcoreapp3.1 | 98.3μs | 169ns | 655ns | 0 | 0 | 0 | 32.4 KB |
| #7688 | EncodeArgs |
net472 | 113μs | 13.2ns | 49.5ns | 5.08 | 0 | 0 | 32.51 KB |
| #7688 | EncodeLegacyArgs |
net6.0 | 147μs | 17.1ns | 63.9ns | 0 | 0 | 0 | 2.15 KB |
| #7688 | EncodeLegacyArgs |
netcoreapp3.1 | 198μs | 299ns | 1.04μs | 0 | 0 | 0 | 2.14 KB |
| #7688 | EncodeLegacyArgs |
net472 | 264μs | 52.7ns | 204ns | 0 | 0 | 0 | 2.17 KB |
Benchmarks.Trace.Asm.AppSecWafBenchmark - Faster 🎉 Fewer allocations 🎉
Faster 🎉 in #7688
Benchmark
base/diff
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark‑netcoreapp3.1
2.109
864,261.04
409,727.50
Fewer allocations 🎉 in #7688
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark‑netcoreapp3.1
4.6 KB
4.48 KB
-121 B
-2.63%
| Benchmark | base/diff | Base Median (ns) | Diff Median (ns) | Modality |
|---|---|---|---|---|
| Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark‑netcoreapp3.1 | 2.109 | 864,261.04 | 409,727.50 |
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark‑netcoreapp3.1 | 4.6 KB | 4.48 KB | -121 B | -2.63% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | RunWafRealisticBenchmark |
net6.0 | 394μs | 68.4ns | 247ns | 0 | 0 | 0 | 4.55 KB |
| master | RunWafRealisticBenchmark |
netcoreapp3.1 | 862μs | 2.38μs | 8.6μs | 0 | 0 | 0 | 4.6 KB |
| master | RunWafRealisticBenchmark |
net472 | 428μs | 58.7ns | 227ns | 0 | 0 | 0 | 4.66 KB |
| master | RunWafRealisticBenchmarkWithAttack |
net6.0 | 285μs | 67.6ns | 253ns | 0 | 0 | 0 | 2.24 KB |
| master | RunWafRealisticBenchmarkWithAttack |
netcoreapp3.1 | 688μs | 10.2μs | 101μs | 0 | 0 | 0 | 2.22 KB |
| master | RunWafRealisticBenchmarkWithAttack |
net472 | 309μs | 40.1ns | 155ns | 0 | 0 | 0 | 2.29 KB |
| #7688 | RunWafRealisticBenchmark |
net6.0 | 401μs | 67.1ns | 260ns | 0 | 0 | 0 | 4.55 KB |
| #7688 | RunWafRealisticBenchmark |
netcoreapp3.1 | 413μs | 1.1μs | 4.27μs | 0 | 0 | 0 | 4.48 KB |
| #7688 | RunWafRealisticBenchmark |
net472 | 427μs | 64ns | 239ns | 0 | 0 | 0 | 4.66 KB |
| #7688 | RunWafRealisticBenchmarkWithAttack |
net6.0 | 287μs | 45.3ns | 163ns | 0 | 0 | 0 | 2.24 KB |
| #7688 | RunWafRealisticBenchmarkWithAttack |
netcoreapp3.1 | 721μs | 1.81μs | 7.01μs | 0 | 0 | 0 | 2.22 KB |
| #7688 | RunWafRealisticBenchmarkWithAttack |
net472 | 309μs | 30.4ns | 118ns | 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 | 60.6μs | 35.6ns | 138ns | 0 | 0 | 0 | 14.52 KB |
| master | SendRequest |
netcoreapp3.1 | 71.5μs | 68.4ns | 237ns | 0 | 0 | 0 | 17.42 KB |
| master | SendRequest |
net472 | 0.00174ns | 0.00119ns | 0.00462ns | 0 | 0 | 0 | 0 b |
| #7688 | SendRequest |
net6.0 | 61.4μs | 34.8ns | 130ns | 0 | 0 | 0 | 14.52 KB |
| #7688 | SendRequest |
netcoreapp3.1 | 71.8μs | 74.4ns | 278ns | 0 | 0 | 0 | 17.42 KB |
| #7688 | SendRequest |
net472 | 0.00154ns | 0.000969ns | 0.00375ns | 0 | 0 | 0 | 0 b |
Benchmarks.Trace.CharSliceBenchmark - Same speed ✔️ More allocations ⚠️
More allocations ⚠️ in #7688
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑netcoreapp3.1
0 b
1 B
1 B
∞
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net6.0
1 B
2 B
1 B
100.00%
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net6.0
4 B
6 B
2 B
50.00%
Fewer allocations 🎉 in #7688
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net472
48 B
47 B
-1 B
-2.08%
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑netcoreapp3.1 | 0 b | 1 B | 1 B | ∞ |
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net6.0 | 1 B | 2 B | 1 B | 100.00% |
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net6.0 | 4 B | 6 B | 2 B | 50.00% |
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net472 | 48 B | 47 B | -1 B | -2.08% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | OriginalCharSlice |
net6.0 | 1.99ms | 1.51μs | 5.66μs | 0 | 0 | 0 | 640.01 KB |
| master | OriginalCharSlice |
netcoreapp3.1 | 2.08ms | 2.34μs | 8.44μs | 0 | 0 | 0 | 640 KB |
| master | OriginalCharSlice |
net472 | 2.56ms | 385ns | 1.33μs | 100 | 0 | 0 | 641.95 KB |
| master | OptimizedCharSlice |
net6.0 | 1.35ms | 422ns | 1.58μs | 0 | 0 | 0 | 4 B |
| master | OptimizedCharSlice |
netcoreapp3.1 | 1.67ms | 335ns | 1.3μs | 0 | 0 | 0 | 1 B |
| master | OptimizedCharSlice |
net472 | 2.04ms | 268ns | 1.04μs | 0 | 0 | 0 | 73 B |
| master | OptimizedCharSliceWithPool |
net6.0 | 804μs | 82.2ns | 319ns | 0 | 0 | 0 | 1 B |
| master | OptimizedCharSliceWithPool |
netcoreapp3.1 | 833μs | 97ns | 376ns | 0 | 0 | 0 | 0 b |
| master | OptimizedCharSliceWithPool |
net472 | 1.16ms | 103ns | 386ns | 0 | 0 | 0 | 48 B |
| #7688 | OriginalCharSlice |
net6.0 | 1.92ms | 6.34μs | 24.5μs | 0 | 0 | 0 | 640.01 KB |
| #7688 | OriginalCharSlice |
netcoreapp3.1 | 2.1ms | 6.71μs | 25.1μs | 0 | 0 | 0 | 640 KB |
| #7688 | OriginalCharSlice |
net472 | 2.7ms | 47.6ns | 178ns | 100 | 0 | 0 | 641.95 KB |
| #7688 | OptimizedCharSlice |
net6.0 | 1.44ms | 336ns | 1.3μs | 0 | 0 | 0 | 6 B |
| #7688 | OptimizedCharSlice |
netcoreapp3.1 | 1.67ms | 2.5μs | 9.69μs | 0 | 0 | 0 | 1 B |
| #7688 | OptimizedCharSlice |
net472 | 1.97ms | 223ns | 862ns | 0 | 0 | 0 | 73 B |
| #7688 | OptimizedCharSliceWithPool |
net6.0 | 800μs | 65.8ns | 255ns | 0 | 0 | 0 | 2 B |
| #7688 | OptimizedCharSliceWithPool |
netcoreapp3.1 | 887μs | 68.4ns | 265ns | 0 | 0 | 0 | 1 B |
| #7688 | OptimizedCharSliceWithPool |
net472 | 1.15ms | 119ns | 459ns | 0 | 0 | 0 | 47 B |
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed ✔️ More allocations ⚠️
More allocations ⚠️ in #7688
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net472
56.03 KB
56.42 KB
394 B
0.70%
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net472 | 56.03 KB | 56.42 KB | 394 B | 0.70% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | WriteAndFlushEnrichedTraces |
net6.0 | 685μs | 691ns | 2.59μs | 0 | 0 | 0 | 41.65 KB |
| master | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 788μs | 4.27μs | 24.5μs | 0 | 0 | 0 | 41.96 KB |
| master | WriteAndFlushEnrichedTraces |
net472 | 888μs | 2.98μs | 11.2μs | 4.46 | 0 | 0 | 56.03 KB |
| #7688 | WriteAndFlushEnrichedTraces |
net6.0 | 763μs | 4.34μs | 30.1μs | 0 | 0 | 0 | 41.68 KB |
| #7688 | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 758μs | 3.34μs | 12.5μs | 0 | 0 | 0 | 41.81 KB |
| #7688 | WriteAndFlushEnrichedTraces |
net472 | 947μs | 1.6μs | 6.18μs | 8.33 | 0 | 0 | 56.42 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.91μs | 8.24ns | 29.7ns | 0 | 0 | 0 | 1.02 KB |
| master | ExecuteNonQuery |
netcoreapp3.1 | 2.64μs | 5.83ns | 22.6ns | 0 | 0 | 0 | 1.02 KB |
| master | ExecuteNonQuery |
net472 | 2.88μs | 4.19ns | 16.2ns | 0.145 | 0.0145 | 0 | 987 B |
| #7688 | ExecuteNonQuery |
net6.0 | 1.84μs | 6.39ns | 24.7ns | 0 | 0 | 0 | 1.02 KB |
| #7688 | ExecuteNonQuery |
netcoreapp3.1 | 2.64μs | 12.2ns | 48.7ns | 0 | 0 | 0 | 1.02 KB |
| #7688 | ExecuteNonQuery |
net472 | 2.89μs | 5.4ns | 20.9ns | 0.145 | 0.0145 | 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.72μs | 2.57ns | 9.94ns | 0 | 0 | 0 | 1.03 KB |
| master | CallElasticsearch |
netcoreapp3.1 | 2.24μs | 9.43ns | 36.5ns | 0 | 0 | 0 | 1.03 KB |
| master | CallElasticsearch |
net472 | 3.72μs | 4.5ns | 17.4ns | 0.149 | 0 | 0 | 1.04 KB |
| master | CallElasticsearchAsync |
net6.0 | 1.88μs | 4.26ns | 16.5ns | 0 | 0 | 0 | 1.01 KB |
| master | CallElasticsearchAsync |
netcoreapp3.1 | 2.4μs | 10.9ns | 42.1ns | 0 | 0 | 0 | 1.08 KB |
| master | CallElasticsearchAsync |
net472 | 3.73μs | 3.64ns | 13.1ns | 0.167 | 0 | 0 | 1.1 KB |
| #7688 | CallElasticsearch |
net6.0 | 1.74μs | 8.77ns | 40.2ns | 0 | 0 | 0 | 1.03 KB |
| #7688 | CallElasticsearch |
netcoreapp3.1 | 2.24μs | 10.6ns | 42.2ns | 0 | 0 | 0 | 1.03 KB |
| #7688 | CallElasticsearch |
net472 | 3.61μs | 3.91ns | 15.1ns | 0.162 | 0 | 0 | 1.04 KB |
| #7688 | CallElasticsearchAsync |
net6.0 | 1.82μs | 7.63ns | 29.5ns | 0 | 0 | 0 | 1.01 KB |
| #7688 | CallElasticsearchAsync |
netcoreapp3.1 | 2.39μs | 4.66ns | 18.1ns | 0 | 0 | 0 | 1.08 KB |
| #7688 | CallElasticsearchAsync |
net472 | 3.75μs | 5.73ns | 22.2ns | 0.167 | 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.94μs | 3.89ns | 15.1ns | 0 | 0 | 0 | 952 B |
| master | ExecuteAsync |
netcoreapp3.1 | 2.49μs | 7.56ns | 28.3ns | 0 | 0 | 0 | 952 B |
| master | ExecuteAsync |
net472 | 2.61μs | 2.16ns | 8.07ns | 0.142 | 0 | 0 | 915 B |
| #7688 | ExecuteAsync |
net6.0 | 1.83μs | 0.986ns | 3.82ns | 0 | 0 | 0 | 952 B |
| #7688 | ExecuteAsync |
netcoreapp3.1 | 2.46μs | 3.12ns | 12.1ns | 0 | 0 | 0 | 952 B |
| #7688 | ExecuteAsync |
net472 | 2.64μs | 2.37ns | 9.16ns | 0.133 | 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.33μs | 7.79ns | 29.1ns | 0 | 0 | 0 | 2.36 KB |
| master | SendAsync |
netcoreapp3.1 | 8.77μs | 16.5ns | 63.9ns | 0 | 0 | 0 | 2.9 KB |
| master | SendAsync |
net472 | 12.2μs | 13.5ns | 52.2ns | 0.489 | 0 | 0 | 3.18 KB |
| #7688 | SendAsync |
net6.0 | 7.09μs | 7.74ns | 30ns | 0 | 0 | 0 | 2.36 KB |
| #7688 | SendAsync |
netcoreapp3.1 | 8.75μs | 15.7ns | 58.6ns | 0 | 0 | 0 | 2.9 KB |
| #7688 | SendAsync |
net472 | 12.1μs | 9.92ns | 38.4ns | 0.484 | 0 | 0 | 3.18 KB |
Benchmarks.Trace.Iast.StringAspectsBenchmark - Same speed ✔️ Fewer allocations 🎉
Fewer allocations 🎉 in #7688
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1
281.72 KB
274.15 KB
-7.57 KB
-2.69%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑netcoreapp3.1
45.55 KB
42.72 KB
-2.83 KB
-6.22%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0
275.39 KB
258.07 KB
-17.32 KB
-6.29%
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1 | 281.72 KB | 274.15 KB | -7.57 KB | -2.69% |
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑netcoreapp3.1 | 45.55 KB | 42.72 KB | -2.83 KB | -6.22% |
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0 | 275.39 KB | 258.07 KB | -17.32 KB | -6.29% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | StringConcatBenchmark |
net6.0 | 43μs | 234ns | 1.28μs | 0 | 0 | 0 | 43.77 KB |
| master | StringConcatBenchmark |
netcoreapp3.1 | 57μs | 1μs | 9.98μs | 0 | 0 | 0 | 45.55 KB |
| master | StringConcatBenchmark |
net472 | 57.3μs | 124ns | 446ns | 0 | 0 | 0 | 57.34 KB |
| master | StringConcatAspectBenchmark |
net6.0 | 496μs | 2.24μs | 8.08μs | 0 | 0 | 0 | 275.39 KB |
| master | StringConcatAspectBenchmark |
netcoreapp3.1 | 572μs | 2.49μs | 8.96μs | 0 | 0 | 0 | 281.72 KB |
| master | StringConcatAspectBenchmark |
net472 | 409μs | 2.34μs | 16.5μs | 0 | 0 | 0 | 278.53 KB |
| #7688 | StringConcatBenchmark |
net6.0 | 42μs | 207ns | 1.15μs | 0 | 0 | 0 | 43.8 KB |
| #7688 | StringConcatBenchmark |
netcoreapp3.1 | 47.6μs | 213ns | 1.04μs | 0 | 0 | 0 | 42.72 KB |
| #7688 | StringConcatBenchmark |
net472 | 57.4μs | 264ns | 1.06μs | 0 | 0 | 0 | 57.34 KB |
| #7688 | StringConcatAspectBenchmark |
net6.0 | 447μs | 1.5μs | 7.02μs | 0 | 0 | 0 | 258.07 KB |
| #7688 | StringConcatAspectBenchmark |
netcoreapp3.1 | 511μs | 2.22μs | 8.02μs | 0 | 0 | 0 | 274.15 KB |
| #7688 | StringConcatAspectBenchmark |
net472 | 403μs | 2.18μs | 12.4μs | 0 | 0 | 0 | 278.53 KB |
Benchmarks.Trace.ILoggerBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | EnrichedLog |
net6.0 | 2.64μs | 13.2ns | 60.5ns | 0 | 0 | 0 | 1.7 KB |
| master | EnrichedLog |
netcoreapp3.1 | 3.61μs | 14.1ns | 54.8ns | 0 | 0 | 0 | 1.7 KB |
| master | EnrichedLog |
net472 | 3.86μs | 4.57ns | 17.1ns | 0.252 | 0 | 0 | 1.64 KB |
| #7688 | EnrichedLog |
net6.0 | 2.67μs | 10.7ns | 41.4ns | 0 | 0 | 0 | 1.7 KB |
| #7688 | EnrichedLog |
netcoreapp3.1 | 3.65μs | 5.64ns | 21.8ns | 0 | 0 | 0 | 1.7 KB |
| #7688 | EnrichedLog |
net472 | 3.91μs | 1.89ns | 6.81ns | 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 | 335ns | 1.16μs | 0 | 0 | 0 | 4.31 KB |
| master | EnrichedLog |
netcoreapp3.1 | 131μs | 617ns | 2.47μs | 0 | 0 | 0 | 4.31 KB |
| master | EnrichedLog |
net472 | 169μs | 208ns | 806ns | 0 | 0 | 0 | 4.52 KB |
| #7688 | EnrichedLog |
net6.0 | 128μs | 206ns | 769ns | 0 | 0 | 0 | 4.31 KB |
| #7688 | EnrichedLog |
netcoreapp3.1 | 127μs | 148ns | 512ns | 0 | 0 | 0 | 4.31 KB |
| #7688 | EnrichedLog |
net472 | 168μs | 60.3ns | 233ns | 0 | 0 | 0 | 4.52 KB |
Benchmarks.Trace.NLogBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | EnrichedLog |
net6.0 | 5.09μs | 16.2ns | 62.9ns | 0 | 0 | 0 | 2.26 KB |
| master | EnrichedLog |
netcoreapp3.1 | 6.67μs | 14ns | 54.2ns | 0 | 0 | 0 | 2.26 KB |
| master | EnrichedLog |
net472 | 7.52μs | 7.68ns | 29.8ns | 0.299 | 0 | 0 | 2.08 KB |
| #7688 | EnrichedLog |
net6.0 | 5.03μs | 11.8ns | 45.7ns | 0 | 0 | 0 | 2.26 KB |
| #7688 | EnrichedLog |
netcoreapp3.1 | 6.86μs | 6.39ns | 23.9ns | 0 | 0 | 0 | 2.26 KB |
| #7688 | EnrichedLog |
net472 | 7.7μs | 14.4ns | 55.8ns | 0.311 | 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.97μs | 9.63ns | 43.1ns | 0 | 0 | 0 | 1.2 KB |
| master | SendReceive |
netcoreapp3.1 | 2.65μs | 12.6ns | 51.8ns | 0 | 0 | 0 | 1.2 KB |
| master | SendReceive |
net472 | 3.05μs | 1.05ns | 3.78ns | 0.185 | 0 | 0 | 1.2 KB |
| #7688 | SendReceive |
net6.0 | 2.05μs | 5.33ns | 20.7ns | 0 | 0 | 0 | 1.2 KB |
| #7688 | SendReceive |
netcoreapp3.1 | 2.69μs | 5.23ns | 20.3ns | 0 | 0 | 0 | 1.2 KB |
| #7688 | SendReceive |
net472 | 3.07μs | 1.35ns | 5.22ns | 0.184 | 0 | 0 | 1.2 KB |
Benchmarks.Trace.SerilogBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | EnrichedLog |
net6.0 | 4.36μs | 16.6ns | 64.4ns | 0 | 0 | 0 | 1.58 KB |
| master | EnrichedLog |
netcoreapp3.1 | 5.66μs | 9.37ns | 36.3ns | 0 | 0 | 0 | 1.63 KB |
| master | EnrichedLog |
net472 | 6.58μs | 5.97ns | 23.1ns | 0.294 | 0 | 0 | 2.03 KB |
| #7688 | EnrichedLog |
net6.0 | 4.47μs | 4.79ns | 18.5ns | 0 | 0 | 0 | 1.58 KB |
| #7688 | EnrichedLog |
netcoreapp3.1 | 5.77μs | 8.2ns | 31.8ns | 0 | 0 | 0 | 1.63 KB |
| #7688 | EnrichedLog |
net472 | 6.81μs | 7.34ns | 27.5ns | 0.304 | 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 | 757ns | 4.15ns | 23.8ns | 0 | 0 | 0 | 576 B |
| master | StartFinishSpan |
netcoreapp3.1 | 959ns | 4.17ns | 15.6ns | 0 | 0 | 0 | 576 B |
| master | StartFinishSpan |
net472 | 953ns | 0.0777ns | 0.28ns | 0.0911 | 0 | 0 | 578 B |
| master | StartFinishScope |
net6.0 | 930ns | 4.33ns | 17.3ns | 0 | 0 | 0 | 696 B |
| master | StartFinishScope |
netcoreapp3.1 | 1.19μs | 6.27ns | 31.4ns | 0 | 0 | 0 | 696 B |
| master | StartFinishScope |
net472 | 1.14μs | 0.408ns | 1.58ns | 0.103 | 0 | 0 | 658 B |
| #7688 | StartFinishSpan |
net6.0 | 787ns | 3.95ns | 18.1ns | 0 | 0 | 0 | 576 B |
| #7688 | StartFinishSpan |
netcoreapp3.1 | 961ns | 5.2ns | 28ns | 0 | 0 | 0 | 576 B |
| #7688 | StartFinishSpan |
net472 | 972ns | 0.543ns | 2.1ns | 0.0875 | 0 | 0 | 578 B |
| #7688 | StartFinishScope |
net6.0 | 931ns | 0.439ns | 1.7ns | 0 | 0 | 0 | 696 B |
| #7688 | StartFinishScope |
netcoreapp3.1 | 1.2μs | 2.14ns | 8.27ns | 0 | 0 | 0 | 696 B |
| #7688 | StartFinishScope |
net472 | 1.18μs | 0.583ns | 2.26ns | 0.1 | 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 | 5.65ns | 29.9ns | 0 | 0 | 0 | 696 B |
| master | RunOnMethodBegin |
netcoreapp3.1 | 1.42μs | 7.31ns | 35.8ns | 0 | 0 | 0 | 697 B |
| master | RunOnMethodBegin |
net472 | 1.43μs | 0.603ns | 2.33ns | 0.0998 | 0 | 0 | 658 B |
| #7688 | RunOnMethodBegin |
net6.0 | 1.04μs | 5.42ns | 28.1ns | 0 | 0 | 0 | 696 B |
| #7688 | RunOnMethodBegin |
netcoreapp3.1 | 1.41μs | 7.35ns | 34.5ns | 0 | 0 | 0 | 696 B |
| #7688 | RunOnMethodBegin |
net472 | 1.52μs | 1.66ns | 6.42ns | 0.0985 | 0 | 0 | 658 B |
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:
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 (7688) - mean (82ms) : crit, 76, 88
. : crit, milestone, 82,
master - mean (76ms) : 74, 78
. : milestone, 76,
section Baseline
This PR (7688) - mean (77ms) : 72, 83
. : milestone, 77,
master - mean (74ms) : 67, 80
. : milestone, 74,
section CallTarget+Inlining+NGEN
This PR (7688) - mean (1,139ms) : 1037, 1241
. : milestone, 1139,
master - mean (1,081ms) : 1000, 1163
. : milestone, 1081,
gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7688) - mean (120ms) : 113, 126
. : milestone, 120,
master - mean (114ms) : 109, 120
. : milestone, 114,
section Baseline
This PR (7688) - mean (118ms) : 111, 126
. : milestone, 118,
master - mean (112ms) : 107, 117
. : milestone, 112,
section CallTarget+Inlining+NGEN
This PR (7688) - mean (806ms) : 759, 852
. : milestone, 806,
master - mean (782ms) : 741, 824
. : milestone, 782,
gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7688) - mean (106ms) : 99, 113
. : milestone, 106,
master - mean (104ms) : 97, 111
. : milestone, 104,
section Baseline
This PR (7688) - mean (105ms) : 98, 113
. : milestone, 105,
master - mean (104ms) : 97, 112
. : milestone, 104,
section CallTarget+Inlining+NGEN
This PR (7688) - mean (753ms) : 704, 803
. : milestone, 753,
master - mean (780ms) : 709, 850
. : milestone, 780,
gantt
title Execution time (ms) FakeDbCommand (.NET 8)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7688) - mean (104ms) : 98, 109
. : milestone, 104,
master - mean (108ms) : 100, 116
. : milestone, 108,
section Baseline
This PR (7688) - mean (101ms) : 95, 108
. : milestone, 101,
master - mean (108ms) : 100, 116
. : milestone, 108,
section CallTarget+Inlining+NGEN
This PR (7688) - mean (706ms) : 674, 738
. : milestone, 706,
master - mean (736ms) : 697, 776
. : milestone, 736,
gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.8)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7688) - mean (197ms) : 195, 200
. : milestone, 197,
master - mean (199ms) : 193, 204
. : milestone, 199,
section Baseline
This PR (7688) - mean (193ms) : 189, 198
. : milestone, 193,
master - mean (196ms) : 188, 204
. : milestone, 196,
section CallTarget+Inlining+NGEN
This PR (7688) - mean (1,166ms) : 1110, 1222
. : milestone, 1166,
master - mean (1,189ms) : 1102, 1276
. : milestone, 1189,
gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7688) - mean (278ms) : 272, 283
. : milestone, 278,
master - mean (281ms) : 271, 291
. : milestone, 281,
section Baseline
This PR (7688) - mean (277ms) : 271, 283
. : milestone, 277,
master - mean (279ms) : 272, 285
. : milestone, 279,
section CallTarget+Inlining+NGEN
This PR (7688) - mean (946ms) : 897, 995
. : milestone, 946,
master - mean (957ms) : 899, 1015
. : milestone, 957,
gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7688) - mean (270ms) : 266, 274
. : milestone, 270,
master - mean (272ms) : 265, 279
. : milestone, 272,
section Baseline
This PR (7688) - mean (270ms) : 266, 274
. : milestone, 270,
master - mean (270ms) : 265, 274
. : milestone, 270,
section CallTarget+Inlining+NGEN
This PR (7688) - mean (929ms) : 868, 990
. : milestone, 929,
master - mean (944ms) : 883, 1004
. : milestone, 944,
gantt
title Execution time (ms) HttpMessageHandler (.NET 8)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7688) - mean (270ms) : 266, 274
. : milestone, 270,
master - mean (271ms) : 264, 279
. : milestone, 271,
section Baseline
This PR (7688) - mean (269ms) : 264, 273
. : milestone, 269,
master - mean (271ms) : 263, 279
. : milestone, 271,
section CallTarget+Inlining+NGEN
This PR (7688) - mean (851ms) : 828, 875
. : milestone, 851,
master - mean (863ms) : 843, 882
. : milestone, 863,
|
d40a9fb to
26d4bf8
Compare
9501463 to
25e86cb
Compare
26d4bf8 to
4b53dd1
Compare
25e86cb to
f3c200d
Compare
4b53dd1 to
70e632e
Compare
f3c200d to
75c1854
Compare
631521a to
346726a
Compare
63f5f33 to
bb9d5d8
Compare
346726a to
e3b3d12
Compare
bb9d5d8 to
f819c41
Compare
394dace to
c8b7ab3
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
This comment has been minimized.
This comment has been minimized.
andrewlock
left a comment
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.
LGTM, just some minor suggestions
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.
These changes to the one-pipeline always make me super-nervous, I wish we had "release notes" for them 🙁
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.
yeah.. fwiw, it comes from this PR
| public const string ProfilingEnabled = "DD_PROFILING_ENABLED"; | ||
| public const string CodeHotspotsEnabled = "DD_PROFILING_CODEHOTSPOTS_ENABLED"; | ||
| public const string EndpointProfilingEnabled = "DD_PROFILING_ENDPOINT_COLLECTION_ENABLED"; | ||
| public const string SsiDeployed = "DD_INJECTION_ENABLED"; |
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.
No, it's not 🤔 It's a general "SSI" setting, so maybe we need another category here. Either that, or it's just a "global" setting like DD_API_KEY etc
| .WithKeys( | ||
| string.Format(IntegrationEnabled, upperName), | ||
| string.Format(IntegrationEnabled, integrationName), | ||
| string.Format(IntegrationEnabled, integrationName), |
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.
Duplicate line
| string.Format(IntegrationEnabled, integrationName), |
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.
good catch thanks!
tracer/src/Datadog.Trace/Configuration/supported-configurations-docs.yaml
Show resolved
Hide resolved
c8b7ab3 to
6e6573b
Compare
6e6573b to
7c68ebe
Compare
…#7698) ## Context Part of **Configuration Inversion (Step 3)** - Stack progress: 1. [#7548](#7548) - Add GitLab step and JSON configuration file 2. [#7688](#7688) - Cleanup configuration / platform keys + analyzers 3. **→ [#7698](#7698) - Generate ConfigurationKeys with source generator (this PR)** 4. [#7689](#7689) - Aliases handling via source generator 5. [#7697](#7697) - Replace manual ConfigurationKeys by generated ones in the whole solution ## Summary Adds source generator to auto-generate `ConfigurationKeys` from `supported-configurations.json` with name mapping to preserve existing constant names. ## Changes **Source Generator:** - [ConfigurationKeysGenerator](cci:7://file:///var/folders/4j/q1f1tvc503g_thnq6p79cp500000gp/T/SourceGeneratedDocuments/D0E9C9C62821E2CB6FADE080/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator:0:0-0:0) reads `supported-configurations.json` and [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) - Auto-generates `ConfigurationKeys` with nested product classes (AppSec, CIVisibility, OpenTelemetry, etc.) - Generates XML documentation and `[Obsolete]` attributes from JSON **Configuration Mapping:** - `configuration_keys_mapping.json` maps env vars to original constant names (e.g., `DD_TRACE_ENABLED` → `TraceEnabled`) - Avoids refactoring hundreds of references across codebase **Updates:** - Added missing `DD_TRACE_ACTIVITY_LISTENER_ENABLED` key - Committed temporary [ConfigurationKeys2.g.cs](cci:7://file:///Users/anna.yafi/go/src/github.com/DataDog/dd-trace-dotnet3/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.g.cs:0:0-0:0) files for validation ## Motivation Makes `supported-configurations.json` the single source of truth while preserving existing constant names to avoid massive refactoring. ## Test Coverage - Added `ConfigurationKeysGeneratorTests.cs` with comprehensive unit tests - Tests validate generator output, XML documentation generation, and obsolete attribute application - Tests cover nested product classes, deprecations, and YAML documentation integration - All existing tests pass without modification ## Related Work Builds on #7548 (configuration registry) and #7688 (PlatformKeys separation + analyzers).
…any string key (#7689) ## Context Part of **Configuration Inversion (Step 4)** - Stack progress: 1. [#7548](#7548) - Add GitLab step and JSON configuration file 2. [#7688](#7688) - Cleanup configuration / platform keys + analyzers 3. [#7698](#7698) - Source generator for ConfigurationKeys 4. **→ [#7689](#7689) - Aliases handling and analyzers (this PR)** 5. [#7931](#7931) - Replace manual ConfigurationKeys with generated version 6. #[7932](#7932 Forbid use of System.Environment methods and adapt everywhere ## Summary Adds source generator for configuration key aliases, integrates alias resolution into `ConfigurationBuilder`, and adds Roslyn analyzers to enforce proper configuration key usage. ## Changes **Alias Source Generator:** - `ConfigKeyAliasesSwitcherGenerator` reads aliases from `supported-configurations.json` - Auto-generates switch statements to resolve primary keys from aliases - Generated for all target frameworks (net461, netstandard2.0, netcoreapp3.1, net6.0) **ConfigurationBuilder Improvements:** - Integrated alias resolution directly into `ConfigurationBuilder.WithKeys()` - Removed manual fallback overloads throughout codebase - Added `GetKeyWithAlias()` method to `IConfigurationSource` interface **IntegrationSettings Special Handling:** - Updated to use pattern-based key construction (e.g., `DD_TRACE_{INTEGRATION}_ENABLED`) - Simplified configuration reading by leveraging alias system **Roslyn Analyzers:** - **DD0007**: `PlatformKeysAnalyzer` - Enforces use of `PlatformKeys` for external platform environment variables - **DD0008**: `ConfigurationBuilderWithKeysAnalyzer` - Enforces use of [ConfigurationKeys](cci:2://file:///Users/anna.yafi/go/src/github.com/DataDog/dd-trace-dotnet3/tracer/src/Datadog.Trace/Configuration/ConfigurationKeys.Logging.cs:9:0-58:1)/`PlatformKeys` constants in `ConfigurationBuilder.WithKeys()` calls **Special Cases:** - Fixed `DatadogLoggingFactory` to handle deprecated `DD_TRACE_LOG_PATH` with proper analyzer suppression - Updated configuration tests to work with alias resolution ## Motivation Completes configuration inversion by: - Auto-generating alias resolution from `supported-configurations.json` - Eliminating manual fallback chains - Enforcing compile-time validation of configuration keys - Preventing hardcoded strings and typos ## Test Coverage - Added `ConfigKeyAliasesSwitcherGeneratorTests` with comprehensive test coverage - Added `PlatformKeysAnalyzerTests` with 146 lines of tests - Added `ConfigurationBuilderWithKeysAnalyzerTests` with 538 lines of tests - Updated existing configuration tests for alias support - All tests pass with new alias system ## Related Work Builds on #7548 (configuration registry), #7688 (PlatformKeys separation), and #7698 (source generator for ConfigurationKeys).
…nes in the whole solution (#7931) (This PR is actually #7697 that accidentally got closed) ## Context Part of **Configuration Inversion (Step 5)** - Stack progress: 1. [#7548](#7548) - Add GitLab step and JSON configuration file 2. [#7688](#7688) - Cleanup configuration / platform keys + source generator 3. [#7698](#7698) - Aliases handling via source generator 4. [#7689](#7689) - Analyzers for platform and ConfigurationBuilder 5. **→ [#7931](#7697) - Replace manual ConfigurationKeys by generated ones in the whole solution (this PR)** 6. [#7932](#7932) - Forbid use of System.Environment methods and adapt everywhere 7. [#7937](#7937) - Integration names to generated keys ## Summary of changes Fixed the [ConfigurationKeysGenerator](cci:2://file:///Users/anna.yafi/go/src/github.com/DataDog/dd-trace-dotnet3/tracer/src/Datadog.Trace.SourceGenerators/Configuration/ConfigurationKeysGenerator.cs:21:0-958:1) to properly read and apply the [configuration_keys_mapping.json](cci:7://file:///Users/anna.yafi/go/src/github.com/DataDog/dd-trace-dotnet3/tracer/src/Datadog.Trace/Configuration/configuration_keys_mapping.json:0:0-0:0) file, and extracted common file header comments to a reusable constant. **Key changes:** - Fixed JSON array extraction in [ParseMappingFile](cci:1://file:///Users/anna.yafi/go/src/github.com/DataDog/dd-trace-dotnet3/tracer/src/Datadog.Trace.SourceGenerators/Configuration/ConfigurationKeysGenerator.cs:350:4-524:5) method - the generator was incorrectly trying to extract the `"mappings"` field as an object instead of an array - Extracted configuration generator comments to `Constants.ConfigurationGeneratorComment` for reuse across multiple generators - Updated both [ConfigurationKeysGenerator](cci:2://file:///Users/anna.yafi/go/src/github.com/DataDog/dd-trace-dotnet3/tracer/src/Datadog.Trace.SourceGenerators/Configuration/ConfigurationKeysGenerator.cs:21:0-958:1) and [ConfigKeyAliasesSwitcherGenerator](cci:2://file:///Users/anna.yafi/go/src/github.com/DataDog/dd-trace-dotnet3/tracer/src/Datadog.Trace.SourceGenerators/Configuration/ConfigKeyAliasesSwitcherGenerator.cs:24:0-340:1) to use the shared constant - Added documentation as to how to add a key now ## Reason for change The [configuration_keys_mapping.json](cci:7://file:///Users/anna.yafi/go/src/github.com/DataDog/dd-trace-dotnet3/tracer/src/Datadog.Trace/Configuration/configuration_keys_mapping.json:0:0-0:0) 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 1. **Fixed array extraction logic**: Replaced the call to [JsonReader.ExtractJsonObjectSection()](cci:1://file:///Users/anna.yafi/go/src/github.com/DataDog/dd-trace-dotnet3/tracer/src/Datadog.Trace.SourceGenerators/Configuration/JsonReader.cs:16:4-91:5) with custom array extraction code that: - Finds the `"mappings":` key in the JSON - Locates the opening `[` bracket - Tracks bracket nesting to find the matching closing `]` - Extracts the complete array content 2. **Resolved variable scope issue**: Reused existing `inString` and `escapeNext` variables from the outer scope instead of redeclaring them, fixing compilation errors. 3. **Centralized header comments**: Created `Constants.ConfigurationGeneratorComment` containing the standardized auto-generation notice and updated both generators to use it. ## Test coverage - Verified the generator builds successfully without errors - The mapping file is now properly parsed and applied during code generation - Generated constant names now match the mappings defined in [configuration_keys_mapping.json](cci:7://file:///Users/anna.yafi/go/src/github.com/DataDog/dd-trace-dotnet3/tracer/src/Datadog.Trace/Configuration/configuration_keys_mapping.json:0:0-0:0) ## Other details This fix ensures that the explicit naming conventions defined in [configuration_keys_mapping.json](cci:7://file:///Users/anna.yafi/go/src/github.com/DataDog/dd-trace-dotnet3/tracer/src/Datadog.Trace/Configuration/configuration_keys_mapping.json:0:0-0:0) are respected, maintaining consistency with the existing codebase and preventing future confusion when constant names don't match their expected values. --------- Co-authored-by: Andrew Lock <andrew.lock@datadoghq.com>
…apt everywhere (#7932) ## Context Part of **Configuration Inversion (Step 6)** - Stack progress: 1. [#7548](#7548) - Add GitLab step and JSON configuration file 2. [#7688](#7688) - Cleanup configuration / platform keys + source generator 3. [#7698](#7698) - Aliases handling via source generator 4. [#7689](#7689) - Analyzers for platform and ConfigurationBuilder 5. [#7931](#7931) - Replace manual ConfigurationKeys by generated ones in the whole solution 6. **→ [#7932](#7932) - Forbid use of System.Environment methods and adapt everywhere (this PR)** 7. [#7937](#7937) - Integration names to generated keys I'll update the PR summary to mention the YAML documentation file: ## Summary of changes Banned direct `System.Environment.GetEnvironmentVariable()` usage and migrated all environment variable access to use `EnvironmentHelpers` with strongly-typed [ConfigurationKeys](cci:2://file:///Users/anna.yafi/go/src/github.com/DataDog/dd-trace-dotnet3/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys.g.cs:15:0-737:1) and `PlatformKeys` constants. ### Key changes: - **Banned `System.Environment.GetEnvironmentVariable()`** via `BannedApiAnalyzers` - **Added `EnvironmentGetEnvironmentVariableAnalyzer` (DD0009)** to enforce [ConfigurationKeys](cci:2://file:///Users/anna.yafi/go/src/github.com/DataDog/dd-trace-dotnet3/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys.g.cs:15:0-737:1)/`PlatformKeys` usage only - **Nested `PlatformKeys` by category** (Ci, Aws, AzureAppService, ServiceFabric, DotNet) - **Migrated ~50+ files** across CI Visibility, AWS Lambda, AppSec, Telemetry, Profiler, and Agent components - **Added missing keys** to [supported-configurations.json](cci:7://file:///Users/anna.yafi/go/src/github.com/DataDog/dd-trace-dotnet3/tracer/src/Datadog.Trace/Configuration/supported-configurations.json:0:0-0:0) and their documentation to [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) ## Reason for change Direct `System.Environment.GetEnvironmentVariable()` calls with string literals are error-prone. Centralizing through `EnvironmentHelpers` with strongly-typed constants provides compile-time validation, discoverability, and refactoring safety. ## Implementation details 1. **Banned API enforcement** - Added `BannedSymbols.txt` and configured `.editorconfig` to treat RS0030 as error (vendored code excluded) 2. **Custom analyzer** - DD0009 validates all `EnvironmentHelpers` calls accept only [ConfigurationKeys](cci:2://file:///Users/anna.yafi/go/src/github.com/DataDog/dd-trace-dotnet3/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys.g.cs:15:0-737:1)/`PlatformKeys` constants, rejecting hardcoded strings 3. **PlatformKeys organization** - Nested by category for better discoverability 4. **EnvironmentHelpers refactoring** - Added overloads for nested class constants, maintained backward compatibility 5. **Configuration documentation** - Added missing configuration keys to [supported-configurations.json](cci:7://file:///Users/anna.yafi/go/src/github.com/DataDog/dd-trace-dotnet3/tracer/src/Datadog.Trace/Configuration/supported-configurations.json:0:0-0:0) and comprehensive XML documentation to [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), which the source generator uses to generate XML doc comments in [ConfigurationKeys](cci:2://file:///Users/anna.yafi/go/src/github.com/DataDog/dd-trace-dotnet3/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys.g.cs:15:0-737:1) classes ## Test coverage - ✅ Comprehensive analyzer tests covering valid/invalid scenarios - ✅ All existing unit tests pass - ✅ Banned API analyzer correctly flags direct `System.Environment` usage ## Other details +2,600/-940 lines. No breaking changes, negligible performance impact.
Context
Part of Configuration Inversion (Step 2) - Stack progress:
Summary
Separates platform-specific environment variables into
PlatformKeysclass and adds Roslyn analyzers to enforce proper usage of configuration keys throughout the codebase.Changes
Platform Keys Separation:
PlatformKeysclass for external platform environment variables (AWS, Azure, GCP, Kubernetes, CLR Profiler), those that don't start with DD_ and come from other platforms.PlatformKeysfor platform-specific variablesConfigurationKeysfocused only on Datadog configurationRoslyn Analyzers:
PlatformKeysfor external platform environment variablesConfigurationKeysorPlatformKeysconstants inConfigurationBuilder.WithKeys()callsConfiguration Mapping:
configuration_keys_mapping.jsonto map environment variable names to theirConfigurationKeysconstant names, so that we avoid renaming hundreds of variables according to automatically source generated deducted ones.Code Updates:
TracerSettings, test files, and profiler code to usePlatformKeysConfigurationKeyswith generated version fromsupported-configurations.jsonDD_TRACE_LOG_PATHto configuration registryMotivation
Ensures clean separation between Datadog and platform configuration by:
Validation
Related Work
This PR builds on the configuration registry foundation established in #7548:
2639cf0addedsupported-configurations.jsonwith ~280 keys, aliases, deprecations, and GitLab CI validation70e632eadded supported-configurations-docs.yaml with XML documentation for automated doc generation