Skip to content

[Debugger] Redact dictionary values by sensitive keys#8768

Merged
dudikeleti merged 3 commits into
masterfrom
codex/fix-redaction-bypass-in-debugger-serialization
Jun 9, 2026
Merged

[Debugger] Redact dictionary values by sensitive keys#8768
dudikeleti merged 3 commits into
masterfrom
codex/fix-redaction-bypass-in-debugger-serialization

Conversation

@dudikeleti

@dudikeleti dudikeleti commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Motivation

  • A change started serializing runtime scalar values for object-typed dictionary entries without supplying the dictionary key as the variable name, which allowed sensitive entries (e.g., "password") to bypass redaction and leak secrets in debugger snapshots.

Description

  • Add a shared helper WriteRedactedValue to emit the redacted JSON shape and use it from SerializeInternal when Redaction.Instance.ShouldRedact(...) returns true for variables.
  • During dictionary entry serialization, check string dictionary keys with Redaction.Instance.IsRedactedKeyword(...) and use WriteRedactedValue for redacted values instead of serializing the runtime value.
  • This change applies to supported dictionary serialization when the runtime key is a string redacted identifier. Standalone KeyValuePair objects and non-string dictionary keys remain out of scope.
  • Add a unit test ObjectStructure_DictionaryEntryValue_WithRedactedKey_IsRedacted covering Dictionary<string, object>, Dictionary<object, object>, and Hashtable to ensure entries under a sensitive key are emitted with notCapturedReason and the secret value is not included.

Testing

  • Ran the focused unit tests with dotnet test tracer/test/Datadog.Trace.Tests/Datadog.Trace.Tests.csproj -f net8.0 --filter "FullyQualifiedName~DebuggerSnapshotCreatorTests.ObjectStructure_DictionaryEntryValue_WithRedactedKey_IsRedacted|FullyQualifiedName~DebuggerSnapshotCreatorTests.ObjectStructure_ObjectTypedDictionaryEntries_UseRuntimeTypeAndNullFallback" -v minimal and both tests passed.
  • Verified there are no git diff --check issues and added tests exercise the fixed behavior (redaction of dictionary values by key).

Codex Task

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the debugger snapshot serializer to ensure dictionary values are redacted when their corresponding dictionary keys match sensitive identifiers (e.g., "password"), preventing secret leakage in snapshots.

Changes:

  • Introduces a shared WriteRedactedValue helper to emit the standard redacted JSON shape.
  • Applies redaction during dictionary entry serialization by checking the dictionary key (string) and emitting a redacted value instead of serializing the runtime value.
  • Adds a unit test to validate redaction for both Dictionary<string, object> and Dictionary<object, object> when the key is sensitive.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
tracer/src/Datadog.Trace/Debugger/Snapshots/DebuggerSnapshotSerializer.cs Adds WriteRedactedValue helper and redacts dictionary entry values based on sensitive string keys.
tracer/test/Datadog.Trace.Tests/Debugger/DebuggerSnapshotCreatorTests.cs Adds a regression test asserting dictionary values are redacted when the key is sensitive.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tracer/src/Datadog.Trace/Debugger/Snapshots/DebuggerSnapshotSerializer.cs Outdated
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
Signed-off-by: dudik <[email protected]>
@dudikeleti
dudikeleti marked this pull request as ready for review June 9, 2026 10:21
@dudikeleti
dudikeleti requested a review from a team as a code owner June 9, 2026 10:22
@dudikeleti
dudikeleti requested review from P403n1x87 and jpbempel June 9, 2026 10:22
@dudikeleti
dudikeleti removed the request for review from jpbempel June 9, 2026 10:26
@dudikeleti
dudikeleti enabled auto-merge (squash) June 9, 2026 10:26
@dudikeleti
dudikeleti requested a review from Copilot June 9, 2026 10:26

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

@datadog-prod-us1-6

This comment has been minimized.

@dd-trace-dotnet-ci-bot

dd-trace-dotnet-ci-bot Bot commented Jun 9, 2026

Copy link
Copy Markdown

Execution-Time Benchmarks Report ⏱️

