Skip to content

Fix invalid telemetry when using manual config in code with dictionaries#8022

Merged
andrewlock merged 5 commits intomasterfrom
andrew/config_telemetry_fix
Jan 9, 2026
Merged

Fix invalid telemetry when using manual config in code with dictionaries#8022
andrewlock merged 5 commits intomasterfrom
andrew/config_telemetry_fix

Conversation

@andrewlock
Copy link
Member

@andrewlock andrewlock commented Dec 30, 2025

Summary of changes

Fixes a bug in telemetry that was recording invalid values for dictionary values coming from config-in-code

Reason for change

When looking through some memory dumps, noticed a bunch of strings that looked like "DD_TAGS:System.Collections.Generic.Dictionary``2[System.String,System.String]" and tracked them down to the manual config, and ultimately to a bug in the DictionaryObjectConfigurationSource.AsDictionary() methods.

Implementation details

  • Write some unit tests to track down the problem. Show them failing with above string.
  • Minor refactor of CompositeConfigurationSource.AsDictionary() to reduce duplication
  • Fix bug in DictionaryObjectConfigurationSource
  • Simplify (unused except in error) fallback path in CompositeConfigurationSource.AsDictionary()

Test coverage

Added unit tests to demonstrate bug

@andrewlock andrewlock requested a review from a team as a code owner December 30, 2025 15:19
@andrewlock andrewlock added type:bug area:tracer The core tracer library (Datadog.Trace, does not include OpenTracing, native code, or integrations) area:configuration labels Dec 30, 2025
@@ -189,38 +189,17 @@ public ConfigurationResult<bool> GetBool(string key, IConfigurationTelemetry tel

/// <inheritdoc />
public ConfigurationResult<IDictionary<string, string>> GetDictionary(string key, IConfigurationTelemetry telemetry, Func<IDictionary<string, string>, bool>? validator)
Copy link
Member Author

Choose a reason for hiding this comment

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

These methods were essentially identical except for the GetDictionary() call (which all called different overloads)

{
telemetry.Record(key, result.TelemetryOverride ?? result.Result?.ToString(), recordValue: true, origin);
// there should always be a telemetry override by convention, so just record a sentinel for now if there's not for some reason
telemetry.Record(key, result.TelemetryOverride ?? "<MISSING>", recordValue: true, origin);
Copy link
Member Author

Choose a reason for hiding this comment

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

We should never hit this path, but if we do, calling ToString() on a dictionary is pointless. We could serialize it properly, but seeing as this shouldn't ever be hit (we should always have a fallback), it doesn't seem worth duplicating here to me

@dd-trace-dotnet-ci-bot
Copy link

Execution-Time Benchmarks Report ⏱️

Execution-time results for samples comparing This PR (8022) and master.

✅ No regressions detected - check the details below

Full Metrics Comparison

FakeDbCommand

Metric Master (Mean ± 95% CI) Current (Mean ± 95% CI) Change Status
.NET Framework 4.8 - Baseline
duration68.16 ± (68.18 - 68.39) ms68.44 ± (68.44 - 68.66) ms+0.4%✅⬆️
.NET Framework 4.8 - Bailout
duration72.18 ± (72.02 - 72.30) ms72.15 ± (72.06 - 72.28) ms-0.0%
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1004.61 ± (1008.90 - 1017.71) ms1006.16 ± (1005.57 - 1010.75) ms+0.2%✅⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms21.97 ± (21.93 - 22.01) ms21.97 ± (21.94 - 22.01) ms+0.0%✅⬆️
process.time_to_main_ms78.42 ± (78.26 - 78.57) ms79.10 ± (78.94 - 79.27) ms+0.9%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.90 ± (10.90 - 10.91) MB10.92 ± (10.91 - 10.92) MB+0.1%✅⬆️
runtime.dotnet.threads.count12 ± (12 - 12)12 ± (12 - 12)+0.0%
.NET Core 3.1 - Bailout
process.internal_duration_ms21.92 ± (21.90 - 21.94) ms21.87 ± (21.84 - 21.90) ms-0.2%
process.time_to_main_ms79.74 ± (79.65 - 79.84) ms79.93 ± (79.84 - 80.01) ms+0.2%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.95 ± (10.94 - 10.95) MB10.95 ± (10.95 - 10.96) MB+0.1%✅⬆️
runtime.dotnet.threads.count13 ± (13 - 13)13 ± (13 - 13)+0.0%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms241.58 ± (237.45 - 245.71) ms247.91 ± (243.94 - 251.88) ms+2.6%✅⬆️
process.time_to_main_ms469.82 ± (469.43 - 470.20) ms471.88 ± (471.37 - 472.39) ms+0.4%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed48.14 ± (48.12 - 48.16) MB48.22 ± (48.20 - 48.24) MB+0.2%✅⬆️
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)+0.3%✅⬆️
.NET 6 - Baseline
process.internal_duration_ms20.61 ± (20.58 - 20.64) ms20.64 ± (20.61 - 20.68) ms+0.2%✅⬆️
process.time_to_main_ms67.90 ± (67.78 - 68.02) ms68.13 ± (68.03 - 68.24) ms+0.3%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.61 ± (10.61 - 10.61) MB10.64 ± (10.64 - 10.65) MB+0.3%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 6 - Bailout
process.internal_duration_ms20.52 ± (20.48 - 20.55) ms20.58 ± (20.56 - 20.60) ms+0.3%✅⬆️
process.time_to_main_ms68.72 ± (68.66 - 68.78) ms69.26 ± (69.20 - 69.33) ms+0.8%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.66 ± (10.66 - 10.67) MB10.74 ± (10.74 - 10.74) MB+0.7%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms243.74 ± (241.62 - 245.86) ms242.68 ± (239.95 - 245.41) ms-0.4%
process.time_to_main_ms439.37 ± (438.95 - 439.79) ms441.41 ± (440.91 - 441.90) ms+0.5%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed48.69 ± (48.66 - 48.72) MB48.65 ± (48.62 - 48.68) MB-0.1%
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)+0.0%✅⬆️
.NET 8 - Baseline
process.internal_duration_ms18.86 ± (18.83 - 18.89) ms18.84 ± (18.81 - 18.87) ms-0.1%
process.time_to_main_ms66.96 ± (66.86 - 67.07) ms67.23 ± (67.13 - 67.33) ms+0.4%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.67 ± (7.66 - 7.68) MB7.67 ± (7.67 - 7.68) MB+0.0%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 8 - Bailout
process.internal_duration_ms18.87 ± (18.84 - 18.89) ms18.90 ± (18.88 - 18.92) ms+0.2%✅⬆️
process.time_to_main_ms68.14 ± (68.09 - 68.20) ms68.40 ± (68.34 - 68.46) ms+0.4%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.73 ± (7.72 - 7.74) MB7.74 ± (7.73 - 7.74) MB+0.1%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms179.43 ± (178.40 - 180.47) ms180.63 ± (179.67 - 181.59) ms+0.7%✅⬆️
process.time_to_main_ms426.67 ± (426.07 - 427.28) ms426.01 ± (425.46 - 426.57) ms-0.2%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed36.33 ± (36.30 - 36.36) MB36.34 ± (36.32 - 36.37) MB+0.0%✅⬆️
runtime.dotnet.threads.count27 ± (27 - 27)27 ± (27 - 27)+0.2%✅⬆️

HttpMessageHandler

Metric Master (Mean ± 95% CI) Current (Mean ± 95% CI) Change Status
.NET Framework 4.8 - Baseline
duration193.33 ± (193.49 - 194.38) ms194.73 ± (194.53 - 195.37) ms+0.7%✅⬆️
.NET Framework 4.8 - Bailout
duration196.51 ± (196.65 - 197.38) ms197.97 ± (197.77 - 198.55) ms+0.7%✅⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1105.95 ± (1108.43 - 1116.17) ms1106.82 ± (1107.06 - 1113.62) ms+0.1%✅⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms187.65 ± (187.23 - 188.07) ms189.04 ± (188.60 - 189.48) ms+0.7%✅⬆️
process.time_to_main_ms80.43 ± (80.23 - 80.62) ms81.19 ± (80.97 - 81.40) ms+0.9%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.07 ± (16.04 - 16.10) MB16.10 ± (16.08 - 16.13) MB+0.2%✅⬆️
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (20 - 20)+0.3%✅⬆️
.NET Core 3.1 - Bailout
process.internal_duration_ms187.09 ± (186.83 - 187.35) ms188.22 ± (187.90 - 188.53) ms+0.6%✅⬆️
process.time_to_main_ms81.80 ± (81.68 - 81.93) ms82.49 ± (82.30 - 82.69) ms+0.8%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.17 ± (16.14 - 16.19) MB16.20 ± (16.16 - 16.24) MB+0.2%✅⬆️
runtime.dotnet.threads.count21 ± (21 - 21)20 ± (20 - 21)-0.9%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms423.39 ± (420.21 - 426.57) ms417.91 ± (414.56 - 421.26) ms-1.3%
process.time_to_main_ms472.31 ± (471.64 - 472.97) ms473.53 ± (472.95 - 474.12) ms+0.3%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed58.81 ± (58.70 - 58.92) MB58.72 ± (58.60 - 58.84) MB-0.1%
runtime.dotnet.threads.count29 ± (29 - 30)29 ± (29 - 30)+0.0%✅⬆️
.NET 6 - Baseline
process.internal_duration_ms191.89 ± (191.51 - 192.28) ms192.91 ± (192.51 - 193.30) ms+0.5%✅⬆️
process.time_to_main_ms69.81 ± (69.67 - 69.95) ms70.30 ± (70.11 - 70.49) ms+0.7%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.28 ± (16.18 - 16.37) MB16.26 ± (16.15 - 16.36) MB-0.1%
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)+0.2%✅⬆️
.NET 6 - Bailout
process.internal_duration_ms191.02 ± (190.79 - 191.25) ms191.67 ± (191.34 - 191.99) ms+0.3%✅⬆️
process.time_to_main_ms70.83 ± (70.72 - 70.93) ms71.05 ± (70.94 - 71.16) ms+0.3%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.22 ± (16.08 - 16.35) MB16.09 ± (15.94 - 16.24) MB-0.8%
runtime.dotnet.threads.count19 ± (19 - 19)20 ± (20 - 20)+2.7%✅⬆️
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms455.89 ± (454.05 - 457.74) ms456.94 ± (455.03 - 458.86) ms+0.2%✅⬆️
process.time_to_main_ms444.94 ± (444.42 - 445.46) ms447.02 ± (446.47 - 447.57) ms+0.5%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed58.42 ± (58.30 - 58.54) MB58.27 ± (58.15 - 58.39) MB-0.3%
runtime.dotnet.threads.count29 ± (29 - 30)30 ± (30 - 30)+0.3%✅⬆️
.NET 8 - Baseline
process.internal_duration_ms190.41 ± (190.01 - 190.81) ms191.94 ± (191.49 - 192.39) ms+0.8%✅⬆️
process.time_to_main_ms69.42 ± (69.24 - 69.59) ms70.20 ± (69.97 - 70.43) ms+1.1%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.78 ± (11.75 - 11.81) MB11.74 ± (11.71 - 11.77) MB-0.3%
runtime.dotnet.threads.count18 ± (18 - 18)18 ± (18 - 18)-0.2%
.NET 8 - Bailout
process.internal_duration_ms189.67 ± (189.39 - 189.96) ms190.45 ± (190.14 - 190.76) ms+0.4%✅⬆️
process.time_to_main_ms70.53 ± (70.39 - 70.67) ms70.60 ± (70.50 - 70.71) ms+0.1%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.81 ± (11.78 - 11.84) MB11.77 ± (11.74 - 11.80) MB-0.3%
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)+0.0%✅⬆️
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms362.18 ± (360.73 - 363.63) ms367.71 ± (366.14 - 369.27) ms+1.5%✅⬆️
process.time_to_main_ms428.11 ± (427.57 - 428.66) ms430.73 ± (430.04 - 431.42) ms+0.6%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed47.95 ± (47.92 - 47.98) MB47.96 ± (47.92 - 48.00) MB+0.0%✅⬆️
runtime.dotnet.threads.count29 ± (29 - 29)29 ± (29 - 29)+0.4%✅⬆️
Comparison explanation

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 highlighted in **red**. The following thresholds were used for comparing the execution times:

  • Welch test with statistical test for significance of 5%
  • Only results indicating a difference greater than 5% and 5 ms are considered.

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 charts
FakeDbCommand (.NET Framework 4.8)
gantt
    title Execution time (ms) FakeDbCommand (.NET Framework 4.8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8022) - mean (69ms)  : 67, 70
    master - mean (68ms)  : 67, 70

    section Bailout
    This PR (8022) - mean (72ms)  : 71, 73
    master - mean (72ms)  : 71, 74

    section CallTarget+Inlining+NGEN
    This PR (8022) - mean (1,008ms)  : 971, 1045
    master - mean (1,013ms)  : 948, 1078

Loading
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 (8022) - mean (106ms)  : 104, 109
    master - mean (105ms)  : 103, 108

    section Bailout
    This PR (8022) - mean (107ms)  : 106, 108
    master - mean (107ms)  : 105, 108

    section CallTarget+Inlining+NGEN
    This PR (8022) - mean (744ms)  : 684, 805
    master - mean (735ms)  : 667, 804

Loading
FakeDbCommand (.NET 6)
gantt
    title Execution time (ms) FakeDbCommand (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8022) - mean (94ms)  : 91, 96
    master - mean (93ms)  : 91, 95

    section Bailout
    This PR (8022) - mean (95ms)  : 93, 96
    master - mean (94ms)  : 93, 95

    section CallTarget+Inlining+NGEN
    This PR (8022) - mean (710ms)  : 659, 762
    master - mean (708ms)  : 671, 745

Loading
FakeDbCommand (.NET 8)
gantt
    title Execution time (ms) FakeDbCommand (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8022) - mean (92ms)  : 90, 94
    master - mean (92ms)  : 90, 94

    section Bailout
    This PR (8022) - mean (93ms)  : 92, 95
    master - mean (93ms)  : 92, 94

    section CallTarget+Inlining+NGEN
    This PR (8022) - mean (637ms)  : 620, 654
    master - mean (634ms)  : 617, 650

Loading
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 (8022) - mean (195ms)  : 191, 199
    master - mean (194ms)  : 190, 198

    section Bailout
    This PR (8022) - mean (198ms)  : 194, 202
    master - mean (197ms)  : 193, 201

    section CallTarget+Inlining+NGEN
    This PR (8022) - mean (1,110ms)  : 1063, 1158
    master - mean (1,112ms)  : 1054, 1170

Loading
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 (8022) - mean (279ms)  : 271, 288
    master - mean (276ms)  : 272, 281

    section Bailout
    This PR (8022) - mean (279ms)  : 274, 285
    master - mean (277ms)  : 274, 280

    section CallTarget+Inlining+NGEN
    This PR (8022) - mean (924ms)  : 871, 976
    master - mean (925ms)  : 883, 967

Loading
HttpMessageHandler (.NET 6)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8022) - mean (271ms)  : 265, 278
    master - mean (270ms)  : 266, 274

    section Bailout
    This PR (8022) - mean (271ms)  : 267, 276
    master - mean (270ms)  : 267, 273

    section CallTarget+Inlining+NGEN
    This PR (8022) - mean (932ms)  : 901, 963
    master - mean (931ms)  : 898, 964

Loading
HttpMessageHandler (.NET 8)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8022) - mean (272ms)  : 266, 278
    master - mean (269ms)  : 264, 275

    section Bailout
    This PR (8022) - mean (270ms)  : 266, 274
    master - mean (270ms)  : 266, 274

    section CallTarget+Inlining+NGEN
    This PR (8022) - mean (829ms)  : 807, 851
    master - mean (822ms)  : 807, 837

Loading

@andrewlock andrewlock force-pushed the andrew/config_telemetry_fix branch from d2648ba to b15e9e9 Compare January 9, 2026 12:00
@pr-commenter
Copy link

pr-commenter bot commented Jan 9, 2026

Benchmarks

Benchmark execution time: 2026-01-09 12:41:12

Comparing candidate commit b15e9e9 in PR branch andrew/config_telemetry_fix with baseline commit 72be34c in branch master.

Found 4 performance improvements and 11 performance regressions! Performance is the same for 158 metrics, 13 unstable metrics.

scenario:Benchmarks.Trace.ActivityBenchmark.StartStopWithChild netcoreapp3.1

  • 🟥 execution_time [+13.855ms; +17.581ms] or [+7.230%; +9.174%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorMoreComplexBody netcoreapp3.1

  • 🟩 execution_time [-83.672ms; -79.657ms] or [-41.778%; -39.774%]
  • 🟩 throughput [+6087.111op/s; +9307.919op/s] or [+5.018%; +7.673%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorSimpleBody netcoreapp3.1

  • 🟥 execution_time [+14.695ms; +20.568ms] or [+7.549%; +10.567%]

scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeLegacyArgs netcoreapp3.1

  • 🟥 execution_time [+19.525ms; +20.921ms] or [+10.716%; +11.482%]

scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark netcoreapp3.1

  • 🟥 throughput [-648.501op/s; -441.006op/s] or [-30.123%; -20.485%]

scenario:Benchmarks.Trace.AspNetCoreBenchmark.SendRequest net6.0

  • 🟥 execution_time [+101.283ms; +101.946ms] or [+106.661%; +107.359%]

scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces netcoreapp3.1

  • 🟥 execution_time [+52.696ms; +58.353ms] or [+30.819%; +34.126%]
  • 🟥 throughput [-155.656op/s; -113.850op/s] or [-11.066%; -8.094%]

scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice net6.0

  • 🟥 execution_time [+88.242µs; +93.745µs] or [+6.442%; +6.844%]
  • 🟥 throughput [-46.815op/s; -44.135op/s] or [-6.412%; -6.045%]

scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool netcoreapp3.1

  • 🟥 execution_time [+106.025µs; +119.535µs] or [+5.678%; +6.401%]
  • 🟥 throughput [-32.255op/s; -28.720op/s] or [-6.023%; -5.363%]

scenario:Benchmarks.Trace.SerilogBenchmark.EnrichedLog netcoreapp3.1

  • 🟩 throughput [+12582.261op/s; +15562.966op/s] or [+7.726%; +9.556%]

scenario:Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin net6.0

  • 🟩 execution_time [-15.817ms; -11.951ms] or [-7.422%; -5.608%]

@andrewlock andrewlock enabled auto-merge (squash) January 9, 2026 12:55
@andrewlock andrewlock merged commit 4ba41c0 into master Jan 9, 2026
137 of 149 checks passed
@andrewlock andrewlock deleted the andrew/config_telemetry_fix branch January 9, 2026 14:00
@github-actions github-actions bot added this to the vNext-v3 milestone Jan 9, 2026
pablomartinezbernardo pushed a commit that referenced this pull request Jan 10, 2026
…ies (#8022)

## Summary of changes

Fixes a bug in telemetry that was recording invalid values for
dictionary values coming from config-in-code

## Reason for change

When looking through some memory dumps, noticed a bunch of strings that
looked like
`"DD_TAGS:System.Collections.Generic.Dictionary``2[System.String,System.String]"`
and tracked them down to the manual config, and ultimately to a bug in
the `DictionaryObjectConfigurationSource.AsDictionary()` methods.

## Implementation details

- Write some unit tests to track down the problem. Show them failing
with above string.
- Minor refactor of `CompositeConfigurationSource.AsDictionary()` to
reduce duplication
- Fix bug in `DictionaryObjectConfigurationSource`
- Simplify (unused except in error) fallback path in
`CompositeConfigurationSource.AsDictionary()`

## Test coverage

Added unit tests to demonstrate bug
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants