-
Notifications
You must be signed in to change notification settings - Fork 150
Create SettingsManager for managing mutable settings and ExporterSettings
#7695
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: andrew/settings/4b-helper
Are you sure you want to change the base?
Create SettingsManager for managing mutable settings and ExporterSettings
#7695
Conversation
…tIntegrationAnalyticsSampleRate()` (#7544) ## Summary of changes Fix usages of `IsIntegrationEnabled()`, `IsErrorStatusCode()`, and `GetIntegrationAnalyticsSampleRate()` to use `MutableSettings` instead of `TracerSettings` ## Reason for change These functions are dependent on `MutableSettings`, and are exposed there, so making sure we call the methods there, and remove the delegation from `TracerSettings` entirely. ## Implementation details - Find and replace usages - Remove the old delegating methods ## Test coverage Just a refactor, so covered by existing tests ## Other details https://datadoghq.atlassian.net/browse/LANGPLAT-819 Part of a config stack - #7522 - #7525 - #7530 - #7532 - #7543 - #7544 👈 - #7695
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 (7695) - mean (85ms) : crit, 77, 92
. : crit, milestone, 85,
master - mean (72ms) : 71, 73
. : milestone, 72,
section Baseline
This PR (7695) - mean (81ms) : 71, 92
. : milestone, 81,
master - mean (68ms) : 66, 69
. : milestone, 68,
section CallTarget+Inlining+NGEN
This PR (7695) - mean (1,161ms) : crit, 1076, 1246
. : crit, milestone, 1161,
master - mean (1,040ms) : 997, 1084
. : milestone, 1040,
gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7695) - mean (127ms) : crit, 115, 140
. : crit, milestone, 127,
master - mean (106ms) : 105, 108
. : milestone, 106,
section Baseline
This PR (7695) - mean (128ms) : 115, 141
. : milestone, 128,
master - mean (105ms) : 103, 107
. : milestone, 105,
section CallTarget+Inlining+NGEN
This PR (7695) - mean (838ms) : crit, 788, 889
. : crit, milestone, 838,
master - mean (746ms) : 720, 772
. : milestone, 746,
gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7695) - mean (107ms) : crit, 100, 115
. : crit, milestone, 107,
master - mean (94ms) : 93, 95
. : milestone, 94,
section Baseline
This PR (7695) - mean (108ms) : 100, 115
. : milestone, 108,
master - mean (93ms) : 91, 95
. : milestone, 93,
section CallTarget+Inlining+NGEN
This PR (7695) - mean (790ms) : crit, 710, 871
. : crit, milestone, 790,
master - mean (707ms) : 672, 742
. : milestone, 707,
gantt
title Execution time (ms) FakeDbCommand (.NET 8)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7695) - mean (109ms) : crit, 100, 119
. : crit, milestone, 109,
master - mean (92ms) : 91, 93
. : milestone, 92,
section Baseline
This PR (7695) - mean (110ms) : 101, 119
. : milestone, 110,
master - mean (91ms) : 89, 93
. : milestone, 91,
section CallTarget+Inlining+NGEN
This PR (7695) - mean (742ms) : crit, 699, 785
. : crit, milestone, 742,
master - mean (661ms) : 646, 676
. : milestone, 661,
gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.8)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7695) - mean (197ms) : 194, 201
. : milestone, 197,
master - mean (195ms) : 192, 197
. : milestone, 195,
section Baseline
This PR (7695) - mean (193ms) : 190, 196
. : milestone, 193,
master - mean (191ms) : 189, 194
. : milestone, 191,
section CallTarget+Inlining+NGEN
This PR (7695) - mean (1,172ms) : 1109, 1234
. : milestone, 1172,
master - mean (1,156ms) : 1094, 1218
. : milestone, 1156,
gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7695) - mean (278ms) : 274, 283
. : milestone, 278,
master - mean (275ms) : 272, 279
. : milestone, 275,
section Baseline
This PR (7695) - mean (279ms) : 273, 285
. : milestone, 279,
master - mean (276ms) : 271, 281
. : milestone, 276,
section CallTarget+Inlining+NGEN
This PR (7695) - mean (947ms) : 897, 997
. : milestone, 947,
master - mean (942ms) : 903, 980
. : milestone, 942,
gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7695) - mean (270ms) : 267, 274
. : milestone, 270,
master - mean (268ms) : 264, 272
. : milestone, 268,
section Baseline
This PR (7695) - mean (271ms) : 266, 276
. : milestone, 271,
master - mean (267ms) : 264, 271
. : milestone, 267,
section CallTarget+Inlining+NGEN
This PR (7695) - mean (936ms) : 881, 990
. : milestone, 936,
master - mean (922ms) : 875, 969
. : milestone, 922,
gantt
title Execution time (ms) HttpMessageHandler (.NET 8)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7695) - mean (273ms) : 265, 281
. : milestone, 273,
master - mean (266ms) : 262, 269
. : milestone, 266,
section Baseline
This PR (7695) - mean (272ms) : 266, 277
. : milestone, 272,
master - mean (266ms) : 260, 271
. : milestone, 266,
section CallTarget+Inlining+NGEN
This PR (7695) - mean (855ms) : 830, 880
. : milestone, 855,
master - mean (850ms) : 828, 872
. : milestone, 850,
|
c29eb56 to
9c790a3
Compare
BenchmarksBenchmarks Report for benchmark platform 🐌Benchmarks for #7695 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.415 | 299,521.88 | 723,373.66 |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | RunWafRealisticBenchmark |
net6.0 | 393μs | 78.7ns | 295ns | 0 | 0 | 0 | 4.56 KB |
| master | RunWafRealisticBenchmark |
netcoreapp3.1 | 415μs | 171ns | 616ns | 0 | 0 | 0 | 4.48 KB |
| master | RunWafRealisticBenchmark |
net472 | 429μs | 35.7ns | 129ns | 0 | 0 | 0 | 4.66 KB |
| master | RunWafRealisticBenchmarkWithAttack |
net6.0 | 286μs | 63.3ns | 237ns | 0 | 0 | 0 | 2.24 KB |
| master | RunWafRealisticBenchmarkWithAttack |
netcoreapp3.1 | 299μs | 214ns | 827ns | 0 | 0 | 0 | 2.22 KB |
| master | RunWafRealisticBenchmarkWithAttack |
net472 | 311μs | 21.1ns | 76.2ns | 0 | 0 | 0 | 2.29 KB |
| #7695 | RunWafRealisticBenchmark |
net6.0 | 397μs | 55.4ns | 214ns | 0 | 0 | 0 | 4.56 KB |
| #7695 | RunWafRealisticBenchmark |
netcoreapp3.1 | 413μs | 765ns | 2.65μs | 0 | 0 | 0 | 4.5 KB |
| #7695 | RunWafRealisticBenchmark |
net472 | 431μs | 65.7ns | 255ns | 0 | 0 | 0 | 4.66 KB |
| #7695 | RunWafRealisticBenchmarkWithAttack |
net6.0 | 286μs | 31.4ns | 121ns | 0 | 0 | 0 | 2.24 KB |
| #7695 | RunWafRealisticBenchmarkWithAttack |
netcoreapp3.1 | 679μs | 9.73μs | 97.3μs | 0 | 0 | 0 | 2.22 KB |
| #7695 | RunWafRealisticBenchmarkWithAttack |
net472 | 314μs | 327ns | 1.27μs | 0 | 0 | 0 | 2.29 KB |
Benchmarks.Trace.AspNetCoreBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | SendRequest |
net6.0 | 61.7μs | 58.7ns | 220ns | 0 | 0 | 0 | 14.52 KB |
| master | SendRequest |
netcoreapp3.1 | 70.9μs | 162ns | 586ns | 0 | 0 | 0 | 17.42 KB |
| master | SendRequest |
net472 | 0.00244ns | 0.000969ns | 0.00375ns | 0 | 0 | 0 | 0 b |
| #7695 | SendRequest |
net6.0 | 61.6μs | 67ns | 259ns | 0 | 0 | 0 | 14.52 KB |
| #7695 | SendRequest |
netcoreapp3.1 | 71.2μs | 149ns | 539ns | 0 | 0 | 0 | 17.42 KB |
| #7695 | SendRequest |
net472 | 0.0067ns | 0.00203ns | 0.00787ns | 0 | 0 | 0 | 0 b |
Benchmarks.Trace.CharSliceBenchmark - Slower ⚠️ Fewer allocations 🎉
Slower ⚠️ in #7695
Benchmark
diff/base
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑netcoreapp3.1
1.116
816,021.00
910,731.22
Fewer allocations 🎉 in #7695
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net6.0
4 B
2 B
-2 B
-50.00%
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net6.0
5 B
2 B
-3 B
-60.00%
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net472
73 B
0 b
-73 B
-100.00%
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net472
51 B
0 b
-51 B
-100.00%
| Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
|---|---|---|---|---|
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑netcoreapp3.1 | 1.116 | 816,021.00 | 910,731.22 |
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net6.0 | 4 B | 2 B | -2 B | -50.00% |
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net6.0 | 5 B | 2 B | -3 B | -60.00% |
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net472 | 73 B | 0 b | -73 B | -100.00% |
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net472 | 51 B | 0 b | -51 B | -100.00% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | OriginalCharSlice |
net6.0 | 1.91ms | 3.51μs | 13.6μs | 0 | 0 | 0 | 640.01 KB |
| master | OriginalCharSlice |
netcoreapp3.1 | 2.09ms | 3μs | 10.8μs | 0 | 0 | 0 | 640 KB |
| master | OriginalCharSlice |
net472 | 2.55ms | 116ns | 451ns | 100 | 0 | 0 | 641.95 KB |
| master | OptimizedCharSlice |
net6.0 | 1.4ms | 932ns | 3.61μs | 0 | 0 | 0 | 4 B |
| master | OptimizedCharSlice |
netcoreapp3.1 | 1.82ms | 444ns | 1.72μs | 0 | 0 | 0 | 1 B |
| master | OptimizedCharSlice |
net472 | 1.97ms | 315ns | 1.18μs | 0 | 0 | 0 | 73 B |
| master | OptimizedCharSliceWithPool |
net6.0 | 898μs | 45.5ns | 176ns | 0 | 0 | 0 | 5 B |
| master | OptimizedCharSliceWithPool |
netcoreapp3.1 | 816μs | 83.9ns | 314ns | 0 | 0 | 0 | 0 b |
| master | OptimizedCharSliceWithPool |
net472 | 1.15ms | 120ns | 464ns | 0 | 0 | 0 | 51 B |
| #7695 | OriginalCharSlice |
net6.0 | 1.99ms | 5.08μs | 19.7μs | 0 | 0 | 0 | 640.01 KB |
| #7695 | OriginalCharSlice |
netcoreapp3.1 | 2.08ms | 3.98μs | 14.9μs | 0 | 0 | 0 | 640 KB |
| #7695 | OriginalCharSlice |
net472 | 2.61ms | 197ns | 711ns | 100 | 0 | 0 | 641.95 KB |
| #7695 | OptimizedCharSlice |
net6.0 | 1.37ms | 214ns | 800ns | 0 | 0 | 0 | 2 B |
| #7695 | OptimizedCharSlice |
netcoreapp3.1 | 1.75ms | 561ns | 2.17μs | 0 | 0 | 0 | 1 B |
| #7695 | OptimizedCharSlice |
net472 | 1.94ms | 591ns | 2.29μs | 0 | 0 | 0 | 0 b |
| #7695 | OptimizedCharSliceWithPool |
net6.0 | 868μs | 17.8ns | 66.6ns | 0 | 0 | 0 | 2 B |
| #7695 | OptimizedCharSliceWithPool |
netcoreapp3.1 | 911μs | 46.5ns | 180ns | 0 | 0 | 0 | 0 b |
| #7695 | OptimizedCharSliceWithPool |
net472 | 1.13ms | 115ns | 444ns | 0 | 0 | 0 | 0 b |
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Faster 🎉 More allocations ⚠️
Faster 🎉 in #7695
Benchmark
base/diff
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑netcoreapp3.1
1.213
782,873.08
645,657.71
More allocations ⚠️ in #7695
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑netcoreapp3.1
41.77 KB
42.47 KB
708 B
1.70%
| Benchmark | base/diff | Base Median (ns) | Diff Median (ns) | Modality |
|---|---|---|---|---|
| Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑netcoreapp3.1 | 1.213 | 782,873.08 | 645,657.71 |
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑netcoreapp3.1 | 41.77 KB | 42.47 KB | 708 B | 1.70% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | WriteAndFlushEnrichedTraces |
net6.0 | 709μs | 3.92μs | 25.1μs | 0 | 0 | 0 | 41.77 KB |
| master | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 764μs | 4.41μs | 35μs | 0 | 0 | 0 | 41.77 KB |
| master | WriteAndFlushEnrichedTraces |
net472 | 967μs | 5.38μs | 32.7μs | 4.46 | 0 | 0 | 56.12 KB |
| #7695 | WriteAndFlushEnrichedTraces |
net6.0 | 685μs | 1.45μs | 5.63μs | 0 | 0 | 0 | 41.71 KB |
| #7695 | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 652μs | 3.01μs | 11.7μs | 0 | 0 | 0 | 42.47 KB |
| #7695 | WriteAndFlushEnrichedTraces |
net472 | 988μs | 3.92μs | 14.7μs | 4.81 | 0 | 0 | 55.92 KB |
Benchmarks.Trace.DbCommandBenchmark - Faster 🎉 Same allocations ✔️
Faster 🎉 in #7695
Benchmark
base/diff
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.DbCommandBenchmark.ExecuteNonQuery‑netcoreapp3.1
1.133
2,942.54
2,597.45
| Benchmark | base/diff | Base Median (ns) | Diff Median (ns) | Modality |
|---|---|---|---|---|
| Benchmarks.Trace.DbCommandBenchmark.ExecuteNonQuery‑netcoreapp3.1 | 1.133 | 2,942.54 | 2,597.45 |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | ExecuteNonQuery |
net6.0 | 1.94μs | 5.14ns | 17.8ns | 0 | 0 | 0 | 1.02 KB |
| master | ExecuteNonQuery |
netcoreapp3.1 | 2.93μs | 11.7ns | 45.2ns | 0 | 0 | 0 | 1.02 KB |
| master | ExecuteNonQuery |
net472 | 2.83μs | 3.88ns | 15ns | 0.155 | 0.0141 | 0 | 987 B |
| #7695 | ExecuteNonQuery |
net6.0 | 1.88μs | 9.04ns | 38.3ns | 0 | 0 | 0 | 1.02 KB |
| #7695 | ExecuteNonQuery |
netcoreapp3.1 | 2.58μs | 10.9ns | 42.2ns | 0 | 0 | 0 | 1.02 KB |
| #7695 | ExecuteNonQuery |
net472 | 2.75μs | 3.86ns | 14.9ns | 0.151 | 0.0137 | 0 | 987 B |
Benchmarks.Trace.ElasticsearchBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | CallElasticsearch |
net6.0 | 1.73μs | 2.01ns | 7.79ns | 0 | 0 | 0 | 1.03 KB |
| master | CallElasticsearch |
netcoreapp3.1 | 2.21μs | 8.11ns | 31.4ns | 0 | 0 | 0 | 1.03 KB |
| master | CallElasticsearch |
net472 | 3.76μs | 6.48ns | 25.1ns | 0.149 | 0 | 0 | 1.04 KB |
| master | CallElasticsearchAsync |
net6.0 | 1.86μs | 7.73ns | 27.9ns | 0 | 0 | 0 | 1.01 KB |
| master | CallElasticsearchAsync |
netcoreapp3.1 | 2.34μs | 11.2ns | 44.7ns | 0 | 0 | 0 | 1.08 KB |
| master | CallElasticsearchAsync |
net472 | 3.75μs | 1.82ns | 7.05ns | 0.167 | 0 | 0 | 1.1 KB |
| #7695 | CallElasticsearch |
net6.0 | 1.75μs | 7.84ns | 30.4ns | 0 | 0 | 0 | 1.03 KB |
| #7695 | CallElasticsearch |
netcoreapp3.1 | 2.28μs | 11ns | 47.8ns | 0 | 0 | 0 | 1.03 KB |
| #7695 | CallElasticsearch |
net472 | 3.5μs | 2.23ns | 8.63ns | 0.158 | 0 | 0 | 1.04 KB |
| #7695 | CallElasticsearchAsync |
net6.0 | 1.94μs | 9.05ns | 37.3ns | 0 | 0 | 0 | 1.01 KB |
| #7695 | CallElasticsearchAsync |
netcoreapp3.1 | 2.47μs | 12.2ns | 53.2ns | 0 | 0 | 0 | 1.08 KB |
| #7695 | CallElasticsearchAsync |
net472 | 3.62μs | 2.78ns | 10.8ns | 0.162 | 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.85μs | 3.48ns | 13.5ns | 0 | 0 | 0 | 952 B |
| master | ExecuteAsync |
netcoreapp3.1 | 2.49μs | 2.08ns | 7.51ns | 0 | 0 | 0 | 952 B |
| master | ExecuteAsync |
net472 | 2.62μs | 3.8ns | 13.7ns | 0.144 | 0 | 0 | 915 B |
| #7695 | ExecuteAsync |
net6.0 | 1.92μs | 9.74ns | 43.5ns | 0 | 0 | 0 | 952 B |
| #7695 | ExecuteAsync |
netcoreapp3.1 | 2.41μs | 7.15ns | 27.7ns | 0 | 0 | 0 | 952 B |
| #7695 | ExecuteAsync |
net472 | 2.55μs | 1.84ns | 7.13ns | 0.14 | 0 | 0 | 915 B |
Benchmarks.Trace.HttpClientBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | SendAsync |
net6.0 | 6.83μs | 5.82ns | 21.8ns | 0 | 0 | 0 | 2.36 KB |
| master | SendAsync |
netcoreapp3.1 | 8.58μs | 10.6ns | 41.2ns | 0 | 0 | 0 | 2.9 KB |
| master | SendAsync |
net472 | 12.3μs | 10.6ns | 41.2ns | 0.49 | 0 | 0 | 3.18 KB |
| #7695 | SendAsync |
net6.0 | 6.72μs | 5.2ns | 18ns | 0 | 0 | 0 | 2.36 KB |
| #7695 | SendAsync |
netcoreapp3.1 | 8.64μs | 26.4ns | 102ns | 0 | 0 | 0 | 2.9 KB |
| #7695 | SendAsync |
net472 | 12.2μs | 6.83ns | 24.6ns | 0.489 | 0 | 0 | 3.18 KB |
Benchmarks.Trace.Iast.StringAspectsBenchmark - Slower ⚠️ More allocations ⚠️
Slower ⚠️ in #7695
Benchmark
diff/base
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1
2.233
529,650.00
1,182,700.00
More allocations ⚠️ in #7695
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1
275.52 KB
321.89 KB
46.37 KB
16.83%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑netcoreapp3.1
42.83 KB
44.04 KB
1.21 KB
2.82%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net6.0
43.62 KB
44.5 KB
888 B
2.04%
| Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
|---|---|---|---|---|
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1 | 2.233 | 529,650.00 | 1,182,700.00 |
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1 | 275.52 KB | 321.89 KB | 46.37 KB | 16.83% |
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑netcoreapp3.1 | 42.83 KB | 44.04 KB | 1.21 KB | 2.82% |
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net6.0 | 43.62 KB | 44.5 KB | 888 B | 2.04% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | StringConcatBenchmark |
net6.0 | 41μs | 222ns | 1.15μs | 0 | 0 | 0 | 43.62 KB |
| master | StringConcatBenchmark |
netcoreapp3.1 | 51.5μs | 381ns | 3.69μs | 0 | 0 | 0 | 42.83 KB |
| master | StringConcatBenchmark |
net472 | 56.7μs | 222ns | 917ns | 0 | 0 | 0 | 57.34 KB |
| master | StringConcatAspectBenchmark |
net6.0 | 477μs | 1.03μs | 3.55μs | 0 | 0 | 0 | 276.69 KB |
| master | StringConcatAspectBenchmark |
netcoreapp3.1 | 534μs | 2.63μs | 11.2μs | 0 | 0 | 0 | 275.52 KB |
| master | StringConcatAspectBenchmark |
net472 | 404μs | 2.2μs | 13.2μs | 0 | 0 | 0 | 278.53 KB |
| #7695 | StringConcatBenchmark |
net6.0 | 41.7μs | 184ns | 688ns | 0 | 0 | 0 | 44.5 KB |
| #7695 | StringConcatBenchmark |
netcoreapp3.1 | 47μs | 222ns | 832ns | 0 | 0 | 0 | 44.04 KB |
| #7695 | StringConcatBenchmark |
net472 | 57μs | 236ns | 945ns | 0 | 0 | 0 | 57.34 KB |
| #7695 | StringConcatAspectBenchmark |
net6.0 | 475μs | 1.2μs | 4.31μs | 0 | 0 | 0 | 276.42 KB |
| #7695 | StringConcatAspectBenchmark |
netcoreapp3.1 | 1.19ms | 2.84μs | 11μs | 0 | 0 | 0 | 321.89 KB |
| #7695 | StringConcatAspectBenchmark |
net472 | 394μs | 1.27μs | 4.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.67μs | 2.89ns | 11.2ns | 0 | 0 | 0 | 1.7 KB |
| master | EnrichedLog |
netcoreapp3.1 | 3.56μs | 17.7ns | 73.2ns | 0 | 0 | 0 | 1.7 KB |
| master | EnrichedLog |
net472 | 3.84μs | 2.02ns | 7.81ns | 0.25 | 0 | 0 | 1.64 KB |
| #7695 | EnrichedLog |
net6.0 | 2.67μs | 12.6ns | 47.2ns | 0 | 0 | 0 | 1.7 KB |
| #7695 | EnrichedLog |
netcoreapp3.1 | 3.74μs | 17.8ns | 68.8ns | 0 | 0 | 0 | 1.7 KB |
| #7695 | EnrichedLog |
net472 | 3.87μs | 2.43ns | 9.41ns | 0.252 | 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 | 123μs | 143ns | 516ns | 0 | 0 | 0 | 4.31 KB |
| master | EnrichedLog |
netcoreapp3.1 | 127μs | 414ns | 1.55μs | 0 | 0 | 0 | 4.31 KB |
| master | EnrichedLog |
net472 | 167μs | 131ns | 506ns | 0 | 0 | 0 | 4.52 KB |
| #7695 | EnrichedLog |
net6.0 | 122μs | 55.9ns | 217ns | 0 | 0 | 0 | 4.31 KB |
| #7695 | EnrichedLog |
netcoreapp3.1 | 127μs | 230ns | 860ns | 0 | 0 | 0 | 4.31 KB |
| #7695 | EnrichedLog |
net472 | 166μs | 36.8ns | 128ns | 0 | 0 | 0 | 4.51 KB |
Benchmarks.Trace.NLogBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | EnrichedLog |
net6.0 | 4.94μs | 21.3ns | 82.6ns | 0 | 0 | 0 | 2.26 KB |
| master | EnrichedLog |
netcoreapp3.1 | 6.7μs | 22.5ns | 87.2ns | 0 | 0 | 0 | 2.26 KB |
| master | EnrichedLog |
net472 | 7.73μs | 10.4ns | 40.4ns | 0.309 | 0 | 0 | 2.08 KB |
| #7695 | EnrichedLog |
net6.0 | 5.04μs | 22ns | 82.3ns | 0 | 0 | 0 | 2.26 KB |
| #7695 | EnrichedLog |
netcoreapp3.1 | 6.95μs | 12.6ns | 48.7ns | 0 | 0 | 0 | 2.26 KB |
| #7695 | EnrichedLog |
net472 | 7.56μs | 11.8ns | 45.9ns | 0.304 | 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 | 6.48ns | 25.1ns | 0 | 0 | 0 | 1.2 KB |
| master | SendReceive |
netcoreapp3.1 | 2.76μs | 9.28ns | 34.7ns | 0 | 0 | 0 | 1.2 KB |
| master | SendReceive |
net472 | 2.99μs | 1.84ns | 7.11ns | 0.179 | 0 | 0 | 1.2 KB |
| #7695 | SendReceive |
net6.0 | 2.01μs | 1.88ns | 6.78ns | 0 | 0 | 0 | 1.2 KB |
| #7695 | SendReceive |
netcoreapp3.1 | 2.72μs | 13.4ns | 55.3ns | 0 | 0 | 0 | 1.2 KB |
| #7695 | SendReceive |
net472 | 3.2μs | 1.95ns | 7.28ns | 0.191 | 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.42μs | 0.87ns | 3.26ns | 0 | 0 | 0 | 1.58 KB |
| master | EnrichedLog |
netcoreapp3.1 | 5.69μs | 10.6ns | 41ns | 0 | 0 | 0 | 1.63 KB |
| master | EnrichedLog |
net472 | 6.46μs | 4.67ns | 17.5ns | 0.29 | 0 | 0 | 2.03 KB |
| #7695 | EnrichedLog |
net6.0 | 4.23μs | 2.55ns | 9.89ns | 0 | 0 | 0 | 1.58 KB |
| #7695 | EnrichedLog |
netcoreapp3.1 | 5.55μs | 11.5ns | 44.5ns | 0 | 0 | 0 | 1.63 KB |
| #7695 | EnrichedLog |
net472 | 6.65μs | 8.93ns | 34.6ns | 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 | 767ns | 1.54ns | 5.96ns | 0 | 0 | 0 | 576 B |
| master | StartFinishSpan |
netcoreapp3.1 | 979ns | 3.6ns | 14ns | 0 | 0 | 0 | 576 B |
| master | StartFinishSpan |
net472 | 950ns | 0.189ns | 0.706ns | 0.0906 | 0 | 0 | 578 B |
| master | StartFinishScope |
net6.0 | 918ns | 4.33ns | 16.8ns | 0 | 0 | 0 | 696 B |
| master | StartFinishScope |
netcoreapp3.1 | 1.22μs | 5.72ns | 22.1ns | 0 | 0 | 0 | 696 B |
| master | StartFinishScope |
net472 | 1.16μs | 2.76ns | 10.7ns | 0.1 | 0 | 0 | 658 B |
| #7695 | StartFinishSpan |
net6.0 | 781ns | 4.04ns | 19ns | 0 | 0 | 0 | 576 B |
| #7695 | StartFinishSpan |
netcoreapp3.1 | 962ns | 5.27ns | 30.3ns | 0 | 0 | 0 | 576 B |
| #7695 | StartFinishSpan |
net472 | 968ns | 0.657ns | 2.55ns | 0.0917 | 0 | 0 | 578 B |
| #7695 | StartFinishScope |
net6.0 | 928ns | 4.28ns | 17.1ns | 0 | 0 | 0 | 696 B |
| #7695 | StartFinishScope |
netcoreapp3.1 | 1.21μs | 4.5ns | 17.4ns | 0 | 0 | 0 | 696 B |
| #7695 | StartFinishScope |
net472 | 1.14μs | 0.239ns | 0.924ns | 0.103 | 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.26ns | 24.1ns | 0 | 0 | 0 | 696 B |
| master | RunOnMethodBegin |
netcoreapp3.1 | 1.4μs | 6.81ns | 27.2ns | 0 | 0 | 0 | 696 B |
| master | RunOnMethodBegin |
net472 | 1.42μs | 0.838ns | 3.25ns | 0.0994 | 0 | 0 | 658 B |
| #7695 | RunOnMethodBegin |
net6.0 | 1.07μs | 5.69ns | 29ns | 0 | 0 | 0 | 696 B |
| #7695 | RunOnMethodBegin |
netcoreapp3.1 | 1.49μs | 6.59ns | 25.5ns | 0 | 0 | 0 | 696 B |
| #7695 | RunOnMethodBegin |
net472 | 1.51μs | 0.474ns | 1.77ns | 0.0993 | 0 | 0 | 658 B |
9c790a3 to
9f05223
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. Chef's kiss. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
9f05223 to
6b9a134
Compare
|
6b9a134 to
c04decc
Compare
c04decc to
60c7874
Compare
a6b40ae to
1ed4e84
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
60c7874 to
c691a0e
Compare
1ed4e84 to
1477479
Compare
- Ensure subscribing doesn't receive out-of-order updates - Fix log message
c691a0e to
a52caed
Compare
1477479 to
e27c515
Compare
Summary of changes
SettingsManagerresponsible for managingMutableSettingsandExporterSettingsReason for change
We need to be notified about runtime changes to settings (i.e. config in code or remote config) but don't want to tear down the world and rebuild every time.
SettingsManageris responsible for handling this. Consumers subscribe to changes and can be notified about updates.This is a first step which just introduces the type, but doesn't force users to consume changes or remove the current places settings are exposed. Instead, it just encapsulates the changes.
Implementation details
SettingsManagerDynamicConfigurationManagerandConfigureIntegrationintoSettingsManagerSettingsManager(and maintain it throughout the app lifetime)TracerManagerto do the "full rebuild"TracerSettingsTest coverage
SettingsManagerfunctionalityOther details
https://datadoghq.atlassian.net/browse/LANGPLAT-819
Part of a config stack
MutableSettingsfromTracerSettings#7522MutableSettingson dynamic config changes #7525DefaultServiceNametoMutableSettings#7530PerTraceSettings.GetServiceName()#7532TracerSettingsto useMutableSettingswhere appropriate #7543IsIntegrationEnabled(),IsErrorStatusCode(), andGetIntegrationAnalyticsSampleRate()#7544DictionaryExtensions.SequenceEqual#7722SettingsManagerfor managing mutable settings and ExporterSettings #7695 👈TracerSettingswhich can change at runtime #7723MutableSettingsandExporterSettingswithout rebuilding #7724