Execution-time results for samples comparing This PR (8768) 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
duration74.32 ± (74.39 - 74.86) ms73.87 ± (73.88 - 74.43) ms-0.6%
.NET Framework 4.8 - Bailout
duration77.52 ± (77.30 - 77.70) ms80.03 ± (79.90 - 80.37) ms+3.2%✅⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1097.79 ± (1099.44 - 1107.34) ms1109.51 ± (1107.84 - 1114.53) ms+1.1%✅⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms22.51 ± (22.46 - 22.57) ms22.37 ± (22.33 - 22.41) ms-0.6%
process.time_to_main_ms85.30 ± (85.06 - 85.53) ms83.36 ± (83.16 - 83.55) ms-2.3%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.92 ± (10.92 - 10.92) MB10.92 ± (10.92 - 10.92) MB-0.0%
runtime.dotnet.threads.count12 ± (12 - 12)12 ± (12 - 12)+0.0%
.NET Core 3.1 - Bailout
process.internal_duration_ms22.31 ± (22.26 - 22.35) ms22.42 ± (22.36 - 22.47) ms+0.5%✅⬆️
process.time_to_main_ms85.39 ± (85.18 - 85.60) ms86.43 ± (86.04 - 86.82) ms+1.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.95) MB+0.0%✅⬆️
runtime.dotnet.threads.count13 ± (13 - 13)13 ± (13 - 13)+0.0%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms216.44 ± (215.52 - 217.36) ms214.51 ± (213.64 - 215.37) ms-0.9%
process.time_to_main_ms544.63 ± (543.27 - 546.00) ms542.91 ± (541.66 - 544.16) ms-0.3%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed48.29 ± (48.26 - 48.32) MB48.33 ± (48.30 - 48.36) MB+0.1%✅⬆️
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)+0.2%✅⬆️
.NET 6 - Baseline
process.internal_duration_ms21.49 ± (21.43 - 21.55) ms21.29 ± (21.25 - 21.32) ms-0.9%
process.time_to_main_ms75.27 ± (75.00 - 75.55) ms74.47 ± (74.30 - 74.63) ms-1.1%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.62 ± (10.62 - 10.62) MB10.63 ± (10.63 - 10.63) MB+0.1%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 6 - Bailout
process.internal_duration_ms21.10 ± (21.07 - 21.14) ms21.12 ± (21.06 - 21.18) ms+0.1%✅⬆️
process.time_to_main_ms74.76 ± (74.60 - 74.93) ms75.08 ± (74.91 - 75.25) ms+0.4%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.74 ± (10.73 - 10.74) MB10.75 ± (10.75 - 10.76) MB+0.2%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms369.46 ± (367.20 - 371.73) ms371.51 ± (368.66 - 374.36) ms+0.6%✅⬆️
process.time_to_main_ms550.78 ± (549.47 - 552.08) ms550.59 ± (549.00 - 552.18) ms-0.0%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed49.78 ± (49.76 - 49.80) MB49.76 ± (49.73 - 49.78) MB-0.1%
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)+0.1%✅⬆️
.NET 8 - Baseline
process.internal_duration_ms19.56 ± (19.51 - 19.60) ms19.57 ± (19.52 - 19.61) ms+0.1%✅⬆️
process.time_to_main_ms73.79 ± (73.56 - 74.02) ms74.17 ± (73.93 - 74.41) ms+0.5%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.68 ± (7.68 - 7.69) MB7.68 ± (7.68 - 7.69) MB+0.0%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 8 - Bailout
process.internal_duration_ms19.51 ± (19.46 - 19.55) ms19.36 ± (19.31 - 19.40) ms-0.8%
process.time_to_main_ms74.15 ± (73.95 - 74.35) ms73.68 ± (73.53 - 73.84) ms-0.6%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.74 ± (7.73 - 7.74) MB7.74 ± (7.73 - 7.75) MB+0.0%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms299.94 ± (297.76 - 302.12) ms297.44 ± (295.05 - 299.83) ms-0.8%
process.time_to_main_ms495.50 ± (494.44 - 496.56) ms501.01 ± (499.98 - 502.05) ms+1.1%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed36.80 ± (36.77 - 36.83) MB36.89 ± (36.86 - 36.92) MB+0.3%✅⬆️
runtime.dotnet.threads.count27 ± (27 - 27)27 ± (27 - 27)+0.0%

HttpMessageHandler

Metric Master (Mean ± 95% CI) Current (Mean ± 95% CI) Change Status
.NET Framework 4.8 - Baseline
duration198.55 ± (198.40 - 199.20) ms197.98 ± (197.40 - 198.29) ms-0.3%
.NET Framework 4.8 - Bailout
duration202.23 ± (201.77 - 202.60) ms201.33 ± (201.04 - 201.86) ms-0.4%
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1188.80 ± (1186.05 - 1191.63) ms1187.42 ± (1186.60 - 1192.53) ms-0.1%
.NET Core 3.1 - Baseline
process.internal_duration_ms193.20 ± (192.81 - 193.60) ms193.05 ± (192.73 - 193.36) ms-0.1%
process.time_to_main_ms83.76 ± (83.44 - 84.07) ms83.78 ± (83.49 - 84.06) ms+0.0%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.04 ± (16.01 - 16.07) MB16.12 ± (16.10 - 16.14) MB+0.5%✅⬆️
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (20 - 20)+0.2%✅⬆️
.NET Core 3.1 - Bailout
process.internal_duration_ms192.76 ± (192.28 - 193.24) ms192.03 ± (191.75 - 192.31) ms-0.4%
process.time_to_main_ms85.45 ± (85.16 - 85.74) ms85.07 ± (84.84 - 85.29) ms-0.4%
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.14 ± (16.11 - 16.16) MB16.19 ± (16.17 - 16.22) MB+0.4%✅⬆️
runtime.dotnet.threads.count21 ± (21 - 21)21 ± (21 - 21)-1.3%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms387.29 ± (385.90 - 388.68) ms386.26 ± (385.01 - 387.50) ms-0.3%
process.time_to_main_ms529.95 ± (528.93 - 530.96) ms533.62 ± (532.53 - 534.72) ms+0.7%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed57.57 ± (57.38 - 57.76) MB57.42 ± (57.24 - 57.60) MB-0.3%
runtime.dotnet.threads.count30 ± (30 - 30)30 ± (30 - 30)+0.2%✅⬆️
.NET 6 - Baseline
process.internal_duration_ms194.93 ± (194.51 - 195.35) ms197.77 ± (197.26 - 198.28) ms+1.5%✅⬆️
process.time_to_main_ms71.62 ± (71.40 - 71.84) ms72.67 ± (72.36 - 72.97) ms+1.5%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.38 ± (16.36 - 16.41) MB16.40 ± (16.37 - 16.43) MB+0.1%✅⬆️
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)+0.8%✅⬆️
.NET 6 - Bailout
process.internal_duration_ms195.29 ± (194.88 - 195.71) ms195.19 ± (194.72 - 195.65) ms-0.1%
process.time_to_main_ms72.51 ± (72.29 - 72.73) ms72.91 ± (72.70 - 73.12) ms+0.5%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.46 ± (16.43 - 16.50) MB16.32 ± (16.23 - 16.42) MB-0.9%
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (20 - 20)-1.6%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms585.19 ± (582.55 - 587.83) ms585.56 ± (582.68 - 588.44) ms+0.1%✅⬆️
process.time_to_main_ms539.75 ± (538.81 - 540.68) ms540.32 ± (539.22 - 541.41) ms+0.1%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed61.10 ± (61.01 - 61.18) MB61.16 ± (61.06 - 61.27) MB+0.1%✅⬆️
runtime.dotnet.threads.count31 ± (31 - 31)31 ± (31 - 31)-0.3%
.NET 8 - Baseline
process.internal_duration_ms193.29 ± (192.76 - 193.83) ms195.18 ± (194.72 - 195.64) ms+1.0%✅⬆️
process.time_to_main_ms70.74 ± (70.51 - 70.98) ms72.07 ± (71.82 - 72.32) ms+1.9%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.74 ± (11.72 - 11.76) MB11.74 ± (11.71 - 11.76) MB-0.0%
runtime.dotnet.threads.count18 ± (18 - 18)18 ± (18 - 18)-0.0%
.NET 8 - Bailout
process.internal_duration_ms193.13 ± (192.67 - 193.59) ms195.30 ± (194.87 - 195.72) ms+1.1%✅⬆️
process.time_to_main_ms71.93 ± (71.74 - 72.13) ms73.49 ± (73.25 - 73.74) ms+2.2%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.78 ± (11.76 - 11.81) MB11.75 ± (11.73 - 11.77) MB-0.3%
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)+0.4%✅⬆️
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms515.92 ± (513.32 - 518.52) ms513.29 ± (510.94 - 515.63) ms-0.5%
process.time_to_main_ms488.39 ± (487.52 - 489.25) ms493.08 ± (492.15 - 494.01) ms+1.0%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed50.60 ± (50.57 - 50.63) MB50.61 ± (50.57 - 50.65) MB+0.0%✅⬆️
runtime.dotnet.threads.count30 ± (29 - 30)29 ± (29 - 30)-0.1%
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 (8768) - mean (74ms)  : 70, 78
    master - mean (75ms)  : 71, 78

    section Bailout
    This PR (8768) - mean (80ms)  : 77, 84
    master - mean (78ms)  : 75, 80

    section CallTarget+Inlining+NGEN
    This PR (8768) - mean (1,111ms)  : 1066, 1157
    master - mean (1,103ms)  : 1046, 1161

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 (8768) - mean (113ms)  : 109, 116
    master - mean (115ms)  : 110, 119

    section Bailout
    This PR (8768) - mean (116ms)  : 110, 122
    master - mean (115ms)  : 111, 118

    section CallTarget+Inlining+NGEN
    This PR (8768) - mean (794ms)  : 768, 820
    master - mean (795ms)  : 769, 821

Loading
FakeDbCommand (.NET 6)
gantt
    title Execution time (ms) FakeDbCommand (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8768) - mean (102ms)  : 99, 105
    master - mean (103ms)  : 98, 109

    section Bailout
    This PR (8768) - mean (103ms)  : 100, 105
    master - mean (102ms)  : 100, 105

    section CallTarget+Inlining+NGEN
    This PR (8768) - mean (953ms)  : 905, 1000
    master - mean (952ms)  : 914, 990

Loading
FakeDbCommand (.NET 8)
gantt
    title Execution time (ms) FakeDbCommand (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8768) - mean (102ms)  : 97, 107
    master - mean (101ms)  : 97, 106

    section Bailout
    This PR (8768) - mean (101ms)  : 99, 103
    master - mean (102ms)  : 98, 105

    section CallTarget+Inlining+NGEN
    This PR (8768) - mean (827ms)  : 787, 867
    master - mean (825ms)  : 790, 860

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 (8768) - mean (198ms)  : 193, 203
    master - mean (199ms)  : 194, 203

    section Bailout
    This PR (8768) - mean (201ms)  : 197, 206
    master - mean (202ms)  : 198, 206

    section CallTarget+Inlining+NGEN
    This PR (8768) - mean (1,190ms)  : 1148, 1232
    master - mean (1,189ms)  : 1153, 1225

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 (8768) - mean (285ms)  : 281, 290
    master - mean (286ms)  : 280, 292

    section Bailout
    This PR (8768) - mean (285ms)  : 281, 290
    master - mean (288ms)  : 281, 294

    section CallTarget+Inlining+NGEN
    This PR (8768) - mean (958ms)  : 939, 978
    master - mean (956ms)  : 936, 976

Loading
HttpMessageHandler (.NET 6)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8768) - mean (279ms)  : 273, 286
    master - mean (275ms)  : 270, 280

    section Bailout
    This PR (8768) - mean (276ms)  : 270, 283
    master - mean (276ms)  : 270, 282

    section CallTarget+Inlining+NGEN
    This PR (8768) - mean (1,157ms)  : 1126, 1188
    master - mean (1,154ms)  : 1108, 1200

Loading
HttpMessageHandler (.NET 8)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8768) - mean (277ms)  : 270, 284
    master - mean (274ms)  : 268, 280

    section Bailout
    This PR (8768) - mean (278ms)  : 271, 285
    master - mean (275ms)  : 268, 282

    section CallTarget+Inlining+NGEN
    This PR (8768) - mean (1,039ms)  : 997, 1081
    master - mean (1,036ms)  : 997, 1075

Loading

@pr-commenter

pr-commenter Bot commented Jun 9, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-06-09 13:14:07

Comparing candidate commit 0b833a6 in PR branch codex/fix-redaction-bypass-in-debugger-serialization with baseline commit fce7175 in branch master.

📊 Benchmarking dashboard

Found 0 performance improvements and 1 performance regressions! Performance is the same for 71 metrics, 0 unstable metrics, 59 known flaky benchmarks, 67 flaky benchmarks without significant changes.

Explanation

This is an A/B test comparing a candidate commit's performance against that of a baseline commit. Performance changes are noted in the tables below as:

  • 🟩 = significantly better candidate vs. baseline
  • 🟥 = significantly worse candidate vs. baseline

We compute a confidence interval (CI) over the relative difference of means between metrics from the candidate and baseline commits, considering the baseline as the reference.

If the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD), the change is considered significant.

Feel free to reach out to #apm-benchmarking-platform on Slack if you have any questions.

More details about the CI and significant changes

You can imagine this CI as a range of values that is likely to contain the true difference of means between the candidate and baseline commits.

CIs of the difference of means are often centered around 0%, because often changes are not that big:

---------------------------------(------|---^--------)-------------------------------->
                              -0.6%    0%  0.3%     +1.2%
                                 |          |        |
         lower bound of the CI --'          |        |
sample mean (center of the CI) -------------'        |
         upper bound of the CI ----------------------'

As described above, a change is considered significant if the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD).

For instance, for an execution time metric, this confidence interval indicates a significantly worse performance:

----------------------------------------|---------|---(---------^---------)---------->
                                       0%        1%  1.3%      2.2%      3.1%
                                                  |   |         |         |
       significant impact threshold --------------'   |         |         |
                      lower bound of CI --------------'         |         |
       sample mean (center of the CI) --------------------------'         |
                      upper bound of CI ----------------------------------'

scenario:Benchmarks.Trace.HttpClientBenchmark.SendAsync net472

  • 🟥 throughput [-4906.525op/s; -4668.393op/s] or [-5.601%; -5.329%]

Known flaky benchmarks

These benchmarks are marked as flaky and will not trigger a failure. Modify FLAKY_BENCHMARKS_REGEX to control which benchmarks are marked as flaky.

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetStatus_Sampled netcoreapp3.1

  • 🟥 throughput [-19697.949op/s; -17564.896op/s] or [-9.280%; -8.276%]

scenario:Benchmarks.Trace.ActivityBenchmark.StartStopWithChild net472

  • 🟥 throughput [-6748.280op/s; -6215.758op/s] or [-8.001%; -7.370%]

scenario:Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • 🟥 execution_time [+302.375ms; +308.455ms] or [+150.049%; +153.066%]
  • 🟥 throughput [-46.756op/s; -42.262op/s] or [-8.412%; -7.604%]

scenario:Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces net6.0

  • 🟥 execution_time [+377.795ms; +378.908ms] or [+298.481%; +299.360%]
  • 🟩 throughput [+96.156op/s; +98.102op/s] or [+12.678%; +12.934%]

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

  • 🟥 execution_time [+391.335ms; +394.774ms] or [+346.317%; +349.360%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleMoreComplexBody net472

  • 🟥 allocated_mem [+1.308KB; +1.308KB] or [+27.528%; +27.540%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleMoreComplexBody net6.0

  • 🟥 allocated_mem [+471 bytes; +472 bytes] or [+9.976%; +9.987%]
  • 🟩 execution_time [-15.868ms; -11.652ms] or [-7.411%; -5.442%]

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

  • 🟥 allocated_mem [+1.272KB; +1.272KB] or [+27.500%; +27.510%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleSimpleBody net472

  • 🟥 allocated_mem [+1.307KB; +1.307KB] or [+105.743%; +105.758%]
  • 🟥 throughput [-270418.303op/s; -266929.602op/s] or [-27.611%; -27.255%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleSimpleBody net6.0

  • 🟥 allocated_mem [+471 bytes; +472 bytes] or [+38.557%; +38.566%]
  • 🟩 execution_time [-26.398ms; -21.550ms] or [-11.773%; -9.611%]

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

  • 🟥 allocated_mem [+1.272KB; +1.272KB] or [+105.288%; +105.304%]
  • 🟥 throughput [-148736.213op/s; -132941.087op/s] or [-21.371%; -19.101%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorMoreComplexBody net6.0

  • 🟩 throughput [+8898.411op/s; +11809.305op/s] or [+5.662%; +7.514%]

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

  • 🟩 throughput [+8251.109op/s; +10954.249op/s] or [+6.573%; +8.726%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorSimpleBody net6.0

  • 🟩 throughput [+462562.277op/s; +484023.500op/s] or [+15.424%; +16.139%]

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

  • 🟩 execution_time [-18.934ms; -14.598ms] or [-8.728%; -6.729%]
  • 🟩 throughput [+164627.605op/s; +219203.982op/s] or [+6.535%; +8.701%]

scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeArgs net472

  • 🟥 execution_time [+300.254ms; +301.175ms] or [+150.027%; +150.487%]

scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeArgs net6.0

  • 🟥 execution_time [+300.105ms; +303.729ms] or [+151.344%; +153.171%]

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

  • 🟥 execution_time [+299.364ms; +302.381ms] or [+150.796%; +152.316%]

scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeLegacyArgs net472

  • 🟥 execution_time [+296.546ms; +297.703ms] or [+145.652%; +146.220%]

scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeLegacyArgs net6.0

  • 🟥 execution_time [+297.453ms; +302.755ms] or [+145.414%; +148.006%]

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

  • 🟥 execution_time [+300.283ms; +302.552ms] or [+150.081%; +151.215%]

scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack net6.0

  • 🟥 execution_time [+22.378µs; +46.355µs] or [+7.144%; +14.799%]
  • 🟥 throughput [-430.181op/s; -228.665op/s] or [-13.410%; -7.128%]

scenario:Benchmarks.Trace.AspNetCoreBenchmark.SendRequest net472

  • 🟥 execution_time [+299.469ms; +300.172ms] or [+149.466%; +149.817%]

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

  • unstable execution_time [+334.280ms; +391.728ms] or [+363.209%; +425.628%]
  • 🟩 throughput [+703.946op/s; +889.200op/s] or [+5.784%; +7.307%]

scenario:Benchmarks.Trace.AspNetCoreBenchmark.SendRequest netcoreapp3.1

  • unstable execution_time [+244.097ms; +305.433ms] or [+185.340%; +231.912%]

scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • unstable execution_time [+336.592ms; +383.924ms] or [+154.762%; +176.525%]
  • 🟥 throughput [-528.042op/s; -482.536op/s] or [-47.846%; -43.722%]

scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces net6.0

  • unstable execution_time [+208.300ms; +341.542ms] or [+88.769%; +145.551%]
  • 🟥 throughput [-668.091op/s; -584.639op/s] or [-44.562%; -38.996%]

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

  • unstable execution_time [+318.003ms; +339.354ms] or [+190.203%; +202.973%]
  • 🟥 throughput [-421.814op/s; -379.957op/s] or [-29.370%; -26.456%]

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

  • unstable throughput [-19.094op/s; +35.591op/s] or [-3.564%; +6.643%]

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

  • 🟩 execution_time [-190.613µs; -147.152µs] or [-9.656%; -7.454%]
  • 🟩 throughput [+42.437op/s; +54.127op/s] or [+8.377%; +10.685%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch net472

  • 🟥 execution_time [+303.683ms; +305.482ms] or [+152.929%; +153.835%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch net6.0

  • 🟥 execution_time [+298.732ms; +317.093ms] or [+149.695%; +158.896%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch netcoreapp3.1

  • 🟥 execution_time [+302.931ms; +306.287ms] or [+152.180%; +153.865%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync net472

  • 🟥 execution_time [+300.723ms; +302.358ms] or [+151.013%; +151.834%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync net6.0

  • 🟥 execution_time [+299.511ms; +301.414ms] or [+148.095%; +149.036%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync netcoreapp3.1

  • 🟥 execution_time [+304.736ms; +308.662ms] or [+154.454%; +156.444%]

scenario:Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync net472

  • 🟥 execution_time [+301.459ms; +302.937ms] or [+151.305%; +152.047%]

scenario:Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync net6.0

  • 🟥 execution_time [+300.165ms; +310.520ms] or [+149.605%; +154.766%]
  • 🟩 throughput [+46858.765op/s; +60217.295op/s] or [+9.305%; +11.957%]

scenario:Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync netcoreapp3.1

  • 🟥 execution_time [+299.544ms; +302.164ms] or [+149.020%; +150.324%]

scenario:Benchmarks.Trace.ILoggerBenchmark.EnrichedLog net6.0

  • 🟩 execution_time [-16.763ms; -13.088ms] or [-7.795%; -6.086%]
  • 🟩 throughput [+19628.105op/s; +26828.813op/s] or [+5.385%; +7.360%]

scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark net472

  • unstable execution_time [+2.360µs; +44.154µs] or [+0.583%; +10.906%]

scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark net6.0

  • 🟩 allocated_mem [-18.931KB; -18.908KB] or [-6.906%; -6.897%]
  • unstable execution_time [-46.222µs; +10.189µs] or [-9.135%; +2.014%]

scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark netcoreapp3.1

  • unstable execution_time [-44.905µs; +16.584µs] or [-7.782%; +2.874%]

scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark net6.0

  • unstable execution_time [+5.988µs; +10.795µs] or [+14.153%; +25.516%]
  • 🟥 throughput [-4775.467op/s; -2856.234op/s] or [-20.103%; -12.024%]

scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark netcoreapp3.1

  • unstable execution_time [-13.286µs; -4.584µs] or [-20.612%; -7.113%]
  • unstable throughput [+1229.476op/s; +3119.795op/s] or [+7.543%; +19.141%]

scenario:Benchmarks.Trace.Log4netBenchmark.EnrichedLog net472

  • 🟥 execution_time [+302.276ms; +303.605ms] or [+152.787%; +153.459%]

scenario:Benchmarks.Trace.Log4netBenchmark.EnrichedLog net6.0

  • 🟥 execution_time [+302.308ms; +305.333ms] or [+153.874%; +155.414%]

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

  • 🟥 execution_time [+299.504ms; +301.737ms] or [+149.939%; +151.057%]

scenario:Benchmarks.Trace.SerilogBenchmark.EnrichedLog net472

  • 🟥 execution_time [+301.000ms; +303.369ms] or [+150.021%; +151.202%]

scenario:Benchmarks.Trace.SerilogBenchmark.EnrichedLog net6.0

  • 🟥 execution_time [+301.381ms; +304.375ms] or [+151.339%; +152.843%]

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

  • 🟥 execution_time [+303.727ms; +306.578ms] or [+154.031%; +155.476%]

scenario:Benchmarks.Trace.SingleSpanAspNetCoreBenchmark.SingleSpanAspNetCore net472

  • 🟥 execution_time [+299.694ms; +300.851ms] or [+149.489%; +150.066%]
  • 🟩 throughput [+65939763.729op/s; +66322449.447op/s] or [+48.021%; +48.300%]

scenario:Benchmarks.Trace.SingleSpanAspNetCoreBenchmark.SingleSpanAspNetCore net6.0

  • 🟥 execution_time [+417.060ms; +421.206ms] or [+518.688%; +523.844%]

scenario:Benchmarks.Trace.SingleSpanAspNetCoreBenchmark.SingleSpanAspNetCore netcoreapp3.1

  • 🟥 execution_time [+300.712ms; +301.818ms] or [+149.988%; +150.540%]
  • 🟩 throughput [+17676522.218op/s; +18651821.957op/s] or [+7.830%; +8.262%]

scenario:Benchmarks.Trace.SpanBenchmark.StartFinishScope net6.0

  • 🟩 throughput [+105571.302op/s; +112656.104op/s] or [+9.857%; +10.518%]

scenario:Benchmarks.Trace.SpanBenchmark.StartFinishSpan net6.0

  • 🟩 throughput [+82037.006op/s; +113123.627op/s] or [+6.350%; +8.756%]

scenario:Benchmarks.Trace.SpanBenchmark.StartFinishSpan netcoreapp3.1

  • 🟩 throughput [+67006.137op/s; +76096.996op/s] or [+6.655%; +7.558%]

scenario:Benchmarks.Trace.SpanBenchmark.StartFinishTwoScopes net6.0

  • 🟩 throughput [+49983.323op/s; +55680.870op/s] or [+9.076%; +10.111%]

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

  • 🟩 throughput [+59105.834op/s; +95953.650op/s] or [+6.604%; +10.720%]

Known flaky benchmarks without significant changes:

  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_AddEvent_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_AddEvent_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_AddEvent_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_GetContext_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_GetContext_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_GetContext_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_SetAttributes_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_SetAttributes_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_SetAttributes_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_SetStatus_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_SetStatus_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_SetStatus_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_UpdateName_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_UpdateName_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_UpdateName_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_AddEvent_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_AddEvent_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_AddEvent_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_GetContext_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_GetContext_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_GetContext_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_RecordException_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_RecordException_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_RecordException_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetAttributes_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetAttributes_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetAttributes_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetStatus_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetStatus_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_UpdateName_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_UpdateName_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_UpdateName_Sampled netcoreapp3.1
  • scenario:Benchmarks.Trace.ActivityBenchmark.StartStopWithChild net6.0
  • scenario:Benchmarks.Trace.ActivityBenchmark.StartStopWithChild netcoreapp3.1
  • scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorMoreComplexBody net472
  • scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorSimpleBody net472
  • scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark net472
  • scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark net6.0
  • scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark netcoreapp3.1
  • scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack net472
  • scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack netcoreapp3.1
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice net472
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice net6.0
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice netcoreapp3.1
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool net472
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool net6.0
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OriginalCharSlice net472
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OriginalCharSlice netcoreapp3.1
  • scenario:Benchmarks.Trace.ILoggerBenchmark.EnrichedLog net472
  • scenario:Benchmarks.Trace.ILoggerBenchmark.EnrichedLog netcoreapp3.1
  • scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark net472
  • scenario:Benchmarks.Trace.RedisBenchmark.SendReceive net472
  • scenario:Benchmarks.Trace.RedisBenchmark.SendReceive net6.0
  • scenario:Benchmarks.Trace.RedisBenchmark.SendReceive netcoreapp3.1
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishScope net472
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishScope netcoreapp3.1
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishSpan net472
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishTwoScopes net472
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishTwoScopes netcoreapp3.1
  • scenario:Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin net472
  • scenario:Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin netcoreapp3.1

@dudikeleti
dudikeleti force-pushed the codex/fix-redaction-bypass-in-debugger-serialization branch from a09b0d4 to 0b833a6 Compare June 9, 2026 12:22
@dudikeleti
dudikeleti merged commit 62786ee into master Jun 9, 2026
140 checks passed
@dudikeleti
dudikeleti deleted the codex/fix-redaction-bypass-in-debugger-serialization branch June 9, 2026 13:43
@github-actions github-actions Bot added this to the vNext-v3 milestone Jun 9, 2026
zacharycmontoya pushed a commit that referenced this pull request Jun 16, 2026
### Motivation

- A change started serializing runtime scalar values for object-typed
dictionary entries without supplying the dictionary key as the variable
name, which allowed sensitive entries (e.g., `"password"`) to bypass
redaction and leak secrets in debugger snapshots.

### Description

- Add a shared helper `WriteRedactedValue` to emit the redacted JSON
shape and use it from `SerializeInternal` when
`Redaction.Instance.ShouldRedact(...)` returns true for variables.
- During dictionary entry serialization, check string dictionary keys
with `Redaction.Instance.IsRedactedKeyword(...)` and use
`WriteRedactedValue` for redacted values instead of serializing the
runtime value.
- This change applies to supported dictionary serialization when the
runtime key is a string redacted identifier. Standalone `KeyValuePair`
objects and non-string dictionary keys remain out of scope.
- Add a unit test
`ObjectStructure_DictionaryEntryValue_WithRedactedKey_IsRedacted`
covering `Dictionary<string, object>`, `Dictionary<object, object>`, and
`Hashtable` to ensure entries under a sensitive key are emitted with
`notCapturedReason` and the secret value is not included.

### Testing

- Ran the focused unit tests with `dotnet test
tracer/test/Datadog.Trace.Tests/Datadog.Trace.Tests.csproj -f net8.0
--filter
"FullyQualifiedName~DebuggerSnapshotCreatorTests.ObjectStructure_DictionaryEntryValue_WithRedactedKey_IsRedacted|FullyQualifiedName~DebuggerSnapshotCreatorTests.ObjectStructure_ObjectTypedDictionaryEntries_UseRuntimeTypeAndNullFallback"
-v minimal` and both tests passed.
- Verified there are no `git diff --check` issues and added tests
exercise the fixed behavior (redaction of dictionary values by key).

------
[Codex
Task](https://chatgpt.com/codex/cloud/tasks/task_b_6a27d290b0e883279db47146c5a6fefc)

---------

Co-authored-by: Copilot Autofix powered by AI <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants