-
Notifications
You must be signed in to change notification settings - Fork 150
[Config Registry] 5/5 Replace manual ConfigurationKeys by generated ones in the whole solution #7697
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: anna/config-inversion-configuration-analyzers-4
Are you sure you want to change the base?
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 ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.AgentWriterBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.Asm.AppSecBodyBenchmark - Unknown 🤷 Same allocations ✔️Raw results
Benchmarks.Trace.Asm.AppSecEncoderBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.Asm.AppSecWafBenchmark - Slower
|
| Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
|---|---|---|---|---|
| Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack‑netcoreapp3.1 | 2.511 | 295,482.55 | 742,068.00 |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | RunWafRealisticBenchmark |
net6.0 | 393μs | 72.6ns | 272ns | 0 | 0 | 0 | 4.55 KB |
| master | RunWafRealisticBenchmark |
netcoreapp3.1 | 409μs | 421ns | 1.52μs | 0 | 0 | 0 | 4.48 KB |
| master | RunWafRealisticBenchmark |
net472 | 427μs | 60.9ns | 236ns | 0 | 0 | 0 | 4.66 KB |
| master | RunWafRealisticBenchmarkWithAttack |
net6.0 | 285μs | 52.4ns | 196ns | 0 | 0 | 0 | 2.24 KB |
| master | RunWafRealisticBenchmarkWithAttack |
netcoreapp3.1 | 295μs | 40.9ns | 142ns | 0 | 0 | 0 | 2.22 KB |
| master | RunWafRealisticBenchmarkWithAttack |
net472 | 310μs | 21.7ns | 83.9ns | 0 | 0 | 0 | 2.29 KB |
| #7697 | RunWafRealisticBenchmark |
net6.0 | 395μs | 59.1ns | 221ns | 0 | 0 | 0 | 4.55 KB |
| #7697 | RunWafRealisticBenchmark |
netcoreapp3.1 | 417μs | 109ns | 379ns | 0 | 0 | 0 | 4.48 KB |
| #7697 | RunWafRealisticBenchmark |
net472 | 427μs | 40.8ns | 153ns | 0 | 0 | 0 | 4.68 KB |
| #7697 | RunWafRealisticBenchmarkWithAttack |
net6.0 | 285μs | 74ns | 277ns | 0 | 0 | 0 | 2.24 KB |
| #7697 | RunWafRealisticBenchmarkWithAttack |
netcoreapp3.1 | 705μs | 10.8μs | 105μs | 0 | 0 | 0 | 2.22 KB |
| #7697 | RunWafRealisticBenchmarkWithAttack |
net472 | 310μs | 48.9ns | 183ns | 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 | 62.3μs | 292ns | 1.13μs | 0 | 0 | 0 | 14.52 KB |
| master | SendRequest |
netcoreapp3.1 | 71.4μs | 171ns | 641ns | 0 | 0 | 0 | 17.42 KB |
| master | SendRequest |
net472 | 0.00228ns | 0.000869ns | 0.00337ns | 0 | 0 | 0 | 0 b |
| #7697 | SendRequest |
net6.0 | 61.7μs | 132ns | 512ns | 0 | 0 | 0 | 14.52 KB |
| #7697 | SendRequest |
netcoreapp3.1 | 71.3μs | 80.9ns | 303ns | 0 | 0 | 0 | 17.42 KB |
| #7697 | SendRequest |
net472 | 0.000952ns | 0.000674ns | 0.00261ns | 0 | 0 | 0 | 0 b |
Benchmarks.Trace.CharSliceBenchmark - Same speed ✔️ More allocations ⚠️
More allocations ⚠️ in #7697
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net6.0
2 B
4 B
2 B
100.00%
Fewer allocations 🎉 in #7697
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net6.0
5 B
3 B
-2 B
-40.00%
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑netcoreapp3.1
1 B
0 b
-1 B
-100.00%
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net6.0 | 2 B | 4 B | 2 B | 100.00% |
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net6.0 | 5 B | 3 B | -2 B | -40.00% |
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑netcoreapp3.1 | 1 B | 0 b | -1 B | -100.00% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | OriginalCharSlice |
net6.0 | 1.91ms | 391ns | 1.46μs | 0 | 0 | 0 | 640 KB |
| master | OriginalCharSlice |
netcoreapp3.1 | 2.12ms | 4.75μs | 17.1μs | 0 | 0 | 0 | 640 KB |
| master | OriginalCharSlice |
net472 | 2.72ms | 1.02μs | 3.68μs | 100 | 0 | 0 | 641.95 KB |
| master | OptimizedCharSlice |
net6.0 | 1.34ms | 268ns | 1.04μs | 0 | 0 | 0 | 2 B |
| master | OptimizedCharSlice |
netcoreapp3.1 | 1.65ms | 687ns | 2.66μs | 0 | 0 | 0 | 1 B |
| master | OptimizedCharSlice |
net472 | 1.99ms | 253ns | 948ns | 0 | 0 | 0 | 73 B |
| master | OptimizedCharSliceWithPool |
net6.0 | 886μs | 41.6ns | 161ns | 0 | 0 | 0 | 5 B |
| master | OptimizedCharSliceWithPool |
netcoreapp3.1 | 808μs | 96.8ns | 375ns | 0 | 0 | 0 | 1 B |
| master | OptimizedCharSliceWithPool |
net472 | 1.14ms | 132ns | 495ns | 0 | 0 | 0 | 47 B |
| #7697 | OriginalCharSlice |
net6.0 | 1.88ms | 4.14μs | 16μs | 0 | 0 | 0 | 640.01 KB |
| #7697 | OriginalCharSlice |
netcoreapp3.1 | 2.13ms | 2.83μs | 11μs | 0 | 0 | 0 | 640 KB |
| #7697 | OriginalCharSlice |
net472 | 2.68ms | 138ns | 517ns | 100 | 0 | 0 | 641.95 KB |
| #7697 | OptimizedCharSlice |
net6.0 | 1.35ms | 449ns | 1.74μs | 0 | 0 | 0 | 4 B |
| #7697 | OptimizedCharSlice |
netcoreapp3.1 | 1.78ms | 452ns | 1.75μs | 0 | 0 | 0 | 1 B |
| #7697 | OptimizedCharSlice |
net472 | 2.04ms | 419ns | 1.62μs | 0 | 0 | 0 | 73 B |
| #7697 | OptimizedCharSliceWithPool |
net6.0 | 877μs | 53.1ns | 206ns | 0 | 0 | 0 | 3 B |
| #7697 | OptimizedCharSliceWithPool |
netcoreapp3.1 | 808μs | 31ns | 112ns | 0 | 0 | 0 | 0 b |
| #7697 | OptimizedCharSliceWithPool |
net472 | 1.14ms | 174ns | 673ns | 0 | 0 | 0 | 47 B |
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Faster 🎉 Same allocations ✔️
Faster 🎉 in #7697
Benchmark
base/diff
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑netcoreapp3.1
1.164
847,574.55
728,237.85
several?
| Benchmark | base/diff | Base Median (ns) | Diff Median (ns) | Modality |
|---|---|---|---|---|
| Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑netcoreapp3.1 | 1.164 | 847,574.55 | 728,237.85 | several? |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | WriteAndFlushEnrichedTraces |
net6.0 | 658μs | 3.19μs | 13.2μs | 0 | 0 | 0 | 41.75 KB |
| master | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 819μs | 4.8μs | 45.8μs | 0 | 0 | 0 | 41.73 KB |
| master | WriteAndFlushEnrichedTraces |
net472 | 910μs | 1.67μs | 6.24μs | 8.33 | 0 | 0 | 56.08 KB |
| #7697 | WriteAndFlushEnrichedTraces |
net6.0 | 719μs | 3.64μs | 20.6μs | 0 | 0 | 0 | 41.66 KB |
| #7697 | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 727μs | 3.87μs | 19.4μs | 0 | 0 | 0 | 41.84 KB |
| #7697 | WriteAndFlushEnrichedTraces |
net472 | 919μs | 3.45μs | 13.4μs | 4.46 | 0 | 0 | 55.92 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.93μs | 6.47ns | 24.2ns | 0 | 0 | 0 | 1.02 KB |
| master | ExecuteNonQuery |
netcoreapp3.1 | 2.64μs | 12.1ns | 46.9ns | 0 | 0 | 0 | 1.02 KB |
| master | ExecuteNonQuery |
net472 | 2.9μs | 3.48ns | 13.5ns | 0.147 | 0.0147 | 0 | 987 B |
| #7697 | ExecuteNonQuery |
net6.0 | 1.95μs | 1.97ns | 7.61ns | 0 | 0 | 0 | 1.02 KB |
| #7697 | ExecuteNonQuery |
netcoreapp3.1 | 2.58μs | 8.09ns | 31.3ns | 0 | 0 | 0 | 1.02 KB |
| #7697 | ExecuteNonQuery |
net472 | 2.93μs | 3.96ns | 15.3ns | 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.7μs | 7.85ns | 31.4ns | 0 | 0 | 0 | 1.03 KB |
| master | CallElasticsearch |
netcoreapp3.1 | 2.23μs | 10.7ns | 45.6ns | 0 | 0 | 0 | 1.03 KB |
| master | CallElasticsearch |
net472 | 3.57μs | 2.64ns | 10.2ns | 0.16 | 0 | 0 | 1.04 KB |
| master | CallElasticsearchAsync |
net6.0 | 1.85μs | 6.47ns | 25ns | 0 | 0 | 0 | 1.01 KB |
| master | CallElasticsearchAsync |
netcoreapp3.1 | 2.34μs | 8.1ns | 30.3ns | 0 | 0 | 0 | 1.08 KB |
| master | CallElasticsearchAsync |
net472 | 3.66μs | 3.9ns | 15.1ns | 0.164 | 0 | 0 | 1.1 KB |
| #7697 | CallElasticsearch |
net6.0 | 1.71μs | 8.52ns | 37.2ns | 0 | 0 | 0 | 1.03 KB |
| #7697 | CallElasticsearch |
netcoreapp3.1 | 2.21μs | 11.6ns | 54.3ns | 0 | 0 | 0 | 1.03 KB |
| #7697 | CallElasticsearch |
net472 | 3.44μs | 1.05ns | 3.92ns | 0.155 | 0 | 0 | 1.04 KB |
| #7697 | CallElasticsearchAsync |
net6.0 | 1.87μs | 5.55ns | 20.8ns | 0 | 0 | 0 | 1.01 KB |
| #7697 | CallElasticsearchAsync |
netcoreapp3.1 | 2.49μs | 6.12ns | 23.7ns | 0 | 0 | 0 | 1.08 KB |
| #7697 | CallElasticsearchAsync |
net472 | 3.63μs | 2.07ns | 7.47ns | 0.163 | 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.88μs | 7.24ns | 28.1ns | 0 | 0 | 0 | 952 B |
| master | ExecuteAsync |
netcoreapp3.1 | 2.5μs | 5.46ns | 21.2ns | 0 | 0 | 0 | 952 B |
| master | ExecuteAsync |
net472 | 2.55μs | 2.47ns | 9.56ns | 0.141 | 0 | 0 | 915 B |
| #7697 | ExecuteAsync |
net6.0 | 1.84μs | 1.9ns | 7.38ns | 0 | 0 | 0 | 952 B |
| #7697 | ExecuteAsync |
netcoreapp3.1 | 2.51μs | 8.85ns | 31.9ns | 0 | 0 | 0 | 952 B |
| #7697 | ExecuteAsync |
net472 | 2.75μs | 3.53ns | 13.2ns | 0.138 | 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.11μs | 16.5ns | 59.6ns | 0 | 0 | 0 | 2.36 KB |
| master | SendAsync |
netcoreapp3.1 | 8.87μs | 16.5ns | 63.8ns | 0 | 0 | 0 | 2.9 KB |
| master | SendAsync |
net472 | 12.1μs | 11.5ns | 44.5ns | 0.484 | 0 | 0 | 3.18 KB |
| #7697 | SendAsync |
net6.0 | 7.11μs | 18.7ns | 72.5ns | 0 | 0 | 0 | 2.36 KB |
| #7697 | SendAsync |
netcoreapp3.1 | 8.64μs | 7.9ns | 29.6ns | 0 | 0 | 0 | 2.9 KB |
| #7697 | SendAsync |
net472 | 12.2μs | 9.99ns | 38.7ns | 0.488 | 0 | 0 | 3.18 KB |
Benchmarks.Trace.Iast.StringAspectsBenchmark - Same speed ✔️ More allocations ⚠️
More allocations ⚠️ in #7697
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net6.0
43.87 KB
45.32 KB
1.45 KB
3.30%
Fewer allocations 🎉 in #7697
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑netcoreapp3.1
44.29 KB
43.62 KB
-672 B
-1.52%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0
274.11 KB
258.18 KB
-15.94 KB
-5.81%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1
275.18 KB
257.6 KB
-17.58 KB
-6.39%
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net6.0 | 43.87 KB | 45.32 KB | 1.45 KB | 3.30% |
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑netcoreapp3.1 | 44.29 KB | 43.62 KB | -672 B | -1.52% |
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0 | 274.11 KB | 258.18 KB | -15.94 KB | -5.81% |
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1 | 275.18 KB | 257.6 KB | -17.58 KB | -6.39% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | StringConcatBenchmark |
net6.0 | 43.1μs | 245ns | 1.6μs | 0 | 0 | 0 | 43.87 KB |
| master | StringConcatBenchmark |
netcoreapp3.1 | 49.4μs | 277ns | 1.81μs | 0 | 0 | 0 | 44.29 KB |
| master | StringConcatBenchmark |
net472 | 56.3μs | 286ns | 1.31μs | 0 | 0 | 0 | 57.34 KB |
| master | StringConcatAspectBenchmark |
net6.0 | 465μs | 1.66μs | 5.98μs | 0 | 0 | 0 | 274.11 KB |
| master | StringConcatAspectBenchmark |
netcoreapp3.1 | 519μs | 1.18μs | 4.07μs | 0 | 0 | 0 | 275.18 KB |
| master | StringConcatAspectBenchmark |
net472 | 404μs | 2.11μs | 10.7μs | 0 | 0 | 0 | 278.53 KB |
| #7697 | StringConcatBenchmark |
net6.0 | 41.8μs | 211ns | 1.01μs | 0 | 0 | 0 | 45.32 KB |
| #7697 | StringConcatBenchmark |
netcoreapp3.1 | 47.2μs | 257ns | 1.36μs | 0 | 0 | 0 | 43.62 KB |
| #7697 | StringConcatBenchmark |
net472 | 58μs | 145ns | 524ns | 0 | 0 | 0 | 57.34 KB |
| #7697 | StringConcatAspectBenchmark |
net6.0 | 478μs | 2.24μs | 8.68μs | 0 | 0 | 0 | 258.18 KB |
| #7697 | StringConcatAspectBenchmark |
netcoreapp3.1 | 498μs | 2.55μs | 11.4μs | 0 | 0 | 0 | 257.6 KB |
| #7697 | StringConcatAspectBenchmark |
net472 | 404μs | 2.23μs | 13.2μ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.62μs | 1.44ns | 5.56ns | 0 | 0 | 0 | 1.7 KB |
| master | EnrichedLog |
netcoreapp3.1 | 3.73μs | 17.9ns | 71.7ns | 0 | 0 | 0 | 1.7 KB |
| master | EnrichedLog |
net472 | 4.05μs | 2.47ns | 8.89ns | 0.244 | 0 | 0 | 1.64 KB |
| #7697 | EnrichedLog |
net6.0 | 2.69μs | 13.6ns | 59.3ns | 0 | 0 | 0 | 1.7 KB |
| #7697 | EnrichedLog |
netcoreapp3.1 | 3.56μs | 17.7ns | 75.1ns | 0 | 0 | 0 | 1.7 KB |
| #7697 | EnrichedLog |
net472 | 3.8μs | 7ns | 27.1ns | 0.244 | 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 | 244ns | 844ns | 0 | 0 | 0 | 4.31 KB |
| master | EnrichedLog |
netcoreapp3.1 | 129μs | 492ns | 1.84μs | 0 | 0 | 0 | 4.31 KB |
| master | EnrichedLog |
net472 | 169μs | 86.2ns | 322ns | 0 | 0 | 0 | 4.52 KB |
| #7697 | EnrichedLog |
net6.0 | 123μs | 85ns | 307ns | 0 | 0 | 0 | 4.31 KB |
| #7697 | EnrichedLog |
netcoreapp3.1 | 128μs | 209ns | 753ns | 0 | 0 | 0 | 4.31 KB |
| #7697 | EnrichedLog |
net472 | 167μs | 149ns | 576ns | 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 | 4.95μs | 21.5ns | 80.4ns | 0 | 0 | 0 | 2.26 KB |
| master | EnrichedLog |
netcoreapp3.1 | 6.81μs | 18.2ns | 70.5ns | 0 | 0 | 0 | 2.26 KB |
| master | EnrichedLog |
net472 | 7.71μs | 7.97ns | 29.8ns | 0.307 | 0 | 0 | 2.08 KB |
| #7697 | EnrichedLog |
net6.0 | 5.14μs | 21.9ns | 81.8ns | 0 | 0 | 0 | 2.26 KB |
| #7697 | EnrichedLog |
netcoreapp3.1 | 6.76μs | 24.1ns | 90.3ns | 0 | 0 | 0 | 2.26 KB |
| #7697 | EnrichedLog |
net472 | 7.82μs | 6.36ns | 24.6ns | 0.309 | 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.98μs | 9.52ns | 36.9ns | 0 | 0 | 0 | 1.2 KB |
| master | SendReceive |
netcoreapp3.1 | 2.63μs | 12.9ns | 57.5ns | 0 | 0 | 0 | 1.2 KB |
| master | SendReceive |
net472 | 3.06μs | 4.97ns | 17.2ns | 0.184 | 0 | 0 | 1.2 KB |
| #7697 | SendReceive |
net6.0 | 2.02μs | 9.36ns | 37.4ns | 0 | 0 | 0 | 1.2 KB |
| #7697 | SendReceive |
netcoreapp3.1 | 2.58μs | 10.4ns | 39ns | 0 | 0 | 0 | 1.2 KB |
| #7697 | SendReceive |
net472 | 3.17μs | 3.24ns | 12.1ns | 0.189 | 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.31μs | 14.2ns | 55.1ns | 0 | 0 | 0 | 1.58 KB |
| master | EnrichedLog |
netcoreapp3.1 | 5.65μs | 19.7ns | 76.1ns | 0 | 0 | 0 | 1.63 KB |
| master | EnrichedLog |
net472 | 6.56μs | 5.4ns | 20.9ns | 0.293 | 0 | 0 | 2.03 KB |
| #7697 | EnrichedLog |
net6.0 | 4.37μs | 3.31ns | 12.4ns | 0 | 0 | 0 | 1.58 KB |
| #7697 | EnrichedLog |
netcoreapp3.1 | 5.54μs | 18.1ns | 70.1ns | 0 | 0 | 0 | 1.63 KB |
| #7697 | EnrichedLog |
net472 | 6.6μs | 3.75ns | 14.5ns | 0.296 | 0 | 0 | 2.03 KB |
Benchmarks.Trace.SpanBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | StartFinishSpan |
net6.0 | 771ns | 3.79ns | 15.1ns | 0 | 0 | 0 | 576 B |
| master | StartFinishSpan |
netcoreapp3.1 | 965ns | 4.65ns | 18ns | 0 | 0 | 0 | 576 B |
| master | StartFinishSpan |
net472 | 923ns | 0.55ns | 2.06ns | 0.088 | 0 | 0 | 578 B |
| master | StartFinishScope |
net6.0 | 922ns | 3.71ns | 14.4ns | 0 | 0 | 0 | 696 B |
| master | StartFinishScope |
netcoreapp3.1 | 1.19μs | 5.59ns | 21.6ns | 0 | 0 | 0 | 696 B |
| master | StartFinishScope |
net472 | 1.12μs | 0.833ns | 3.23ns | 0.101 | 0 | 0 | 658 B |
| #7697 | StartFinishSpan |
net6.0 | 778ns | 4.03ns | 18.9ns | 0 | 0 | 0 | 576 B |
| #7697 | StartFinishSpan |
netcoreapp3.1 | 966ns | 4.93ns | 22.6ns | 0 | 0 | 0 | 576 B |
| #7697 | StartFinishSpan |
net472 | 947ns | 0.259ns | 0.968ns | 0.0898 | 0 | 0 | 578 B |
| #7697 | StartFinishScope |
net6.0 | 926ns | 4.79ns | 23.5ns | 0 | 0 | 0 | 696 B |
| #7697 | StartFinishScope |
netcoreapp3.1 | 1.19μs | 6.07ns | 28.5ns | 0 | 0 | 0 | 696 B |
| #7697 | StartFinishScope |
net472 | 1.17μs | 0.927ns | 3.59ns | 0.0993 | 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.07μs | 5.06ns | 20.3ns | 0 | 0 | 0 | 696 B |
| master | RunOnMethodBegin |
netcoreapp3.1 | 1.4μs | 7.1ns | 31.8ns | 0 | 0 | 0 | 696 B |
| master | RunOnMethodBegin |
net472 | 1.44μs | 0.906ns | 3.51ns | 0.101 | 0 | 0 | 658 B |
| #7697 | RunOnMethodBegin |
net6.0 | 1.1μs | 1.88ns | 7.29ns | 0 | 0 | 0 | 696 B |
| #7697 | RunOnMethodBegin |
netcoreapp3.1 | 1.46μs | 5.28ns | 20.4ns | 0 | 0 | 0 | 696 B |
| #7697 | RunOnMethodBegin |
net472 | 1.47μs | 1.59ns | 6.18ns | 0.102 | 0 | 0 | 658 B |
c1f7943 to
56bd199
Compare
a70301b to
caf072d
Compare
52bf0a8 to
38efd42
Compare
This comment has been minimized.
This comment has been minimized.
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
704587e to
db30e4c
Compare
acdece9 to
86d6dbd
Compare
db30e4c to
2839ecf
Compare
86d6dbd to
fc26b53
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
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.
Nice 🎉
|
|
||
| ### 1. Add the Configuration Key Definition | ||
|
|
||
| Add your new configuration key to `tracer/src/Datadog.Trace/Configuration/supported-configurations.json`. |
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.
| Add your new configuration key to `tracer/src/Datadog.Trace/Configuration/supported-configurations.json`. | |
| Add your new configuration key to `tracer/src/Datadog.Trace/Configuration/supported-configurations.json`, specifying an arbitrary version string (e.g. `"A"`, as shown below). and specifying the product if required. |
| }, | ||
| "OTEL_EXPORTER_OTLP_TIMEOUT": { | ||
| "version": ["A"], | ||
| "product": "OpenTelemetry" |
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.
Can we explain:
- What the allowed product values are
- When you should use them
|
|
||
| ### 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
|
|
||
| ### 5. Build to Generate Code | ||
|
|
||
| Build the `Datadog.Trace` project to run the source generator: |
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.
| Build the `Datadog.Trace` project to run the source generator: | |
| Build the `Datadog.Trace` project to run the source generator, either using Nuke or by building the project directly from the command line or your IDE: |
|
|
||
| Generates: `ConfigurationKeys.OpenTelemetry.ExporterOtlpEndpoint` | ||
|
|
||
| **Common products:** |
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.
Ah, in which case we can add a link to this section in step 1 above I think
| <Compile Include="..\Datadog.Trace\Configuration\ConfigurationKeys.Exporter.cs" Link="ConfigurationKeys.Exporter.cs" /> | ||
| <Compile Include="..\Datadog.Trace\Configuration\DeprecationMessages.cs" Link="DeprecationMessages.cs" /> | ||
| <Compile Include="..\Datadog.Trace\Configuration\ExporterSettings.Shared.cs" Link="ExporterSettings.Shared.cs" /> | ||
| <!-- Link to generated ConfigurationKeys from Datadog.Trace project --> |
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.
Should we just link in all the ConfigurationKeysGenerator files 🤔 After all we included them above?
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.
Nice documentation👍 Could/should we add a link to this document at the top of all the generated ConfigurationKeys files? Rather than mentioning the files to change in those comments, it might make sense to link to this document instead, seeing as that covers everything and means we're not duplicating the explanation? Or just include both 🙂
| var enabled = source.GetBool(ConfigurationKeys.FeatureFlags.TraceId128BitGenerationEnabled); | ||
| ``` | ||
|
|
||
| ## Troubleshooting |
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.
Should we mention about the analyzers in this section, and the fact that they enforce not using strings directly etc?
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
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.