Skip to content

[Debugger] Avoid instantiating state machine attributes#8816

Merged
dudikeleti merged 2 commits into
masterfrom
dudik/debugger-metadata-only-state-machine-attributes
Jun 23, 2026
Merged

[Debugger] Avoid instantiating state machine attributes#8816
dudikeleti merged 2 commits into
masterfrom
dudik/debugger-metadata-only-state-machine-attributes

Conversation

@dudikeleti

@dudikeleti dudikeleti commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Summary of changes

  • Add a debugger helper that reads compiler state-machine attributes through CustomAttributeData instead of constructing attribute instances.
  • Use the helper in exception replay method matching, async kickoff method lookup, fully-qualified method name resolution, and ILAnalyzer async MoveNext selection.
  • Add regression coverage for overloaded async method matching with a custom method attribute whose constructor must not run.

Reason for change

Debugger state-machine resolution only needs compiler metadata such as AsyncStateMachineAttribute, IteratorStateMachineAttribute, and AsyncIteratorStateMachineAttribute. Instantiating attributes can execute user attribute constructors, so these resolution paths should stay metadata-only.

Implementation details

The helper compares attribute type full names and reads the state-machine type from CustomAttributeData.ConstructorArguments. It preserves the previous async/iterator behavior, including marking iterator and async-iterator state machines so GetFullyQualifiedName() still appends the +MoveNext() annotation where expected.

Test coverage

  • MethodMatcherTests|ILAnalyzerTests

Use CustomAttributeData for debugger state-machine resolution so method matching does not execute user attribute constructors while preserving async and iterator behavior.

Co-authored-by: Cursor <[email protected]>

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 hardens the Debugger’s async/iterator state-machine resolution paths by reading compiler state-machine attributes via CustomAttributeData (metadata-only) instead of instantiating attribute objects, avoiding potential user code execution from attribute constructors during exception replay/method resolution.

Changes:

  • Introduces StateMachineAttributeHelper to detect/read state-machine attributes from metadata without constructing attribute instances.
  • Updates async kickoff resolution, fully-qualified name resolution, method matching, and IL analysis to use the new helper.
  • Adds a regression test ensuring overloaded async method matching does not instantiate method attributes (i.e., does not run attribute constructors).

Reviewed changes

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

Show a summary per file
File Description
tracer/test/Datadog.Trace.Tests/Debugger/MethodMatcherTests.cs Adds regression coverage to ensure method attribute constructors are not executed during state-machine/method matching.
tracer/src/Datadog.Trace/Debugger/Helpers/StateMachineAttributeHelper.cs New helper that extracts state-machine type info from CustomAttributeData (metadata-only).
tracer/src/Datadog.Trace/Debugger/Helpers/MethodExtensions.cs Switches state-machine method resolution to use metadata-only attribute inspection.
tracer/src/Datadog.Trace/Debugger/Helpers/AsyncHelper.cs Uses metadata-only async state-machine attribute reading to find kickoff methods.
tracer/src/Datadog.Trace/Debugger/ExceptionAutoInstrumentation/MethodMatcher.cs Avoids instantiating attributes when disambiguating overloaded async methods.
tracer/src/Datadog.Trace/Debugger/ExceptionAutoInstrumentation/ILAnalyzer.cs Uses metadata-only async state-machine type lookup when selecting MoveNext for analysis.

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

Comment thread tracer/test/Datadog.Trace.Tests/Debugger/MethodMatcherTests.cs
@dd-trace-dotnet-ci-bot

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

Copy link
Copy Markdown

Execution-Time Benchmarks Report ⏱️

Execution-time results for samples comparing This PR (8816) 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
duration72.32 ± (72.28 - 72.78) ms73.17 ± (73.08 - 73.60) ms+1.2%✅⬆️
.NET Framework 4.8 - Bailout
duration76.30 ± (76.30 - 76.71) ms75.59 ± (75.62 - 76.07) ms-0.9%
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1075.36 ± (1075.68 - 1082.82) ms1081.69 ± (1080.55 - 1086.02) ms+0.6%✅⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms22.39 ± (22.34 - 22.44) ms22.52 ± (22.47 - 22.56) ms+0.6%✅⬆️
process.time_to_main_ms83.57 ± (83.29 - 83.86) ms83.70 ± (83.38 - 84.01) ms+0.2%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.94 ± (10.94 - 10.94) MB10.93 ± (10.92 - 10.94) MB-0.1%
runtime.dotnet.threads.count12 ± (12 - 12)12 ± (12 - 12)+0.0%
.NET Core 3.1 - Bailout
process.internal_duration_ms22.14 ± (22.11 - 22.16) ms22.06 ± (22.03 - 22.08) ms-0.4%
process.time_to_main_ms82.87 ± (82.70 - 83.04) ms82.38 ± (82.22 - 82.53) ms-0.6%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.97 ± (10.97 - 10.98) MB10.94 ± (10.94 - 10.95) MB-0.3%
runtime.dotnet.threads.count13 ± (13 - 13)13 ± (13 - 13)+0.0%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms209.31 ± (208.27 - 210.35) ms211.03 ± (209.99 - 212.08) ms+0.8%✅⬆️
process.time_to_main_ms527.08 ± (525.94 - 528.23) ms528.73 ± (527.57 - 529.90) ms+0.3%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed48.84 ± (48.80 - 48.88) MB48.60 ± (48.56 - 48.64) MB-0.5%
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)+0.3%✅⬆️
.NET 6 - Baseline
process.internal_duration_ms21.06 ± (21.01 - 21.11) ms21.13 ± (21.08 - 21.18) ms+0.3%✅⬆️
process.time_to_main_ms72.67 ± (72.43 - 72.92) ms72.32 ± (72.08 - 72.56) ms-0.5%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.64 ± (10.63 - 10.64) MB10.62 ± (10.62 - 10.63) MB-0.1%
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 6 - Bailout
process.internal_duration_ms20.78 ± (20.74 - 20.81) ms20.82 ± (20.79 - 20.85) ms+0.2%✅⬆️
process.time_to_main_ms71.85 ± (71.69 - 72.00) ms71.26 ± (71.12 - 71.39) ms-0.8%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.75 ± (10.75 - 10.75) MB10.75 ± (10.74 - 10.75) MB-0.1%
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms372.25 ± (370.15 - 374.36) ms368.10 ± (365.82 - 370.37) ms-1.1%
process.time_to_main_ms534.88 ± (533.87 - 535.90) ms534.91 ± (533.64 - 536.19) ms+0.0%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed50.20 ± (50.18 - 50.22) MB50.17 ± (50.15 - 50.20) MB-0.1%
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)-0.0%
.NET 8 - Baseline
process.internal_duration_ms19.14 ± (19.11 - 19.17) ms19.12 ± (19.09 - 19.15) ms-0.1%
process.time_to_main_ms69.05 ± (68.91 - 69.19) ms69.18 ± (69.07 - 69.28) ms+0.2%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.68 ± (7.67 - 7.68) MB7.70 ± (7.70 - 7.71) MB+0.4%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 8 - Bailout
process.internal_duration_ms19.19 ± (19.16 - 19.23) ms19.07 ± (19.04 - 19.10) ms-0.6%
process.time_to_main_ms71.71 ± (71.50 - 71.93) ms70.33 ± (70.19 - 70.47) ms-1.9%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.73 ± (7.72 - 7.73) 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_ms302.60 ± (300.34 - 304.86) ms296.12 ± (294.06 - 298.17) ms-2.1%
process.time_to_main_ms483.22 ± (482.26 - 484.17) ms487.40 ± (486.19 - 488.62) ms+0.9%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed37.16 ± (37.13 - 37.19) MB37.18 ± (37.15 - 37.21) MB+0.1%✅⬆️
runtime.dotnet.threads.count27 ± (27 - 27)27 ± (27 - 27)-0.8%

HttpMessageHandler

Metric Master (Mean ± 95% CI) Current (Mean ± 95% CI) Change Status
.NET Framework 4.8 - Baseline
duration203.43 ± (202.95 - 203.85) ms203.82 ± (203.52 - 204.46) ms+0.2%✅⬆️
.NET Framework 4.8 - Bailout
duration206.31 ± (206.11 - 207.13) ms206.34 ± (205.84 - 206.88) ms+0.0%✅⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1209.20 ± (1208.50 - 1214.80) ms1198.27 ± (1197.81 - 1204.17) ms-0.9%
.NET Core 3.1 - Baseline
process.internal_duration_ms195.84 ± (195.42 - 196.25) ms194.39 ± (193.94 - 194.83) ms-0.7%
process.time_to_main_ms85.11 ± (84.85 - 85.38) ms84.34 ± (84.05 - 84.63) ms-0.9%
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.06 ± (16.03 - 16.08) MB16.06 ± (16.04 - 16.09) MB+0.1%✅⬆️
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (20 - 20)+0.2%✅⬆️
.NET Core 3.1 - Bailout
process.internal_duration_ms195.68 ± (195.18 - 196.18) ms193.77 ± (193.34 - 194.19) ms-1.0%
process.time_to_main_ms86.57 ± (86.29 - 86.84) ms85.53 ± (85.26 - 85.80) ms-1.2%
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.10 ± (16.08 - 16.13) MB16.07 ± (16.05 - 16.10) MB-0.2%
runtime.dotnet.threads.count21 ± (21 - 21)21 ± (21 - 21)-0.0%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms389.53 ± (388.17 - 390.88) ms384.08 ± (382.63 - 385.52) ms-1.4%
process.time_to_main_ms543.56 ± (542.27 - 544.85) ms540.27 ± (538.90 - 541.65) ms-0.6%
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed58.54 ± (58.33 - 58.75) MB57.52 ± (57.35 - 57.70) MB-1.7%
runtime.dotnet.threads.count30 ± (30 - 30)30 ± (30 - 30)-0.2%
.NET 6 - Baseline
process.internal_duration_ms202.15 ± (201.73 - 202.58) ms198.98 ± (198.51 - 199.45) ms-1.6%
process.time_to_main_ms74.40 ± (74.17 - 74.64) ms73.17 ± (72.94 - 73.41) ms-1.7%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.29 ± (16.27 - 16.31) MB16.38 ± (16.35 - 16.40) MB+0.5%✅⬆️
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)+0.1%✅⬆️
.NET 6 - Bailout
process.internal_duration_ms202.42 ± (202.05 - 202.79) ms199.87 ± (199.39 - 200.35) ms-1.3%
process.time_to_main_ms75.89 ± (75.72 - 76.06) ms74.77 ± (74.54 - 75.00) ms-1.5%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.41 ± (16.38 - 16.44) MB16.46 ± (16.44 - 16.49) MB+0.3%✅⬆️
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (20 - 20)-1.1%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms585.52 ± (582.77 - 588.26) ms585.20 ± (582.86 - 587.55) ms-0.1%
process.time_to_main_ms554.61 ± (553.27 - 555.94) ms551.23 ± (550.13 - 552.32) ms-0.6%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed61.47 ± (61.36 - 61.58) MB61.47 ± (61.39 - 61.56) MB+0.0%✅⬆️
runtime.dotnet.threads.count31 ± (31 - 31)31 ± (31 - 31)-0.1%
.NET 8 - Baseline
process.internal_duration_ms199.59 ± (199.15 - 200.03) ms197.41 ± (197.02 - 197.80) ms-1.1%
process.time_to_main_ms73.40 ± (73.14 - 73.66) ms72.89 ± (72.61 - 73.17) ms-0.7%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.73 ± (11.71 - 11.76) MB11.75 ± (11.73 - 11.77) MB+0.1%✅⬆️
runtime.dotnet.threads.count19 ± (19 - 19)18 ± (18 - 18)-1.3%
.NET 8 - Bailout
process.internal_duration_ms198.72 ± (198.37 - 199.08) ms199.03 ± (198.57 - 199.49) ms+0.2%✅⬆️
process.time_to_main_ms74.43 ± (74.20 - 74.66) ms74.43 ± (74.25 - 74.60) ms-0.0%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.76 ± (11.74 - 11.78) MB11.80 ± (11.77 - 11.82) MB+0.3%✅⬆️
runtime.dotnet.threads.count20 ± (19 - 20)19 ± (19 - 19)-1.1%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms511.47 ± (508.53 - 514.42) ms509.84 ± (507.20 - 512.49) ms-0.3%
process.time_to_main_ms500.80 ± (499.92 - 501.69) ms503.57 ± (502.64 - 504.50) ms+0.6%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed50.96 ± (50.92 - 50.99) MB50.87 ± (50.83 - 50.91) MB-0.2%
runtime.dotnet.threads.count30 ± (29 - 30)30 ± (30 - 30)+0.5%✅⬆️
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 (8816) - mean (73ms)  : 69, 77
    master - mean (73ms)  : 69, 76

    section Bailout
    This PR (8816) - mean (76ms)  : 72, 79
    master - mean (77ms)  : 74, 79

    section CallTarget+Inlining+NGEN
    This PR (8816) - mean (1,083ms)  : 1044, 1122
    master - mean (1,079ms)  : 1025, 1133

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 (8816) - mean (114ms)  : 107, 120
    master - mean (113ms)  : 108, 119

    section Bailout
    This PR (8816) - mean (111ms)  : 109, 113
    master - mean (112ms)  : 108, 116

    section CallTarget+Inlining+NGEN
    This PR (8816) - mean (776ms)  : 752, 800
    master - mean (773ms)  : 755, 791

Loading
FakeDbCommand (.NET 6)
gantt
    title Execution time (ms) FakeDbCommand (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8816) - mean (100ms)  : 95, 105
    master - mean (100ms)  : 95, 105

    section Bailout
    This PR (8816) - mean (98ms)  : 96, 100
    master - mean (99ms)  : 96, 102

    section CallTarget+Inlining+NGEN
    This PR (8816) - mean (934ms)  : 888, 979
    master - mean (936ms)  : 897, 975

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

    section Bailout
    This PR (8816) - mean (96ms)  : 94, 98
    master - mean (98ms)  : 94, 103

    section CallTarget+Inlining+NGEN
    This PR (8816) - mean (813ms)  : 779, 847
    master - mean (815ms)  : 776, 855

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 (8816) - mean (204ms)  : 198, 210
    master - mean (203ms)  : 198, 208

    section Bailout
    This PR (8816) - mean (206ms)  : 201, 212
    master - mean (207ms)  : 201, 213

    section CallTarget+Inlining+NGEN
    This PR (8816) - mean (1,201ms)  : 1153, 1249
    master - mean (1,212ms)  : 1166, 1257

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 (8816) - mean (288ms)  : 279, 298
    master - mean (291ms)  : 282, 300

    section Bailout
    This PR (8816) - mean (289ms)  : 283, 295
    master - mean (292ms)  : 283, 301

    section CallTarget+Inlining+NGEN
    This PR (8816) - mean (966ms)  : 947, 984
    master - mean (973ms)  : 950, 995

Loading
HttpMessageHandler (.NET 6)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8816) - mean (282ms)  : 274, 289
    master - mean (286ms)  : 276, 295

    section Bailout
    This PR (8816) - mean (284ms)  : 278, 290
    master - mean (288ms)  : 283, 292

    section CallTarget+Inlining+NGEN
    This PR (8816) - mean (1,166ms)  : 1129, 1203
    master - mean (1,172ms)  : 1129, 1214

Loading
HttpMessageHandler (.NET 8)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8816) - mean (281ms)  : 276, 286
    master - mean (283ms)  : 274, 292

    section Bailout
    This PR (8816) - mean (284ms)  : 277, 291
    master - mean (284ms)  : 279, 288

    section CallTarget+Inlining+NGEN
    This PR (8816) - mean (1,047ms)  : 1000, 1094
    master - mean (1,045ms)  : 998, 1092

Loading

@pr-commenter

pr-commenter Bot commented Jun 22, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-06-22 18:47:13

Comparing candidate commit 2143e74 in PR branch dudik/debugger-metadata-only-state-machine-attributes with baseline commit 6aeb6ed in branch master.

📊 Benchmarking dashboard

Found 0 performance improvements and 0 performance regressions! Performance is the same for 72 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 ----------------------------------'

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.Trace.ActivityBenchmark.StartStopWithChild net472

  • 🟥 throughput [-8140.281op/s; -7541.604op/s] or [-9.652%; -8.942%]

scenario:Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • 🟥 execution_time [+307.524ms; +313.583ms] or [+152.604%; +155.611%]
  • 🟥 throughput [-51.765op/s; -47.534op/s] or [-9.314%; -8.552%]

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

  • 🟥 execution_time [+377.070ms; +380.174ms] or [+297.908%; +300.361%]
  • 🟩 throughput [+94.117op/s; +99.403op/s] or [+12.409%; +13.106%]

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

  • 🟥 execution_time [+394.606ms; +396.403ms] or [+349.211%; +350.802%]

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 [-16.374ms; -12.193ms] or [-7.647%; -5.694%]
  • 🟩 throughput [+7092.904op/s; +9887.396op/s] or [+5.177%; +7.217%]

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 [-271284.245op/s; -268039.956op/s] or [-27.699%; -27.368%]

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

  • 🟥 allocated_mem [+471 bytes; +472 bytes] or [+38.557%; +38.566%]
  • 🟩 execution_time [-26.227ms; -20.185ms] or [-11.696%; -9.002%]

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

  • 🟥 allocated_mem [+1.272KB; +1.272KB] or [+105.288%; +105.304%]
  • 🟥 throughput [-152206.098op/s; -136090.315op/s] or [-21.869%; -19.554%]

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

  • 🟩 throughput [+10604.830op/s; +13647.745op/s] or [+6.748%; +8.684%]

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

  • 🟩 throughput [+9706.039op/s; +12363.670op/s] or [+7.732%; +9.849%]

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

  • 🟩 throughput [+449703.565op/s; +477468.370op/s] or [+14.995%; +15.921%]

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

  • 🟩 execution_time [-19.258ms; -14.929ms] or [-8.877%; -6.882%]
  • 🟩 throughput [+181090.950op/s; +234239.059op/s] or [+7.188%; +9.298%]

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

  • 🟥 execution_time [+299.879ms; +300.556ms] or [+149.839%; +150.177%]

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

  • 🟥 execution_time [+298.572ms; +302.056ms] or [+150.571%; +152.328%]

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

  • 🟥 execution_time [+299.258ms; +301.664ms] or [+150.743%; +151.955%]

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

  • 🟥 execution_time [+295.957ms; +297.552ms] or [+145.362%; +146.146%]

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

  • 🟥 execution_time [+294.091ms; +295.602ms] or [+143.770%; +144.509%]

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

  • 🟥 execution_time [+300.033ms; +302.032ms] or [+149.956%; +150.955%]

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

  • 🟥 execution_time [+23.385µs; +50.124µs] or [+5.363%; +11.496%]
  • 🟥 throughput [-244.721op/s; -124.467op/s] or [-10.639%; -5.411%]

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

  • 🟥 execution_time [+23.642µs; +47.267µs] or [+7.548%; +15.090%]
  • 🟥 throughput [-439.036op/s; -240.249op/s] or [-13.686%; -7.489%]

scenario:Benchmarks.Trace.AspNetCoreBenchmark.SendRequest net472

  • 🟥 execution_time [+299.428ms; +300.188ms] or [+149.445%; +149.824%]

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

  • 🟥 execution_time [+411.046ms; +419.183ms] or [+446.618%; +455.459%]
  • 🟩 throughput [+684.358op/s; +852.132op/s] or [+5.623%; +7.002%]

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

  • unstable execution_time [+297.330ms; +349.321ms] or [+225.760%; +265.236%]

scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • unstable execution_time [+370.363ms; +420.930ms] or [+170.289%; +193.539%]
  • 🟥 throughput [-561.998op/s; -519.421op/s] or [-50.922%; -47.065%]

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

  • unstable execution_time [+202.948ms; +336.267ms] or [+86.488%; +143.303%]
  • 🟥 throughput [-678.119op/s; -594.351op/s] or [-45.231%; -39.643%]

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

  • unstable execution_time [+332.844ms; +350.660ms] or [+199.080%; +209.735%]
  • 🟥 throughput [-404.093op/s; -364.123op/s] or [-28.136%; -25.353%]

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

  • 🟩 execution_time [-162.483µs; -106.066µs] or [-8.231%; -5.373%]
  • 🟩 throughput [+31.113op/s; +45.658op/s] or [+6.142%; +9.013%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch net472

  • 🟥 execution_time [+304.125ms; +306.658ms] or [+153.151%; +154.427%]

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

  • 🟥 execution_time [+301.159ms; +303.377ms] or [+150.911%; +152.023%]

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

  • 🟥 execution_time [+300.893ms; +304.027ms] or [+151.156%; +152.730%]
  • 🟩 throughput [+28349.330op/s; +35732.085op/s] or [+5.972%; +7.527%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync net472

  • 🟥 execution_time [+301.563ms; +303.002ms] or [+151.435%; +152.158%]

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

  • 🟥 execution_time [+298.161ms; +300.819ms] or [+147.427%; +148.741%]

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

  • 🟥 execution_time [+302.847ms; +306.275ms] or [+153.496%; +155.234%]

scenario:Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync net472

  • 🟥 execution_time [+302.282ms; +304.013ms] or [+151.718%; +152.587%]

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

  • 🟥 execution_time [+302.810ms; +307.142ms] or [+150.923%; +153.082%]
  • 🟩 throughput [+49590.461op/s; +59351.127op/s] or [+9.847%; +11.785%]

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

  • 🟥 execution_time [+300.494ms; +303.636ms] or [+149.493%; +151.056%]

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

  • 🟩 execution_time [-16.569ms; -12.919ms] or [-7.705%; -6.008%]

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

  • unstable execution_time [+6.811µs; +50.288µs] or [+1.682%; +12.421%]

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

  • 🟩 allocated_mem [-25.421KB; -25.399KB] or [-9.273%; -9.265%]
  • unstable execution_time [-48.289µs; +7.192µs] or [-9.544%; +1.421%]

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

  • unstable execution_time [-60.126µs; +2.689µs] or [-10.420%; +0.466%]

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

  • 🟥 execution_time [+6.247µs; +10.307µs] or [+14.766%; +24.364%]
  • 🟥 throughput [-4780.436op/s; -2961.239op/s] or [-20.124%; -12.466%]

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

  • unstable execution_time [-15.148µs; -8.162µs] or [-23.502%; -12.663%]
  • 🟩 throughput [+2018.601op/s; +3510.029op/s] or [+12.385%; +21.535%]

scenario:Benchmarks.Trace.Log4netBenchmark.EnrichedLog net472

  • 🟥 execution_time [+302.165ms; +303.380ms] or [+152.731%; +153.345%]

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

  • 🟥 execution_time [+302.626ms; +304.916ms] or [+154.035%; +155.201%]

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

  • 🟥 execution_time [+299.491ms; +301.828ms] or [+149.932%; +151.102%]

scenario:Benchmarks.Trace.RedisBenchmark.SendReceive net472

  • 🟥 throughput [-31641.589op/s; -27104.719op/s] or [-8.759%; -7.503%]

scenario:Benchmarks.Trace.SerilogBenchmark.EnrichedLog net472

  • 🟥 execution_time [+299.628ms; +301.635ms] or [+149.337%; +150.338%]

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

  • 🟥 execution_time [+301.317ms; +302.904ms] or [+151.307%; +152.104%]

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

  • 🟥 execution_time [+302.101ms; +304.847ms] or [+153.206%; +154.599%]

scenario:Benchmarks.Trace.SingleSpanAspNetCoreBenchmark.SingleSpanAspNetCore net472

  • 🟥 execution_time [+299.740ms; +300.924ms] or [+149.512%; +150.103%]
  • 🟩 throughput [+66186488.133op/s; +66556200.865op/s] or [+48.201%; +48.470%]

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

  • 🟥 execution_time [+419.814ms; +424.203ms] or [+522.113%; +527.572%]

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

  • 🟥 execution_time [+299.570ms; +300.723ms] or [+149.418%; +149.994%]
  • 🟩 throughput [+18109625.144op/s; +19112496.679op/s] or [+8.021%; +8.466%]

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

  • 🟩 throughput [+83494.770op/s; +95660.154op/s] or [+7.796%; +8.931%]

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

  • 🟩 throughput [+95987.473op/s; +127154.750op/s] or [+7.430%; +9.842%]

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

  • 🟩 throughput [+56599.268op/s; +68272.573op/s] or [+5.621%; +6.781%]

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

  • 🟩 throughput [+45932.958op/s; +52764.676op/s] or [+8.341%; +9.581%]

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

  • 🟩 throughput [+83660.395op/s; +101253.523op/s] or [+9.347%; +11.313%]

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_SetStatus_Sampled netcoreapp3.1
  • 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 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.OptimizedCharSliceWithPool netcoreapp3.1
  • 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 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

@datadog-prod-us1-3

This comment has been minimized.

@dudikeleti
dudikeleti marked this pull request as ready for review June 23, 2026 08:58
@dudikeleti
dudikeleti requested a review from a team as a code owner June 23, 2026 08:58
@dudikeleti
dudikeleti requested a review from jpbempel June 23, 2026 08:59
@dudikeleti
dudikeleti enabled auto-merge (squash) June 23, 2026 08:59
@dudikeleti
dudikeleti merged commit fd8f42e into master Jun 23, 2026
143 checks passed
@dudikeleti
dudikeleti deleted the dudik/debugger-metadata-only-state-machine-attributes branch June 23, 2026 15:53
@github-actions github-actions Bot added this to the vNext-v3 milestone Jun 23, 2026
dudikeleti added a commit that referenced this pull request Jul 1, 2026
## Summary of changes
- Add a single debugger safety boundaries guide covering
reflection/type-loading risks and customer-code execution policy.
- Make the safety guide visible from `AGENTS.md` so future agents and
reviewers check it before changing debugger safety-sensitive paths.
- Add focused snapshot tests for the current policy around default
object getters, selected exception properties, and supported collection
enumeration.

## Reason for change
Define safety boundaries for debugger code running inside customer
processes. Keeping the reflection audit, customer-code execution policy,
and agent-facing guidance in one document gives reviewers one place to
evaluate the current contract and the representative tests that lock it
in.

## Implementation details
This branch intentionally does not change capture behavior. The tests
document that default object capture reads backing fields without
invoking arbitrary getters, exception capture reads selected
`System.Exception` properties, and supported collection serialization
reads `Count` and enumerates under existing limits. The merged safety
guide classifies related debugger reflection paths and defines when code
may invoke getters, enumerators, exception overrides, attributes, or
`ToString()`.

## Test coverage
- `DebuggerSnapshotCreatorTests.Policy_`
- `DebuggerSnapshotCreatorTests`

Related follow-up PRs:
- #8814: static member capture guard
- #8815: metadata-only Exception Replay IL call scanning
- #8816: metadata-only state-machine attribute checks

---------

Co-authored-by: Cursor <[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