-
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: master
Are you sure you want to change the base?
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 This PR (7695) and master. ✅ No regressions detected - check the details below Full Metrics ComparisonFakeDbCommand
HttpMessageHandler
Comparison explanationExecution-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 highlighted 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). Duration chartsFakeDbCommand (.NET Framework 4.8)gantt
title Execution time (ms) FakeDbCommand (.NET Framework 4.8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7695) - mean (77ms) : 72, 82
master - mean (76ms) : 71, 80
section Bailout
This PR (7695) - mean (81ms) : 77, 84
master - mean (78ms) : 76, 81
section CallTarget+Inlining+NGEN
This PR (7695) - mean (1,113ms) : 1054, 1172
master - mean (1,121ms) : 1056, 1186
FakeDbCommand (.NET Core 3.1)gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7695) - mean (119ms) : 113, 124
master - mean (117ms) : 113, 122
section Bailout
This PR (7695) - mean (120ms) : 115, 126
master - mean (122ms) : 117, 127
section CallTarget+Inlining+NGEN
This PR (7695) - mean (819ms) : 786, 853
master - mean (801ms) : 756, 846
FakeDbCommand (.NET 6)gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7695) - mean (106ms) : 101, 110
master - mean (103ms) : 99, 106
section Bailout
This PR (7695) - mean (107ms) : 103, 111
master - mean (103ms) : 101, 106
section CallTarget+Inlining+NGEN
This PR (7695) - mean (763ms) : 718, 807
master - mean (740ms) : 704, 775
FakeDbCommand (.NET 8)gantt
title Execution time (ms) FakeDbCommand (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7695) - mean (104ms) : 99, 109
master - mean (100ms) : 97, 102
section Bailout
This PR (7695) - mean (106ms) : crit, 102, 110
master - mean (97ms) : 94, 100
section CallTarget+Inlining+NGEN
This PR (7695) - mean (728ms) : crit, 702, 754
master - mean (687ms) : 666, 708
HttpMessageHandler (.NET Framework 4.8)gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7695) - mean (193ms) : 189, 197
master - mean (199ms) : 194, 203
section Bailout
This PR (7695) - mean (198ms) : 194, 201
master - mean (197ms) : 190, 204
section CallTarget+Inlining+NGEN
This PR (7695) - mean (1,177ms) : 1107, 1247
master - mean (1,197ms) : 1124, 1270
HttpMessageHandler (.NET Core 3.1)gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7695) - mean (280ms) : 268, 291
master - mean (296ms) : 290, 303
section Bailout
This PR (7695) - mean (281ms) : 273, 288
master - mean (300ms) : 294, 305
section CallTarget+Inlining+NGEN
This PR (7695) - mean (947ms) : 899, 995
master - mean (990ms) : 949, 1030
HttpMessageHandler (.NET 6)gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7695) - mean (269ms) : 264, 273
master - mean (282ms) : 271, 293
section Bailout
This PR (7695) - mean (269ms) : 266, 273
master - mean (277ms) : 271, 283
section CallTarget+Inlining+NGEN
This PR (7695) - mean (926ms) : 888, 963
master - mean (949ms) : 884, 1014
HttpMessageHandler (.NET 8)gantt
title Execution time (ms) HttpMessageHandler (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7695) - mean (268ms) : 264, 273
master - mean (274ms) : 266, 282
section Bailout
This PR (7695) - mean (269ms) : 265, 273
master - mean (269ms) : 263, 274
section CallTarget+Inlining+NGEN
This PR (7695) - mean (855ms) : 833, 876
master - mean (866ms) : 844, 887
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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 ✔️ More allocations
|
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.ActivityBenchmark.StartStopWithChild‑net472 | 6.05 KB | 6.1 KB | 54 B | 0.89% |
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.ActivityBenchmark.StartStopWithChild‑net6.0 | 5.52 KB | 5.49 KB | -30 B | -0.54% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | StartStopWithChild |
net6.0 | 11.4μs | 55ns | 233ns | 0 | 0 | 0 | 5.52 KB |
| master | StartStopWithChild |
netcoreapp3.1 | 13.7μs | 68.5ns | 291ns | 0 | 0 | 0 | 5.71 KB |
| master | StartStopWithChild |
net472 | 21.9μs | 114ns | 591ns | 0.883 | 0.221 | 0 | 6.05 KB |
| #7695 | StartStopWithChild |
net6.0 | 10.4μs | 58.2ns | 390ns | 0 | 0 | 0 | 5.49 KB |
| #7695 | StartStopWithChild |
netcoreapp3.1 | 13.8μs | 70.4ns | 330ns | 0 | 0 | 0 | 5.7 KB |
| #7695 | StartStopWithChild |
net472 | 21.6μs | 111ns | 544ns | 0.87 | 0.217 | 0 | 6.1 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 | 940μs | 73.7ns | 255ns | 0 | 0 | 0 | 2.71 KB |
| master | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 1.01ms | 648ns | 2.51μs | 0 | 0 | 0 | 2.7 KB |
| master | WriteAndFlushEnrichedTraces |
net472 | 1.19ms | 70.7ns | 255ns | 0 | 0 | 0 | 3.31 KB |
| #7695 | WriteAndFlushEnrichedTraces |
net6.0 | 929μs | 153ns | 593ns | 0 | 0 | 0 | 2.71 KB |
| #7695 | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 1.03ms | 169ns | 654ns | 0 | 0 | 0 | 2.7 KB |
| #7695 | WriteAndFlushEnrichedTraces |
net472 | 1.22ms | 63.5ns | 238ns | 0 | 0 | 0 | 3.31 KB |
Benchmarks.Trace.Asm.AppSecBodyBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | AllCycleSimpleBody |
net6.0 | 1.07μs | 5.75ns | 29.9ns | 0 | 0 | 0 | 1.22 KB |
| master | AllCycleSimpleBody |
netcoreapp3.1 | 1.41μs | 7.61ns | 43.1ns | 0 | 0 | 0 | 1.2 KB |
| master | AllCycleSimpleBody |
net472 | 1.03μs | 0.326ns | 1.22ns | 0.194 | 0 | 0 | 1.23 KB |
| master | AllCycleMoreComplexBody |
net6.0 | 6.97μs | 36.9ns | 202ns | 0 | 0 | 0 | 4.72 KB |
| master | AllCycleMoreComplexBody |
netcoreapp3.1 | 9.08μs | 41.6ns | 167ns | 0 | 0 | 0 | 4.62 KB |
| master | AllCycleMoreComplexBody |
net472 | 7.58μs | 3.67ns | 14.2ns | 0.719 | 0 | 0 | 4.74 KB |
| master | ObjectExtractorSimpleBody |
net6.0 | 317ns | 1.7ns | 9ns | 0 | 0 | 0 | 280 B |
| master | ObjectExtractorSimpleBody |
netcoreapp3.1 | 396ns | 2.25ns | 15.3ns | 0 | 0 | 0 | 272 B |
| master | ObjectExtractorSimpleBody |
net472 | 300ns | 0.064ns | 0.24ns | 0.0438 | 0 | 0 | 281 B |
| master | ObjectExtractorMoreComplexBody |
net6.0 | 6.32μs | 29.7ns | 126ns | 0 | 0 | 0 | 3.78 KB |
| master | ObjectExtractorMoreComplexBody |
netcoreapp3.1 | 7.77μs | 29.3ns | 114ns | 0 | 0 | 0 | 3.69 KB |
| master | ObjectExtractorMoreComplexBody |
net472 | 6.68μs | 1.8ns | 6.98ns | 0.602 | 0 | 0 | 3.8 KB |
| #7695 | AllCycleSimpleBody |
net6.0 | 1.13μs | 6.2ns | 36.7ns | 0 | 0 | 0 | 1.22 KB |
| #7695 | AllCycleSimpleBody |
netcoreapp3.1 | 1.39μs | 7.69ns | 50.5ns | 0 | 0 | 0 | 1.2 KB |
| #7695 | AllCycleSimpleBody |
net472 | 1.03μs | 0.608ns | 2.35ns | 0.191 | 0 | 0 | 1.23 KB |
| #7695 | AllCycleMoreComplexBody |
net6.0 | 7.03μs | 36.2ns | 173ns | 0 | 0 | 0 | 4.72 KB |
| #7695 | AllCycleMoreComplexBody |
netcoreapp3.1 | 9.07μs | 7.64ns | 28.6ns | 0 | 0 | 0 | 4.62 KB |
| #7695 | AllCycleMoreComplexBody |
net472 | 7.6μs | 4.44ns | 17.2ns | 0.723 | 0 | 0 | 4.74 KB |
| #7695 | ObjectExtractorSimpleBody |
net6.0 | 316ns | 1.74ns | 9.82ns | 0 | 0 | 0 | 280 B |
| #7695 | ObjectExtractorSimpleBody |
netcoreapp3.1 | 398ns | 0.114ns | 0.394ns | 0 | 0 | 0 | 272 B |
| #7695 | ObjectExtractorSimpleBody |
net472 | 300ns | 0.0354ns | 0.128ns | 0.0437 | 0 | 0 | 281 B |
| #7695 | ObjectExtractorMoreComplexBody |
net6.0 | 6.4μs | 27.7ns | 107ns | 0 | 0 | 0 | 3.78 KB |
| #7695 | ObjectExtractorMoreComplexBody |
netcoreapp3.1 | 7.86μs | 34.9ns | 135ns | 0 | 0 | 0 | 3.69 KB |
| #7695 | ObjectExtractorMoreComplexBody |
net472 | 6.67μs | 4.64ns | 18ns | 0.602 | 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.9μs | 168ns | 652ns | 0 | 0 | 0 | 32.4 KB |
| master | EncodeArgs |
netcoreapp3.1 | 96.7μs | 280ns | 1.05μs | 0 | 0 | 0 | 32.4 KB |
| master | EncodeArgs |
net472 | 112μs | 15.4ns | 59.7ns | 5.02 | 0 | 0 | 32.5 KB |
| master | EncodeLegacyArgs |
net6.0 | 144μs | 47.8ns | 179ns | 0 | 0 | 0 | 2.15 KB |
| master | EncodeLegacyArgs |
netcoreapp3.1 | 199μs | 189ns | 732ns | 0 | 0 | 0 | 2.14 KB |
| master | EncodeLegacyArgs |
net472 | 262μs | 150ns | 583ns | 0 | 0 | 0 | 2.16 KB |
| #7695 | EncodeArgs |
net6.0 | 77.3μs | 264ns | 1.02μs | 0 | 0 | 0 | 32.4 KB |
| #7695 | EncodeArgs |
netcoreapp3.1 | 96.5μs | 355ns | 1.37μs | 0 | 0 | 0 | 32.4 KB |
| #7695 | EncodeArgs |
net472 | 114μs | 40ns | 155ns | 5.15 | 0 | 0 | 32.51 KB |
| #7695 | EncodeLegacyArgs |
net6.0 | 147μs | 90.4ns | 350ns | 0 | 0 | 0 | 2.14 KB |
| #7695 | EncodeLegacyArgs |
netcoreapp3.1 | 202μs | 60.8ns | 227ns | 0 | 0 | 0 | 2.14 KB |
| #7695 | EncodeLegacyArgs |
net472 | 263μs | 31.5ns | 118ns | 0 | 0 | 0 | 2.16 KB |
Benchmarks.Trace.Asm.AppSecWafBenchmark - Slower ⚠️ Same allocations ✔️
Slower ⚠️ in #7695
Benchmark
diff/base
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack‑netcoreapp3.1
2.429
296,601.22
720,574.70
| Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
|---|---|---|---|---|
| Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack‑netcoreapp3.1 | 2.429 | 296,601.22 | 720,574.70 |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | RunWafRealisticBenchmark |
net6.0 | 396μs | 89.2ns | 345ns | 0 | 0 | 0 | 4.55 KB |
| master | RunWafRealisticBenchmark |
netcoreapp3.1 | 411μs | 163ns | 586ns | 0 | 0 | 0 | 4.48 KB |
| master | RunWafRealisticBenchmark |
net472 | 429μs | 90.6ns | 351ns | 0 | 0 | 0 | 4.66 KB |
| master | RunWafRealisticBenchmarkWithAttack |
net6.0 | 295μs | 84ns | 314ns | 0 | 0 | 0 | 2.24 KB |
| master | RunWafRealisticBenchmarkWithAttack |
netcoreapp3.1 | 297μs | 106ns | 409ns | 0 | 0 | 0 | 2.22 KB |
| master | RunWafRealisticBenchmarkWithAttack |
net472 | 314μs | 25.1ns | 93.8ns | 0 | 0 | 0 | 2.29 KB |
| #7695 | RunWafRealisticBenchmark |
net6.0 | 391μs | 27.2ns | 102ns | 0 | 0 | 0 | 4.55 KB |
| #7695 | RunWafRealisticBenchmark |
netcoreapp3.1 | 408μs | 155ns | 537ns | 0 | 0 | 0 | 4.48 KB |
| #7695 | RunWafRealisticBenchmark |
net472 | 425μs | 69.7ns | 270ns | 0 | 0 | 0 | 4.66 KB |
| #7695 | RunWafRealisticBenchmarkWithAttack |
net6.0 | 284μs | 44.2ns | 159ns | 0 | 0 | 0 | 2.24 KB |
| #7695 | RunWafRealisticBenchmarkWithAttack |
netcoreapp3.1 | 674μs | 12.9μs | 129μs | 0 | 0 | 0 | 2.22 KB |
| #7695 | RunWafRealisticBenchmarkWithAttack |
net472 | 309μs | 33.5ns | 130ns | 0 | 0 | 0 | 2.29 KB |
Benchmarks.Trace.AspNetCoreBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | SendRequest |
net6.0 | 61.5μs | 62.5ns | 225ns | 0 | 0 | 0 | 14.52 KB |
| master | SendRequest |
netcoreapp3.1 | 73.6μs | 399ns | 2.15μs | 0 | 0 | 0 | 17.42 KB |
| master | SendRequest |
net472 | 0.00285ns | 0.00147ns | 0.00569ns | 0 | 0 | 0 | 0 b |
| #7695 | SendRequest |
net6.0 | 61.2μs | 167ns | 625ns | 0 | 0 | 0 | 14.52 KB |
| #7695 | SendRequest |
netcoreapp3.1 | 70.5μs | 96.1ns | 372ns | 0 | 0 | 0 | 17.42 KB |
| #7695 | SendRequest |
net472 | 0.00794ns | 0.00338ns | 0.0131ns | 0 | 0 | 0 | 0 b |
Benchmarks.Trace.CharSliceBenchmark - Same speed ✔️ More allocations ⚠️
More allocations ⚠️ in #7695
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net6.0
2 B
7 B
5 B
250.00%
Fewer allocations 🎉 in #7695
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net472
48 B
47 B
-1 B
-2.08%
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net472
85 B
73 B
-12 B
-14.12%
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net6.0
4 B
3 B
-1 B
-25.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 | 7 B | 5 B | 250.00% |
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net472 | 48 B | 47 B | -1 B | -2.08% |
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net472 | 85 B | 73 B | -12 B | -14.12% |
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net6.0 | 4 B | 3 B | -1 B | -25.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.95ms | 169ns | 654ns | 0 | 0 | 0 | 640.01 KB |
| master | OriginalCharSlice |
netcoreapp3.1 | 2.11ms | 2.98μs | 10.8μs | 0 | 0 | 0 | 640 KB |
| master | OriginalCharSlice |
net472 | 2.69ms | 176ns | 681ns | 100 | 0 | 0 | 641.95 KB |
| master | OptimizedCharSlice |
net6.0 | 1.41ms | 551ns | 2.13μs | 0 | 0 | 0 | 2 B |
| master | OptimizedCharSlice |
netcoreapp3.1 | 1.79ms | 4.21μs | 16.3μs | 0 | 0 | 0 | 1 B |
| master | OptimizedCharSlice |
net472 | 2.07ms | 367ns | 1.32μs | 0 | 0 | 0 | 85 B |
| master | OptimizedCharSliceWithPool |
net6.0 | 856μs | 29ns | 109ns | 0 | 0 | 0 | 4 B |
| master | OptimizedCharSliceWithPool |
netcoreapp3.1 | 801μs | 71ns | 275ns | 0 | 0 | 0 | 1 B |
| master | OptimizedCharSliceWithPool |
net472 | 1.18ms | 110ns | 427ns | 0 | 0 | 0 | 48 B |
| #7695 | OriginalCharSlice |
net6.0 | 1.93ms | 5.17μs | 20μs | 0 | 0 | 0 | 640.01 KB |
| #7695 | OriginalCharSlice |
netcoreapp3.1 | 2.09ms | 4.37μs | 16.9μs | 0 | 0 | 0 | 640 KB |
| #7695 | OriginalCharSlice |
net472 | 2.76ms | 1.06μs | 4.1μs | 100 | 0 | 0 | 641.95 KB |
| #7695 | OptimizedCharSlice |
net6.0 | 1.34ms | 435ns | 1.68μs | 0 | 0 | 0 | 7 B |
| #7695 | OptimizedCharSlice |
netcoreapp3.1 | 1.71ms | 243ns | 908ns | 0 | 0 | 0 | 1 B |
| #7695 | OptimizedCharSlice |
net472 | 1.92ms | 424ns | 1.64μs | 0 | 0 | 0 | 73 B |
| #7695 | OptimizedCharSliceWithPool |
net6.0 | 842μs | 69.1ns | 268ns | 0 | 0 | 0 | 3 B |
| #7695 | OptimizedCharSliceWithPool |
netcoreapp3.1 | 812μs | 212ns | 823ns | 0 | 0 | 0 | 0 b |
| #7695 | OptimizedCharSliceWithPool |
net472 | 1.15ms | 98.5ns | 381ns | 0 | 0 | 0 | 47 B |
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed ✔️ More allocations ⚠️
More allocations ⚠️ in #7695
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑netcoreapp3.1
41.93 KB
42.68 KB
749 B
1.79%
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net472
56.12 KB
56.56 KB
443 B
0.79%
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑netcoreapp3.1 | 41.93 KB | 42.68 KB | 749 B | 1.79% |
| Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net472 | 56.12 KB | 56.56 KB | 443 B | 0.79% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | WriteAndFlushEnrichedTraces |
net6.0 | 698μs | 3.39μs | 13.6μs | 0 | 0 | 0 | 41.63 KB |
| master | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 730μs | 4.23μs | 37.6μs | 0 | 0 | 0 | 41.93 KB |
| master | WriteAndFlushEnrichedTraces |
net472 | 884μs | 4.04μs | 15.6μs | 8.33 | 0 | 0 | 56.12 KB |
| #7695 | WriteAndFlushEnrichedTraces |
net6.0 | 724μs | 843ns | 3.26μs | 0 | 0 | 0 | 41.48 KB |
| #7695 | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 744μs | 3.08μs | 11.9μs | 0 | 0 | 0 | 42.68 KB |
| #7695 | WriteAndFlushEnrichedTraces |
net472 | 951μs | 4.33μs | 20.8μs | 8.33 | 0 | 0 | 56.56 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 | 2μs | 3.92ns | 15.2ns | 0 | 0 | 0 | 1.02 KB |
| master | ExecuteNonQuery |
netcoreapp3.1 | 2.52μs | 11.9ns | 46.3ns | 0 | 0 | 0 | 1.02 KB |
| master | ExecuteNonQuery |
net472 | 2.9μs | 2ns | 7.48ns | 0.145 | 0.0145 | 0 | 987 B |
| #7695 | ExecuteNonQuery |
net6.0 | 1.98μs | 1.74ns | 6.73ns | 0 | 0 | 0 | 1.02 KB |
| #7695 | ExecuteNonQuery |
netcoreapp3.1 | 2.63μs | 3.76ns | 14.1ns | 0 | 0 | 0 | 1.02 KB |
| #7695 | ExecuteNonQuery |
net472 | 2.78μs | 4.28ns | 16ns | 0.153 | 0.0139 | 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 | 2.3ns | 8.93ns | 0 | 0 | 0 | 1.03 KB |
| master | CallElasticsearch |
netcoreapp3.1 | 2.25μs | 7.91ns | 30.6ns | 0 | 0 | 0 | 1.03 KB |
| master | CallElasticsearch |
net472 | 3.58μs | 5.55ns | 21.5ns | 0.159 | 0 | 0 | 1.04 KB |
| master | CallElasticsearchAsync |
net6.0 | 1.87μs | 7.49ns | 29ns | 0 | 0 | 0 | 1.01 KB |
| master | CallElasticsearchAsync |
netcoreapp3.1 | 2.33μs | 11ns | 42.6ns | 0 | 0 | 0 | 1.08 KB |
| master | CallElasticsearchAsync |
net472 | 3.68μs | 4.81ns | 18.6ns | 0.165 | 0 | 0 | 1.1 KB |
| #7695 | CallElasticsearch |
net6.0 | 1.8μs | 0.729ns | 2.82ns | 0 | 0 | 0 | 1.03 KB |
| #7695 | CallElasticsearch |
netcoreapp3.1 | 2.3μs | 11ns | 43.9ns | 0 | 0 | 0 | 1.03 KB |
| #7695 | CallElasticsearch |
net472 | 3.5μs | 0.985ns | 3.81ns | 0.157 | 0 | 0 | 1.04 KB |
| #7695 | CallElasticsearchAsync |
net6.0 | 1.89μs | 9.42ns | 43.2ns | 0 | 0 | 0 | 1.01 KB |
| #7695 | CallElasticsearchAsync |
netcoreapp3.1 | 2.51μs | 7.37ns | 28.5ns | 0 | 0 | 0 | 1.08 KB |
| #7695 | CallElasticsearchAsync |
net472 | 3.73μs | 3.03ns | 11.3ns | 0.168 | 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.74ns | 14.5ns | 0 | 0 | 0 | 952 B |
| master | ExecuteAsync |
netcoreapp3.1 | 2.36μs | 8.18ns | 30.6ns | 0 | 0 | 0 | 952 B |
| master | ExecuteAsync |
net472 | 2.54μs | 1.53ns | 5.92ns | 0.141 | 0 | 0 | 915 B |
| #7695 | ExecuteAsync |
net6.0 | 1.92μs | 9.45ns | 39ns | 0 | 0 | 0 | 952 B |
| #7695 | ExecuteAsync |
netcoreapp3.1 | 2.35μs | 8.01ns | 31ns | 0 | 0 | 0 | 952 B |
| #7695 | ExecuteAsync |
net472 | 2.58μs | 2.84ns | 11ns | 0.142 | 0 | 0 | 915 B |
Benchmarks.Trace.HttpClientBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | SendAsync |
net6.0 | 6.86μs | 7.22ns | 27.9ns | 0 | 0 | 0 | 2.36 KB |
| master | SendAsync |
netcoreapp3.1 | 8.6μs | 18.5ns | 71.7ns | 0 | 0 | 0 | 2.9 KB |
| master | SendAsync |
net472 | 12.1μs | 8.1ns | 31.4ns | 0.484 | 0 | 0 | 3.18 KB |
| #7695 | SendAsync |
net6.0 | 6.91μs | 13.7ns | 51.2ns | 0 | 0 | 0 | 2.36 KB |
| #7695 | SendAsync |
netcoreapp3.1 | 8.77μs | 33.9ns | 131ns | 0 | 0 | 0 | 2.9 KB |
| #7695 | SendAsync |
net472 | 12.7μs | 8.66ns | 33.5ns | 0.445 | 0 | 0 | 3.18 KB |
Benchmarks.Trace.Iast.StringAspectsBenchmark - Same speed ✔️ More allocations ⚠️
More allocations ⚠️ in #7695
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net472
57.34 KB
65.54 KB
8.19 KB
14.29%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0
257.82 KB
276.17 KB
18.34 KB
7.11%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net6.0
43.1 KB
44.06 KB
960 B
2.23%
Fewer allocations 🎉 in #7695
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1
272.36 KB
256.94 KB
-15.42 KB
-5.66%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑netcoreapp3.1
46.1 KB
42.64 KB
-3.46 KB
-7.51%
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net472 | 57.34 KB | 65.54 KB | 8.19 KB | 14.29% |
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0 | 257.82 KB | 276.17 KB | 18.34 KB | 7.11% |
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net6.0 | 43.1 KB | 44.06 KB | 960 B | 2.23% |
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1 | 272.36 KB | 256.94 KB | -15.42 KB | -5.66% |
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑netcoreapp3.1 | 46.1 KB | 42.64 KB | -3.46 KB | -7.51% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | StringConcatBenchmark |
net6.0 | 46.5μs | 519ns | 4.96μs | 0 | 0 | 0 | 43.1 KB |
| master | StringConcatBenchmark |
netcoreapp3.1 | 49.6μs | 277ns | 2.36μs | 0 | 0 | 0 | 46.1 KB |
| master | StringConcatBenchmark |
net472 | 58μs | 146ns | 545ns | 0 | 0 | 0 | 57.34 KB |
| master | StringConcatAspectBenchmark |
net6.0 | 514μs | 1.64μs | 5.68μs | 0 | 0 | 0 | 257.82 KB |
| master | StringConcatAspectBenchmark |
netcoreapp3.1 | 519μs | 1.2μs | 4.34μs | 0 | 0 | 0 | 272.36 KB |
| master | StringConcatAspectBenchmark |
net472 | 404μs | 2μs | 16.5μs | 0 | 0 | 0 | 278.53 KB |
| #7695 | StringConcatBenchmark |
net6.0 | 45.1μs | 265ns | 2.17μs | 0 | 0 | 0 | 44.06 KB |
| #7695 | StringConcatBenchmark |
netcoreapp3.1 | 46.9μs | 247ns | 1.16μs | 0 | 0 | 0 | 42.64 KB |
| #7695 | StringConcatBenchmark |
net472 | 57.9μs | 163ns | 611ns | 0 | 0 | 0 | 65.54 KB |
| #7695 | StringConcatAspectBenchmark |
net6.0 | 551μs | 1.96μs | 7.08μs | 0 | 0 | 0 | 276.17 KB |
| #7695 | StringConcatAspectBenchmark |
netcoreapp3.1 | 494μs | 1.66μs | 6.65μs | 0 | 0 | 0 | 256.94 KB |
| #7695 | StringConcatAspectBenchmark |
net472 | 406μs | 2.15μs | 10.8μ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.63μs | 12.4ns | 49.7ns | 0 | 0 | 0 | 1.7 KB |
| master | EnrichedLog |
netcoreapp3.1 | 3.62μs | 16.7ns | 64.5ns | 0 | 0 | 0 | 1.7 KB |
| master | EnrichedLog |
net472 | 4.12μs | 4.34ns | 16.8ns | 0.244 | 0 | 0 | 1.64 KB |
| #7695 | EnrichedLog |
net6.0 | 2.7μs | 13.9ns | 61.9ns | 0 | 0 | 0 | 1.7 KB |
| #7695 | EnrichedLog |
netcoreapp3.1 | 3.69μs | 2.94ns | 10.6ns | 0 | 0 | 0 | 1.7 KB |
| #7695 | EnrichedLog |
net472 | 4.01μs | 3.25ns | 12.6ns | 0.24 | 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 | 127μs | 257ns | 890ns | 0 | 0 | 0 | 4.31 KB |
| master | EnrichedLog |
netcoreapp3.1 | 133μs | 165ns | 596ns | 0 | 0 | 0 | 4.31 KB |
| master | EnrichedLog |
net472 | 173μs | 284ns | 1.1μs | 0 | 0 | 0 | 4.52 KB |
| #7695 | EnrichedLog |
net6.0 | 127μs | 297ns | 1.11μs | 0 | 0 | 0 | 4.31 KB |
| #7695 | EnrichedLog |
netcoreapp3.1 | 127μs | 67.1ns | 242ns | 0 | 0 | 0 | 4.31 KB |
| #7695 | EnrichedLog |
net472 | 167μs | 79.6ns | 308ns | 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.13μs | 17.6ns | 68.1ns | 0 | 0 | 0 | 2.26 KB |
| master | EnrichedLog |
netcoreapp3.1 | 6.75μs | 15.4ns | 59.5ns | 0 | 0 | 0 | 2.26 KB |
| master | EnrichedLog |
net472 | 7.51μs | 8.31ns | 32.2ns | 0.3 | 0 | 0 | 2.08 KB |
| #7695 | EnrichedLog |
net6.0 | 5.16μs | 7.88ns | 30.5ns | 0 | 0 | 0 | 2.26 KB |
| #7695 | EnrichedLog |
netcoreapp3.1 | 7.1μs | 7.46ns | 28.9ns | 0 | 0 | 0 | 2.26 KB |
| #7695 | EnrichedLog |
net472 | 7.58μs | 6.5ns | 25.2ns | 0.303 | 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 | 0.673ns | 2.61ns | 0 | 0 | 0 | 1.2 KB |
| master | SendReceive |
netcoreapp3.1 | 2.65μs | 11.8ns | 45.6ns | 0 | 0 | 0 | 1.2 KB |
| master | SendReceive |
net472 | 3.15μs | 6.36ns | 24.6ns | 0.187 | 0 | 0 | 1.2 KB |
| #7695 | SendReceive |
net6.0 | 2.07μs | 10.5ns | 51.3ns | 0 | 0 | 0 | 1.2 KB |
| #7695 | SendReceive |
netcoreapp3.1 | 2.51μs | 13.1ns | 62.8ns | 0 | 0 | 0 | 1.2 KB |
| #7695 | SendReceive |
net472 | 3.1μs | 0.617ns | 2.39ns | 0.186 | 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.21μs | 2.86ns | 11.1ns | 0 | 0 | 0 | 1.58 KB |
| master | EnrichedLog |
netcoreapp3.1 | 5.49μs | 16.8ns | 65ns | 0 | 0 | 0 | 1.63 KB |
| master | EnrichedLog |
net472 | 6.45μs | 7.3ns | 28.3ns | 0.292 | 0 | 0 | 2.03 KB |
| #7695 | EnrichedLog |
net6.0 | 4.41μs | 15.1ns | 56.5ns | 0 | 0 | 0 | 1.58 KB |
| #7695 | EnrichedLog |
netcoreapp3.1 | 5.6μs | 12.1ns | 47ns | 0 | 0 | 0 | 1.63 KB |
| #7695 | EnrichedLog |
net472 | 6.62μs | 6.58ns | 24.6ns | 0.297 | 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 | 790ns | 4.27ns | 22.2ns | 0 | 0 | 0 | 576 B |
| master | StartFinishSpan |
netcoreapp3.1 | 965ns | 5.37ns | 32.7ns | 0 | 0 | 0 | 576 B |
| master | StartFinishSpan |
net472 | 921ns | 0.498ns | 1.93ns | 0.088 | 0 | 0 | 578 B |
| master | StartFinishScope |
net6.0 | 924ns | 4.61ns | 20.1ns | 0 | 0 | 0 | 696 B |
| master | StartFinishScope |
netcoreapp3.1 | 1.18μs | 6.09ns | 30.5ns | 0 | 0 | 0 | 696 B |
| master | StartFinishScope |
net472 | 1.12μs | 0.542ns | 2.1ns | 0.1 | 0 | 0 | 658 B |
| #7695 | StartFinishSpan |
net6.0 | 770ns | 4.19ns | 22.5ns | 0 | 0 | 0 | 576 B |
| #7695 | StartFinishSpan |
netcoreapp3.1 | 969ns | 4.74ns | 19.5ns | 0 | 0 | 0 | 576 B |
| #7695 | StartFinishSpan |
net472 | 924ns | 0.783ns | 3.03ns | 0.0885 | 0 | 0 | 578 B |
| #7695 | StartFinishScope |
net6.0 | 945ns | 4.71ns | 20.5ns | 0 | 0 | 0 | 696 B |
| #7695 | StartFinishScope |
netcoreapp3.1 | 1.21μs | 6.38ns | 31.3ns | 0 | 0 | 0 | 697 B |
| #7695 | StartFinishScope |
net472 | 1.12μs | 1.14ns | 4.25ns | 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.11μs | 1.63ns | 6.32ns | 0 | 0 | 0 | 696 B |
| master | RunOnMethodBegin |
netcoreapp3.1 | 1.45μs | 5ns | 18.7ns | 0 | 0 | 0 | 696 B |
| master | RunOnMethodBegin |
net472 | 1.47μs | 1.06ns | 4.1ns | 0.102 | 0 | 0 | 658 B |
| #7695 | RunOnMethodBegin |
net6.0 | 1.06μs | 0.718ns | 2.59ns | 0 | 0 | 0 | 696 B |
| #7695 | RunOnMethodBegin |
netcoreapp3.1 | 1.43μs | 4.59ns | 17.8ns | 0 | 0 | 0 | 696 B |
| #7695 | RunOnMethodBegin |
net472 | 1.44μs | 0.905ns | 3.5ns | 0.101 | 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
This comment has been minimized.
This comment has been minimized.
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
c691a0e to
a52caed
Compare
1477479 to
e27c515
Compare
…ndows (#7721) ## Summary of changes Enforces that you can't _change_ the `AgentUri` to be a UDS Uri if you're on Windows ## Reason for change The trace exporter doesn't work with UDS on Windows, so we have a check in `TracerSettings` that disables the pipeline if we find this scenario. However, user's can still _change_ the agent URI at runtime in code (😭). We currently assume that the data pipeline won't be toggled at runtime (we _do_ allow for reconfiguring it in general, but not for completely removing or reintroducing). Changing this to allow the scenario would be a pain, so instead this PR blocks you from setting a UDS URI in code if you're on Windows. The good news is that as far as I can tell, noone does this today, so while _technically_ it could be considered a breaking change, I think it's ok. ## Implementation details - Throw an `ArgumentException` in the Datadog.Trace.Manual library, if you're on Windows (or .NET FX) and you try to set a UDS agent URI (using the same "detection" we do in `ExporterSettings`. - Add a check in the Instrumentation of `Tracer.Configure()` to make sure it hasn't slipped through. This could happen if a customer was using an old version of the Datadog.Trace NuGet package with a newer version of auto instrumentation. Note that this adds two additional framework references for .NET Core 3.1+, to check if we're on Windows. ## Test coverage Added an extra step to the manual instrumentation integration test to confirm we throw ## Other details https://datadoghq.atlassian.net/browse/LANGPLAT-819 Part of a config stack - #7522 - #7525 - #7530 - #7532 - #7543 - #7544 - #7721 👈 - #7722 - #7695 - #7723 - #7724
a52caed to
36d5027
Compare
e27c515 to
41ce09f
Compare
## Summary of changes Add a helper for comparing `ReadOnlyDictionary<>` instances ## Reason for change As part of the config work, we need to detect if tags have changed when customers do a manual/remote config update. This helper makes it easy ## Implementation details Added a `SequenceEqual` extension method. Note that I used `SequenceEqual` because it _already_ exists in _System.Linq_, but I could see an argument that it's too easy to use the wrong one, and instead we could use a different name? `IsSameAs(other)`? Also, I only wrote this for `ReadOnlyDictionary<>` because that's all we need, it's what we use for all our setting dictionaries, and it will be (a tiny bit) faster than making it `IDictionary<>`, but happy to change if people feel strongly. ## Test coverage Added unit tests ## Other details https://datadoghq.atlassian.net/browse/LANGPLAT-819 Part of a config stack - #7522 - #7525 - #7530 - #7532 - #7543 - #7544 - #7721 - #7722 👈 - #7695 - #7723 - #7724 --------- Co-authored-by: Steven Bouwkamp <[email protected]>
36d5027 to
717fff8
Compare
- Ensure subscribing doesn't receive out-of-order updates - Fix log message
717fff8 to
21e9e1c
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