Skip to content

Conversation

@andrewlock
Copy link
Member

@andrewlock andrewlock commented Oct 28, 2025

Summary of changes

Instead of exposing settings like ServiceVerion and Environment on TracerSettings, only expose them on MutableSettings

Reason for change

This is all part of the refactoring towards having TracerSettings being an immutable settings object, that's created once on app startup, and fixed for the lifetime. ServiceVerion and Environment currently delegate to the MutableSettings object stored on TracerSettings, but are going to move that elsewhere shortly so that consumers can subscribe to changes

Implementation details

For this PR, it's just a case of changing TracerSettings.XXX => TracerSettings.Mutable.XXX. A future PR will then subsequently "fix" these usages properly. This is just a small step to be able to remove the mutable properties from TracerSettings

Test coverage

Just a refactoring, covered by existing tests.

Other details

https://datadoghq.atlassian.net/browse/LANGPLAT-819

Part of a config stack

@pr-commenter
Copy link

pr-commenter bot commented Oct 28, 2025

Benchmarks

Benchmarks Report for benchmark platform 🐌

Benchmarks for #7723 compared to master:

  • 1 benchmarks are faster, with geometric mean 1.120
  • 2 benchmarks are slower, with geometric mean 1.701
  • 2 benchmarks have fewer allocations
  • 6 benchmarks have more allocations

The following thresholds were used for comparing the benchmark speeds:

  • Mann–Whitney U test with statistical test for significance of 5%
  • Only results indicating a difference greater than 10% and 0.3 ns are considered.

Allocation changes below 0.5% are ignored.

Benchmark details

Benchmarks.Trace.ActivityBenchmark - Same speed ✔️ More allocations ⚠️

More allocations ⚠️ in #7723

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.ActivityBenchmark.StartStopWithChild‑netcoreapp3.1 5.7 KB 5.74 KB 41 B 0.72%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartStopWithChild net6.0 10.7μs 55.6ns 289ns 0 0 0 5.51 KB
master StartStopWithChild netcoreapp3.1 13.6μs 68.7ns 315ns 0 0 0 5.7 KB
master StartStopWithChild net472 22.1μs 117ns 585ns 0.893 0.223 0 6.11 KB
#7723 StartStopWithChild net6.0 10.9μs 57.6ns 316ns 0 0 0 5.52 KB
#7723 StartStopWithChild netcoreapp3.1 13.4μs 70.5ns 360ns 0 0 0 5.74 KB
#7723 StartStopWithChild net472 22.1μs 123ns 736ns 0.963 0.214 0 6.11 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 927μs 645ns 2.5μs 0 0 0 2.71 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 1.02ms 85.2ns 307ns 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces net472 1.19ms 77.5ns 300ns 0 0 0 3.31 KB
#7723 WriteAndFlushEnrichedTraces net6.0 944μs 134ns 485ns 0 0 0 2.71 KB
#7723 WriteAndFlushEnrichedTraces netcoreapp3.1 1.03ms 3.99μs 15.5μs 0 0 0 2.7 KB
#7723 WriteAndFlushEnrichedTraces net472 1.2ms 491ns 1.9μs 0 0 0 3.31 KB
Benchmarks.Trace.Asm.AppSecBodyBenchmark - Unknown 🤷 Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master AllCycleSimpleBody net6.0 N/A N/A N/A NaN NaN NaN 0 b
master AllCycleSimpleBody netcoreapp3.1 N/A N/A N/A NaN NaN NaN 0 b
master AllCycleSimpleBody net472 N/A N/A N/A NaN NaN NaN 0 b
master AllCycleMoreComplexBody net6.0 N/A N/A N/A NaN NaN NaN 0 b
master AllCycleMoreComplexBody netcoreapp3.1 N/A N/A N/A NaN NaN NaN 0 b
master AllCycleMoreComplexBody net472 N/A N/A N/A NaN NaN NaN 0 b
master ObjectExtractorSimpleBody net6.0 316ns 1.71ns 9.36ns 0 0 0 280 B
master ObjectExtractorSimpleBody netcoreapp3.1 406ns 2.24ns 12.7ns 0 0 0 272 B
master ObjectExtractorSimpleBody net472 302ns 0.0515ns 0.199ns 0.044 0 0 281 B
master ObjectExtractorMoreComplexBody net6.0 6.3μs 31.1ns 139ns 0 0 0 3.78 KB
master ObjectExtractorMoreComplexBody netcoreapp3.1 7.86μs 38.1ns 162ns 0 0 0 3.69 KB
master ObjectExtractorMoreComplexBody net472 6.67μs 1.66ns 6.41ns 0.6 0 0 3.8 KB
#7723 AllCycleSimpleBody net6.0 N/A N/A N/A NaN NaN NaN 0 b
#7723 AllCycleSimpleBody netcoreapp3.1 N/A N/A N/A NaN NaN NaN 0 b
#7723 AllCycleSimpleBody net472 N/A N/A N/A NaN NaN NaN 0 b
#7723 AllCycleMoreComplexBody net6.0 N/A N/A N/A NaN NaN NaN 0 b
#7723 AllCycleMoreComplexBody netcoreapp3.1 N/A N/A N/A NaN NaN NaN 0 b
#7723 AllCycleMoreComplexBody net472 N/A N/A N/A NaN NaN NaN 0 b
#7723 ObjectExtractorSimpleBody net6.0 318ns 1.58ns 7.23ns 0 0 0 280 B
#7723 ObjectExtractorSimpleBody netcoreapp3.1 402ns 2.19ns 12.8ns 0 0 0 272 B
#7723 ObjectExtractorSimpleBody net472 295ns 0.0171ns 0.0641ns 0.0446 0 0 281 B
#7723 ObjectExtractorMoreComplexBody net6.0 6.26μs 32.6ns 166ns 0 0 0 3.78 KB
#7723 ObjectExtractorMoreComplexBody netcoreapp3.1 7.97μs 36.1ns 140ns 0 0 0 3.69 KB
#7723 ObjectExtractorMoreComplexBody net472 6.72μs 6.61ns 25.6ns 0.572 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.3μs 85.6ns 331ns 0 0 0 32.4 KB
master EncodeArgs netcoreapp3.1 96.8μs 267ns 1.03μs 0 0 0 32.4 KB
master EncodeArgs net472 111μs 9.95ns 38.5ns 5.02 0 0 32.5 KB
master EncodeLegacyArgs net6.0 143μs 36.6ns 142ns 0 0 0 2.15 KB
master EncodeLegacyArgs netcoreapp3.1 198μs 272ns 1.05μs 0 0 0 2.14 KB
master EncodeLegacyArgs net472 263μs 145ns 562ns 0 0 0 2.16 KB
#7723 EncodeArgs net6.0 76.2μs 232ns 899ns 0 0 0 32.4 KB
#7723 EncodeArgs netcoreapp3.1 98.3μs 202ns 783ns 0 0 0 32.4 KB
#7723 EncodeArgs net472 110μs 9.22ns 35.7ns 4.94 0 0 32.51 KB
#7723 EncodeLegacyArgs net6.0 146μs 17.5ns 63.3ns 0 0 0 2.15 KB
#7723 EncodeLegacyArgs netcoreapp3.1 201μs 326ns 1.26μs 0 0 0 2.14 KB
#7723 EncodeLegacyArgs net472 267μs 104ns 402ns 0 0 0 2.16 KB
Benchmarks.Trace.Asm.AppSecWafBenchmark - Slower ⚠️ Same allocations ✔️

Slower ⚠️ in #7723

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack‑netcoreapp3.1 2.405 299,521.88 720,399.11

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
#7723 RunWafRealisticBenchmark net6.0 397μs 67.7ns 253ns 0 0 0 4.55 KB
#7723 RunWafRealisticBenchmark netcoreapp3.1 412μs 118ns 407ns 0 0 0 4.48 KB
#7723 RunWafRealisticBenchmark net472 427μs 50.8ns 190ns 0 0 0 4.66 KB
#7723 RunWafRealisticBenchmarkWithAttack net6.0 289μs 72.5ns 271ns 0 0 0 2.24 KB
#7723 RunWafRealisticBenchmarkWithAttack netcoreapp3.1 671μs 14.2μs 135μs 0 0 0 2.22 KB
#7723 RunWafRealisticBenchmarkWithAttack net472 309μs 20.1ns 77.7ns 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
#7723 SendRequest net6.0 61.4μs 58.5ns 227ns 0 0 0 14.52 KB
#7723 SendRequest netcoreapp3.1 71.2μs 102ns 368ns 0 0 0 17.42 KB
#7723 SendRequest net472 0.00637ns 0.00272ns 0.0105ns 0 0 0 0 b
Benchmarks.Trace.CharSliceBenchmark - Same speed ✔️ More allocations ⚠️

More allocations ⚠️ in #7723

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑netcoreapp3.1 0 b 1 B 1 B

Fewer allocations 🎉 in #7723

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net472 51 B 47 B -4 B -7.84%

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
#7723 OriginalCharSlice net6.0 1.94ms 2.77μs 10.4μs 0 0 0 640 KB
#7723 OriginalCharSlice netcoreapp3.1 2.19ms 6.7μs 25.9μs 0 0 0 640 KB
#7723 OriginalCharSlice net472 2.68ms 79.8ns 299ns 100 0 0 641.95 KB
#7723 OptimizedCharSlice net6.0 1.45ms 165ns 639ns 0 0 0 4 B
#7723 OptimizedCharSlice netcoreapp3.1 1.85ms 514ns 1.99μs 0 0 0 1 B
#7723 OptimizedCharSlice net472 1.92ms 324ns 1.25μs 0 0 0 73 B
#7723 OptimizedCharSliceWithPool net6.0 836μs 54.8ns 212ns 0 0 0 5 B
#7723 OptimizedCharSliceWithPool netcoreapp3.1 857μs 688ns 2.66μs 0 0 0 1 B
#7723 OptimizedCharSliceWithPool net472 1.15ms 123ns 474ns 0 0 0 47 B
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed ✔️ More allocations ⚠️

More allocations ⚠️ in #7723

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net472 56.12 KB 56.83 KB 712 B 1.27%
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑netcoreapp3.1 41.77 KB 42.15 KB 388 B 0.93%

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
#7723 WriteAndFlushEnrichedTraces net6.0 635μs 753ns 2.92μs 0 0 0 41.72 KB
#7723 WriteAndFlushEnrichedTraces netcoreapp3.1 748μs 4.37μs 38.8μs 0 0 0 42.15 KB
#7723 WriteAndFlushEnrichedTraces net472 981μs 3.63μs 14.1μs 8.33 0 0 56.83 KB
Benchmarks.Trace.DbCommandBenchmark - Faster 🎉 Same allocations ✔️

Faster 🎉 in #7723

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.DbCommandBenchmark.ExecuteNonQuery‑netcoreapp3.1 1.120 2,942.54 2,626.72

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
#7723 ExecuteNonQuery net6.0 1.83μs 9.21ns 41.2ns 0 0 0 1.02 KB
#7723 ExecuteNonQuery netcoreapp3.1 2.62μs 6.63ns 25.7ns 0 0 0 1.02 KB
#7723 ExecuteNonQuery net472 2.74μs 3.62ns 14ns 0.148 0.0134 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
#7723 CallElasticsearch net6.0 1.73μs 8.58ns 38.4ns 0 0 0 1.03 KB
#7723 CallElasticsearch netcoreapp3.1 2.3μs 10.7ns 41.6ns 0 0 0 1.03 KB
#7723 CallElasticsearch net472 3.76μs 3.25ns 12.6ns 0.151 0 0 1.04 KB
#7723 CallElasticsearchAsync net6.0 1.85μs 7.42ns 28.8ns 0 0 0 1.01 KB
#7723 CallElasticsearchAsync netcoreapp3.1 2.31μs 11.6ns 52ns 0 0 0 1.08 KB
#7723 CallElasticsearchAsync net472 3.88μs 2.15ns 8.34ns 0.155 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
#7723 ExecuteAsync net6.0 1.92μs 2.74ns 10.6ns 0 0 0 952 B
#7723 ExecuteAsync netcoreapp3.1 2.42μs 10.1ns 39.2ns 0 0 0 952 B
#7723 ExecuteAsync net472 2.54μs 2.59ns 9.69ns 0.141 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
#7723 SendAsync net6.0 6.89μs 4.09ns 14.2ns 0 0 0 2.36 KB
#7723 SendAsync netcoreapp3.1 8.88μs 15.8ns 61.1ns 0 0 0 2.9 KB
#7723 SendAsync net472 12.1μs 9.58ns 37.1ns 0.484 0 0 3.18 KB
Benchmarks.Trace.Iast.StringAspectsBenchmark - Slower ⚠️ More allocations ⚠️

Slower ⚠️ in #7723

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net6.0 1.204 40,750.00 49,050.00

More allocations ⚠️ in #7723

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑netcoreapp3.1 42.83 KB 45.5 KB 2.67 KB 6.24%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net6.0 43.62 KB 44.1 KB 480 B 1.10%

Fewer allocations 🎉 in #7723

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1 275.52 KB 273.64 KB -1.88 KB -0.68%

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
#7723 StringConcatBenchmark net6.0 49.6μs 289ns 2.39μs 0 0 0 44.1 KB
#7723 StringConcatBenchmark netcoreapp3.1 55.9μs 775ns 7.75μs 0 0 0 45.5 KB
#7723 StringConcatBenchmark net472 58.2μs 177ns 662ns 0 0 0 57.34 KB
#7723 StringConcatAspectBenchmark net6.0 493μs 2.31μs 8.64μs 0 0 0 276.66 KB
#7723 StringConcatAspectBenchmark netcoreapp3.1 543μs 2.58μs 9.99μs 0 0 0 273.64 KB
#7723 StringConcatAspectBenchmark net472 409μs 2.09μs 10μ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
#7723 EnrichedLog net6.0 2.67μs 11.7ns 45.2ns 0 0 0 1.7 KB
#7723 EnrichedLog netcoreapp3.1 3.67μs 12.8ns 49.4ns 0 0 0 1.7 KB
#7723 EnrichedLog net472 3.93μs 4.45ns 16.7ns 0.255 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
#7723 EnrichedLog net6.0 122μs 43.9ns 158ns 0 0 0 4.31 KB
#7723 EnrichedLog netcoreapp3.1 126μs 234ns 876ns 0 0 0 4.31 KB
#7723 EnrichedLog net472 167μs 50.2ns 195ns 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.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
#7723 EnrichedLog net6.0 4.94μs 7.32ns 28.4ns 0 0 0 2.26 KB
#7723 EnrichedLog netcoreapp3.1 6.83μs 21.4ns 82.8ns 0 0 0 2.26 KB
#7723 EnrichedLog net472 7.65μs 12.8ns 49.7ns 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
#7723 SendReceive net6.0 1.97μs 9.51ns 36.8ns 0 0 0 1.2 KB
#7723 SendReceive netcoreapp3.1 2.59μs 12.6ns 54.8ns 0 0 0 1.2 KB
#7723 SendReceive net472 3.08μs 8.34ns 32.3ns 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.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
#7723 EnrichedLog net6.0 4.17μs 14.7ns 52.9ns 0 0 0 1.58 KB
#7723 EnrichedLog netcoreapp3.1 5.64μs 4.79ns 17.9ns 0 0 0 1.63 KB
#7723 EnrichedLog net472 7μs 5.19ns 20.1ns 0.314 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
#7723 StartFinishSpan net6.0 769ns 0.153ns 0.571ns 0 0 0 576 B
#7723 StartFinishSpan netcoreapp3.1 970ns 4.51ns 18ns 0 0 0 576 B
#7723 StartFinishSpan net472 948ns 0.144ns 0.541ns 0.09 0 0 578 B
#7723 StartFinishScope net6.0 914ns 4.28ns 16.6ns 0 0 0 696 B
#7723 StartFinishScope netcoreapp3.1 1.23μs 6.54ns 35.2ns 0 0 0 696 B
#7723 StartFinishScope net472 1.11μs 0.283ns 1.02ns 0.1 0 0 658 B
Benchmarks.Trace.TraceAnnotationsBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master RunOnMethodBegin net6.0 1.06μs 5.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
#7723 RunOnMethodBegin net6.0 1.05μs 5.35ns 25.1ns 0 0 0 696 B
#7723 RunOnMethodBegin netcoreapp3.1 1.42μs 4.91ns 18.4ns 0 0 0 696 B
#7723 RunOnMethodBegin net472 1.45μs 0.437ns 1.64ns 0.102 0 0 658 B

@andrewlock andrewlock force-pushed the andrew/settings/5-move-mutable-settings-off-tracer-settings branch from 8c472a5 to 8e19e3a Compare October 28, 2025 15:20
@andrewlock andrewlock force-pushed the andrew/settings/4-mutable-settings-service branch from 60c7874 to c691a0e Compare October 28, 2025 15:20
…"mutable" version

This is a stop gap primarily to highlight everywhere that is _currently_ relying on these types, which will need to subscribe to updates
@andrewlock andrewlock force-pushed the andrew/settings/5-move-mutable-settings-off-tracer-settings branch from 8e19e3a to 7940c31 Compare October 28, 2025 18:13
@andrewlock andrewlock requested review from a team as code owners October 28, 2025 18:13
@andrewlock andrewlock requested review from zacharycmontoya and removed request for a team October 28, 2025 18:13
@andrewlock andrewlock force-pushed the andrew/settings/4-mutable-settings-service branch from c691a0e to a52caed Compare October 28, 2025 18:13
@datadog-datadog-prod-us1
Copy link

datadog-datadog-prod-us1 bot commented Oct 28, 2025

⚠️ Tests

⚠️ Warnings

❄️ 1 New flaky test detected

TestEventHubsEnumerableIntegrationWithoutBatchLinks from Datadog.Trace.ClrProfiler.IntegrationTests.Azure.AzureEventHubsTests (Datadog)
Expected receiveSpans to contain 1 item(s) because Expected 1 receive span, but found 2: {{TraceId: 11303586752564342707, SpanId: 13947252619720686406, Name: azure_eventhubs.receive, Resource: samples-eventhubs-hub, Service: Samples.AzureEventHubs-azureeventhubs}, {TraceId: 3503510408275674230, SpanId: 9711277569498918509, Name: azure_eventhubs.receive, Resource: samples-eventhubs-hub, Service: Samples.AzureEventHubs-azureeventhubs}}.

ℹ️ Info

🧪 All tests passed

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 7940c31 | Docs | Datadog PR Page | Was this helpful? Give us feedback!

Copy link
Member Author

@andrewlock andrewlock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated code review by Claude Code

This PR successfully refactors TracerSettings to remove mutable properties and require explicit access through MutableSettings. The changes are generally consistent and well-executed. I've identified a few specific issues below for consideration.

Copy link
Member Author

@andrewlock andrewlock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated code review by Claude Code

This PR successfully refactors TracerSettings to remove mutable properties and require explicit access through MutableSettings. The changes are generally consistent and well-executed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:tracer The core tracer library (Datadog.Trace, does not include OpenTracing, native code, or integrations) type:refactor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants