Skip to content

Conversation

@dudikeleti
Copy link
Contributor

Summary of changes

Harden binary equality handling (== / !=) in the probe expression parser to avoid runtime exceptions and produce predictable results when comparing:

  • non-nullable value types to null
  • reference types to null when the runtime type differs from the compile-time type

Implementation details

  • Route == and != through a dedicated EqualExpression() helper.
  • For non-nullable value type vs null:
    • return a constant expression (false for ==, true for !=) since the comparison outcome is deterministic.
  • For reference type vs null:
    • use Expression.ReferenceEqual on object-converted operands to ensure object-reference semantics and avoid type-cast issues.

Test coverage

Snapshot Exploration Test

Other details

This PR is part of an effort to make the Snapshot Exploration Test run successfully end-to-end.

@dudikeleti dudikeleti requested a review from a team as a code owner December 20, 2025 13:02
@github-actions github-actions bot added area:tracer The core tracer library (Datadog.Trace, does not include OpenTracing, native code, or integrations) area:debugger labels Dec 20, 2025
@datadog-datadog-prod-us1
Copy link

datadog-datadog-prod-us1 bot commented Dec 20, 2025

⚠️ Tests

Fix all issues with Cursor

⚠️ Warnings

❄️ 17 New flaky tests detected

TestConditions from Datadog.Trace.Tests.Debugger.DebuggerExpressionLanguageTests (Datadog) (Fix with Cursor)
Results do not match.
Differences:
Received: DebuggerExpressionLanguageTests.NotEqual.received.txt
Verified: DebuggerExpressionLanguageTests.NotEqual.verified.txt
Received Content:
Condition:
Json:
{
  "or": [
    {
...
TestConditions from Datadog.Trace.Tests.Debugger.DebuggerExpressionLanguageTests (Datadog) (Fix with Cursor)
Results do not match.
Differences:
Received: DebuggerExpressionLanguageTests.NotEqual.received.txt
Verified: DebuggerExpressionLanguageTests.NotEqual.verified.txt
Received Content:
Condition:
Json:
{
  "or": [
    {
...
TestConditions from Datadog.Trace.Tests.Debugger.DebuggerExpressionLanguageTests (Datadog) (Fix with Cursor)
Results do not match.
Differences:
Received: DebuggerExpressionLanguageTests.NotEqual.received.txt
Verified: DebuggerExpressionLanguageTests.NotEqual.verified.txt
Received Content:
Condition:
Json:
{
  "or": [
    {
...
View all

🧪 2 Tests failed

NoExceptions from Datadog.Trace.ClrProfiler.IntegrationTests.SmokeTests.RuntimeMetricsShutdownSmokeTest (Datadog) (Fix with Cursor)
Expected no errors in smoke test: [createdump] Invalid process id: open(/proc/19217/mem) FAILED No such file or directory (2)
[createdump] Target process terminated
[createdump] Failure took 0ms
❄️ Known flaky: SinkRejectsGiantMessages from Datadog.Trace.Tests.Logging.DirectSubmission.Sink.DatadogSinkTests (Datadog) (Fix with Cursor)
Expected logsApi.Logs to be True, but found False.
This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 57d0c9b | Docs | Datadog PR Page | Was this helpful? Give us feedback!

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

Execution-Time Benchmarks Report ⏱️

Execution-time results for samples comparing This PR (7991) 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.37 ± (68.44 - 68.67) ms68.48 ± (68.52 - 68.73) ms+0.2%✅⬆️
.NET Framework 4.8 - Bailout
duration72.04 ± (71.98 - 72.19) ms72.50 ± (72.39 - 72.64) ms+0.6%✅⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1002.12 ± (1004.91 - 1011.87) ms1007.00 ± (1009.20 - 1015.77) ms+0.5%✅⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms21.95 ± (21.93 - 21.97) ms22.04 ± (22.01 - 22.06) ms+0.4%✅⬆️
process.time_to_main_ms78.46 ± (78.35 - 78.58) ms78.73 ± (78.57 - 78.90) ms+0.3%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.90 ± (10.90 - 10.91) MB10.91 ± (10.91 - 10.91) MB+0.1%✅⬆️
runtime.dotnet.threads.count12 ± (12 - 12)12 ± (12 - 12)+0.0%
.NET Core 3.1 - Bailout
process.internal_duration_ms21.95 ± (21.93 - 21.97) ms22.00 ± (21.98 - 22.03) ms+0.2%✅⬆️
process.time_to_main_ms79.96 ± (79.89 - 80.04) ms80.07 ± (79.98 - 80.17) ms+0.1%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.94 ± (10.93 - 10.94) MB10.95 ± (10.95 - 10.95) MB+0.1%✅⬆️
runtime.dotnet.threads.count13 ± (13 - 13)13 ± (13 - 13)+0.0%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms210.44 ± (209.06 - 211.82) ms211.12 ± (209.74 - 212.50) ms+0.3%✅⬆️
process.time_to_main_ms472.04 ± (471.46 - 472.62) ms472.76 ± (472.22 - 473.31) ms+0.2%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed48.10 ± (48.08 - 48.12) MB48.21 ± (48.19 - 48.22) MB+0.2%✅⬆️
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)+0.0%
.NET 6 - Baseline
process.internal_duration_ms20.65 ± (20.63 - 20.68) ms20.68 ± (20.65 - 20.71) ms+0.1%✅⬆️
process.time_to_main_ms68.09 ± (67.97 - 68.20) ms68.11 ± (68.01 - 68.22) ms+0.0%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.61 ± (10.61 - 10.61) MB10.62 ± (10.62 - 10.62) MB+0.1%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 6 - Bailout
process.internal_duration_ms20.61 ± (20.58 - 20.64) ms20.61 ± (20.58 - 20.63) ms-0.0%
process.time_to_main_ms68.94 ± (68.88 - 69.01) ms69.18 ± (69.12 - 69.24) ms+0.3%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.74 ± (10.73 - 10.74) MB10.67 ± (10.66 - 10.67) MB-0.7%
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms200.18 ± (198.87 - 201.49) ms201.16 ± (200.08 - 202.24) ms+0.5%✅⬆️
process.time_to_main_ms437.61 ± (436.97 - 438.24) ms439.12 ± (438.57 - 439.67) ms+0.3%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed48.00 ± (47.92 - 48.08) MB48.20 ± (48.12 - 48.28) MB+0.4%✅⬆️
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)+0.3%✅⬆️
.NET 8 - Baseline
process.internal_duration_ms18.82 ± (18.79 - 18.84) ms18.84 ± (18.82 - 18.87) ms+0.1%✅⬆️
process.time_to_main_ms66.98 ± (66.87 - 67.08) ms67.36 ± (67.26 - 67.47) ms+0.6%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.69 ± (7.68 - 7.70) MB7.69 ± (7.68 - 7.70) MB+0.0%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 8 - Bailout
process.internal_duration_ms18.81 ± (18.79 - 18.82) ms18.83 ± (18.81 - 18.85) ms+0.1%✅⬆️
process.time_to_main_ms68.07 ± (68.01 - 68.13) ms68.45 ± (68.39 - 68.51) ms+0.6%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.73 ± (7.72 - 7.74) MB7.75 ± (7.74 - 7.75) MB+0.2%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms180.15 ± (179.10 - 181.20) ms177.88 ± (177.05 - 178.71) ms-1.3%
process.time_to_main_ms425.59 ± (424.81 - 426.37) ms423.05 ± (422.59 - 423.51) ms-0.6%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed36.31 ± (36.27 - 36.34) MB36.30 ± (36.27 - 36.33) 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
duration192.71 ± (193.01 - 193.77) ms193.84 ± (193.66 - 194.56) ms+0.6%✅⬆️
.NET Framework 4.8 - Bailout
duration196.49 ± (196.15 - 196.64) ms197.05 ± (196.70 - 197.41) ms+0.3%✅⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1111.56 ± (1114.95 - 1123.79) ms1107.80 ± (1112.54 - 1121.16) ms-0.3%
.NET Core 3.1 - Baseline
process.internal_duration_ms187.49 ± (187.10 - 187.89) ms187.73 ± (187.33 - 188.14) ms+0.1%✅⬆️
process.time_to_main_ms80.17 ± (79.97 - 80.38) ms80.76 ± (80.54 - 80.98) ms+0.7%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.06 ± (16.04 - 16.09) MB16.15 ± (16.13 - 16.18) MB+0.6%✅⬆️
runtime.dotnet.threads.count20 ± (19 - 20)20 ± (20 - 20)+0.9%✅⬆️
.NET Core 3.1 - Bailout
process.internal_duration_ms186.68 ± (186.37 - 187.00) ms188.29 ± (187.91 - 188.67) ms+0.9%✅⬆️
process.time_to_main_ms81.54 ± (81.42 - 81.65) ms82.22 ± (82.05 - 82.39) ms+0.8%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.16 ± (16.13 - 16.19) MB16.12 ± (16.09 - 16.14) MB-0.3%
runtime.dotnet.threads.count21 ± (21 - 21)21 ± (20 - 21)-0.3%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms395.98 ± (393.57 - 398.40) ms399.99 ± (397.20 - 402.78) ms+1.0%✅⬆️
process.time_to_main_ms475.83 ± (475.22 - 476.43) ms475.57 ± (474.92 - 476.21) ms-0.1%
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed58.48 ± (58.33 - 58.62) MB58.64 ± (58.51 - 58.77) MB+0.3%✅⬆️
runtime.dotnet.threads.count29 ± (29 - 29)29 ± (29 - 29)-0.1%
.NET 6 - Baseline
process.internal_duration_ms191.69 ± (191.34 - 192.03) ms191.63 ± (191.30 - 191.95) ms-0.0%
process.time_to_main_ms69.73 ± (69.57 - 69.90) ms69.66 ± (69.48 - 69.83) ms-0.1%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.04 ± (15.90 - 16.18) MB15.97 ± (15.81 - 16.13) MB-0.5%
runtime.dotnet.threads.count18 ± (18 - 19)18 ± (18 - 18)-0.9%
.NET 6 - Bailout
process.internal_duration_ms190.64 ± (190.43 - 190.86) ms191.36 ± (190.98 - 191.75) ms+0.4%✅⬆️
process.time_to_main_ms70.36 ± (70.28 - 70.43) ms71.07 ± (70.92 - 71.22) ms+1.0%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.11 ± (15.97 - 16.26) MB16.25 ± (16.13 - 16.37) MB+0.8%✅⬆️
runtime.dotnet.threads.count19 ± (19 - 19)20 ± (20 - 20)+3.0%✅⬆️
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms411.54 ± (408.95 - 414.13) ms409.19 ± (406.61 - 411.77) ms-0.6%
process.time_to_main_ms443.81 ± (443.28 - 444.33) ms445.49 ± (444.89 - 446.08) ms+0.4%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed59.01 ± (58.88 - 59.14) MB58.94 ± (58.79 - 59.08) MB-0.1%
runtime.dotnet.threads.count30 ± (30 - 30)30 ± (29 - 30)-0.3%
.NET 8 - Baseline
process.internal_duration_ms189.64 ± (189.37 - 189.91) ms189.43 ± (189.19 - 189.66) ms-0.1%
process.time_to_main_ms69.26 ± (69.04 - 69.48) ms69.45 ± (69.27 - 69.63) ms+0.3%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.70 ± (11.64 - 11.75) MB11.79 ± (11.77 - 11.82) MB+0.8%✅⬆️
runtime.dotnet.threads.count18 ± (18 - 18)18 ± (18 - 18)+2.3%✅⬆️
.NET 8 - Bailout
process.internal_duration_ms189.20 ± (188.95 - 189.45) ms189.61 ± (189.33 - 189.89) ms+0.2%✅⬆️
process.time_to_main_ms70.22 ± (70.12 - 70.32) ms70.45 ± (70.33 - 70.57) ms+0.3%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.80 ± (11.75 - 11.84) MB11.85 ± (11.83 - 11.88) MB+0.5%✅⬆️
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)+0.6%✅⬆️
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms362.33 ± (360.62 - 364.04) ms363.69 ± (362.27 - 365.10) ms+0.4%✅⬆️
process.time_to_main_ms426.00 ± (425.47 - 426.54) ms428.42 ± (427.83 - 429.01) ms+0.6%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed47.95 ± (47.92 - 47.98) MB47.94 ± (47.91 - 47.97) MB-0.0%
runtime.dotnet.threads.count29 ± (29 - 29)29 ± (29 - 29)+0.2%✅⬆️
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 (7991) - mean (69ms)  : 67, 70
    master - mean (69ms)  : 67, 70

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

    section CallTarget+Inlining+NGEN
    This PR (7991) - mean (1,012ms)  : 965, 1060
    master - mean (1,008ms)  : 959, 1058

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

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

    section CallTarget+Inlining+NGEN
    This PR (7991) - mean (710ms)  : 682, 737
    master - mean (709ms)  : 681, 738

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

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

    section CallTarget+Inlining+NGEN
    This PR (7991) - mean (668ms)  : 648, 687
    master - mean (663ms)  : 644, 683

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

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

    section CallTarget+Inlining+NGEN
    This PR (7991) - mean (628ms)  : 614, 643
    master - mean (634ms)  : 619, 648

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 (7991) - mean (194ms)  : 190, 199
    master - mean (193ms)  : 189, 197

    section Bailout
    This PR (7991) - mean (197ms)  : 194, 201
    master - mean (196ms)  : 194, 199

    section CallTarget+Inlining+NGEN
    This PR (7991) - mean (1,117ms)  : 1054, 1180
    master - mean (1,119ms)  : 1052, 1186

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 (7991) - mean (277ms)  : 272, 283
    master - mean (276ms)  : 270, 282

    section Bailout
    This PR (7991) - mean (279ms)  : 273, 284
    master - mean (276ms)  : 273, 280

    section CallTarget+Inlining+NGEN
    This PR (7991) - mean (914ms)  : 867, 960
    master - mean (904ms)  : 856, 952

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

    section Bailout
    This PR (7991) - mean (271ms)  : 264, 277
    master - mean (269ms)  : 266, 272

    section CallTarget+Inlining+NGEN
    This PR (7991) - mean (889ms)  : 844, 934
    master - mean (885ms)  : 847, 923

Loading
HttpMessageHandler (.NET 8)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (7991) - mean (268ms)  : 264, 272
    master - mean (268ms)  : 264, 273

    section Bailout
    This PR (7991) - mean (269ms)  : 265, 274
    master - mean (269ms)  : 266, 272

    section CallTarget+Inlining+NGEN
    This PR (7991) - mean (823ms)  : 797, 848
    master - mean (820ms)  : 801, 839

Loading

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

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants