Skip to content

[Debugger] DEBUG-4260 Add capture expression to log probe#8621

Merged
dudikeleti merged 8 commits into
masterfrom
dudik/debugger/capture-expression
May 15, 2026
Merged

[Debugger] DEBUG-4260 Add capture expression to log probe#8621
dudikeleti merged 8 commits into
masterfrom
dudik/debugger/capture-expression

Conversation

@dudikeleti

@dudikeleti dudikeleti commented May 12, 2026

Copy link
Copy Markdown
Contributor

Summary of changes

  • Adds capture expressions support for non-snapshot log probes.
  • Allows capture-expression probes to emit selected values without capturing full arguments or locals.
  • Adds debugger integration test scenarios and approved snapshots for method, line, complex, and multi-probe capture-expression cases.
  • Publishes probe processor configuration as a captured per-invocation state, so concurrent probe updates cannot mix old and new probe info, evaluator inputs, or capture-expression settings.

Reason for change

  • Enables Dynamic Instrumentation log probes to capture targeted values with lower payload size and less exposure than full snapshots.
  • Supports richer expression-based capture scenarios while preserving existing log probe behavior.
  • The processor state publication fix addresses a pre-existing update race, but this PR adds new capture-expression state to the same processor configuration group. Fixing it here keeps the new feature from increasing the risk of mixed old/new probe configuration during concurrent updates.
  • Keeping the concurrency fix in this PR also avoids splitting tightly overlapping ProbeProcessor and debugger invocation changes across multiple PRs, which would likely create conflict-heavy follow-up work.

Implementation details

  • Capture expressions are compiled through the object-valued expression parser path because expressions can return arbitrary runtime values.
  • UndefinedValue is used as a sentinel for expressions that do not produce a capturable value, so null can remain a valid captured value.
  • Capture-expression-only log probes use snapshot serialization for selected values but skip full locals/arguments capture.
  • Probe processor updates now publish an immutable ProbeProcessorState instead of mutating evaluator inputs, expression fields, capture-expression state, and ProbeInfo in place.

Test coverage

  • ProbeProcessorTests|DebuggerExpressionLanguageTests|Debugger.DebuggerSnapshotCreatorTests|ProbeConfigurationComparerTests|ProbeConfigurationFileLoaderTests
  • IntegrationTests.ProbesTests.CaptureExpressionProbeTest

@dudikeleti
dudikeleti marked this pull request as ready for review May 12, 2026 21:59
@dudikeleti
dudikeleti requested review from a team as code owners May 12, 2026 21:59
@dd-trace-dotnet-ci-bot

dd-trace-dotnet-ci-bot Bot commented May 12, 2026

Copy link
Copy Markdown

Execution-Time Benchmarks Report ⏱️

Execution-time results for samples comparing This PR (8621) 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.35 ± (72.64 - 73.23) ms72.66 ± (72.63 - 72.98) ms+0.4%✅⬆️
.NET Framework 4.8 - Bailout
duration76.54 ± (76.59 - 77.01) ms76.35 ± (76.27 - 76.62) ms-0.2%
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1104.05 ± (1102.66 - 1109.13) ms1108.18 ± (1108.71 - 1116.94) ms+0.4%✅⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms22.38 ± (22.34 - 22.42) ms22.49 ± (22.45 - 22.53) ms+0.5%✅⬆️
process.time_to_main_ms83.78 ± (83.60 - 83.95) ms84.53 ± (84.33 - 84.73) ms+0.9%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.91 ± (10.91 - 10.92) MB10.92 ± (10.92 - 10.92) MB+0.1%✅⬆️
runtime.dotnet.threads.count12 ± (12 - 12)12 ± (12 - 12)+0.0%
.NET Core 3.1 - Bailout
process.internal_duration_ms22.70 ± (22.64 - 22.75) ms22.34 ± (22.29 - 22.38) ms-1.6%
process.time_to_main_ms88.07 ± (87.72 - 88.42) ms85.17 ± (84.99 - 85.35) ms-3.3%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.95 ± (10.94 - 10.95) MB10.96 ± (10.96 - 10.96) MB+0.1%✅⬆️
runtime.dotnet.threads.count13 ± (13 - 13)13 ± (13 - 13)+0.0%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms212.39 ± (211.27 - 213.51) ms215.05 ± (214.24 - 215.86) ms+1.3%✅⬆️
process.time_to_main_ms534.72 ± (533.32 - 536.13) ms540.50 ± (539.18 - 541.82) ms+1.1%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed48.40 ± (48.37 - 48.43) MB48.46 ± (48.43 - 48.48) MB+0.1%✅⬆️
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)-0.8%
.NET 6 - Baseline
process.internal_duration_ms21.66 ± (21.60 - 21.73) ms21.12 ± (21.09 - 21.15) ms-2.5%
process.time_to_main_ms76.06 ± (75.75 - 76.37) ms72.99 ± (72.83 - 73.16) ms-4.0%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.62 ± (10.61 - 10.62) MB10.64 ± (10.64 - 10.64) MB+0.2%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 6 - Bailout
process.internal_duration_ms21.33 ± (21.29 - 21.37) ms21.05 ± (21.01 - 21.09) ms-1.3%
process.time_to_main_ms75.23 ± (75.05 - 75.40) ms73.64 ± (73.51 - 73.78) ms-2.1%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.73 ± (10.73 - 10.74) 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_ms377.04 ± (374.96 - 379.11) ms376.22 ± (374.36 - 378.08) ms-0.2%
process.time_to_main_ms538.11 ± (536.85 - 539.37) ms538.80 ± (537.58 - 540.02) ms+0.1%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed49.91 ± (49.88 - 49.94) MB49.88 ± (49.85 - 49.90) MB-0.1%
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)+0.2%✅⬆️
.NET 8 - Baseline
process.internal_duration_ms19.35 ± (19.32 - 19.38) ms19.71 ± (19.64 - 19.77) ms+1.8%✅⬆️
process.time_to_main_ms72.02 ± (71.85 - 72.19) ms74.94 ± (74.61 - 75.27) ms+4.1%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.67 ± (7.67 - 7.68) MB7.67 ± (7.67 - 7.68) MB-0.0%
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 8 - Bailout
process.internal_duration_ms19.77 ± (19.71 - 19.82) ms19.33 ± (19.29 - 19.37) ms-2.2%
process.time_to_main_ms75.96 ± (75.67 - 76.25) ms73.73 ± (73.56 - 73.89) ms-2.9%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.73 ± (7.72 - 7.73) MB7.73 ± (7.72 - 7.74) MB+0.0%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms294.91 ± (292.53 - 297.29) ms295.62 ± (293.36 - 297.87) ms+0.2%✅⬆️
process.time_to_main_ms493.99 ± (492.93 - 495.05) ms496.40 ± (495.14 - 497.67) ms+0.5%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed36.91 ± (36.88 - 36.93) MB36.88 ± (36.85 - 36.91) MB-0.1%
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.97 ± (198.36 - 199.30) ms198.98 ± (198.74 - 199.63) ms+0.0%✅⬆️
.NET Framework 4.8 - Bailout
duration202.92 ± (202.28 - 203.20) ms203.05 ± (202.95 - 203.95) ms+0.1%✅⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1195.70 ± (1196.39 - 1202.13) ms1197.82 ± (1196.83 - 1202.53) ms+0.2%✅⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms195.39 ± (194.87 - 195.90) ms193.51 ± (193.02 - 194.00) ms-1.0%
process.time_to_main_ms84.31 ± (84.03 - 84.58) ms83.58 ± (83.34 - 83.82) ms-0.9%
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.05 ± (16.03 - 16.08) MB16.01 ± (16.00 - 16.03) MB-0.3%
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (20 - 20)+0.2%✅⬆️
.NET Core 3.1 - Bailout
process.internal_duration_ms195.10 ± (194.59 - 195.61) ms193.13 ± (192.65 - 193.61) ms-1.0%
process.time_to_main_ms85.44 ± (85.16 - 85.72) ms85.12 ± (84.85 - 85.40) ms-0.4%
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.06 ± (16.04 - 16.08) MB16.04 ± (16.01 - 16.06) MB-0.1%
runtime.dotnet.threads.count21 ± (21 - 21)21 ± (21 - 21)+0.3%✅⬆️
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms391.20 ± (389.64 - 392.77) ms386.23 ± (384.88 - 387.58) ms-1.3%
process.time_to_main_ms532.42 ± (531.46 - 533.39) ms532.08 ± (530.94 - 533.22) ms-0.1%
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed57.78 ± (57.55 - 58.01) MB57.25 ± (57.07 - 57.44) MB-0.9%
runtime.dotnet.threads.count30 ± (30 - 30)30 ± (30 - 30)-0.1%
.NET 6 - Baseline
process.internal_duration_ms198.81 ± (198.32 - 199.30) ms197.74 ± (197.19 - 198.30) ms-0.5%
process.time_to_main_ms72.78 ± (72.50 - 73.07) ms72.33 ± (72.11 - 72.56) ms-0.6%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.21 ± (16.19 - 16.24) MB16.38 ± (16.36 - 16.40) MB+1.0%✅⬆️
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)+0.3%✅⬆️
.NET 6 - Bailout
process.internal_duration_ms198.58 ± (198.22 - 198.93) ms197.02 ± (196.44 - 197.60) ms-0.8%
process.time_to_main_ms73.74 ± (73.56 - 73.92) ms72.85 ± (72.63 - 73.07) ms-1.2%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.31 ± (16.28 - 16.34) MB16.44 ± (16.41 - 16.47) MB+0.8%✅⬆️
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (20 - 20)-0.5%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms594.03 ± (591.36 - 596.71) ms590.40 ± (587.88 - 592.91) ms-0.6%
process.time_to_main_ms533.30 ± (532.45 - 534.15) ms533.07 ± (531.87 - 534.26) ms-0.0%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed61.34 ± (61.24 - 61.44) MB61.03 ± (60.93 - 61.13) MB-0.5%
runtime.dotnet.threads.count31 ± (31 - 31)31 ± (31 - 31)+0.0%✅⬆️
.NET 8 - Baseline
process.internal_duration_ms196.52 ± (195.95 - 197.09) ms195.03 ± (194.55 - 195.51) ms-0.8%
process.time_to_main_ms72.03 ± (71.79 - 72.28) ms71.22 ± (71.01 - 71.42) ms-1.1%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.70 ± (11.68 - 11.72) MB11.68 ± (11.66 - 11.70) MB-0.1%
runtime.dotnet.threads.count18 ± (18 - 18)18 ± (18 - 18)-0.6%
.NET 8 - Bailout
process.internal_duration_ms195.59 ± (195.01 - 196.17) ms195.13 ± (194.65 - 195.61) ms-0.2%
process.time_to_main_ms72.93 ± (72.68 - 73.18) ms72.76 ± (72.56 - 72.97) ms-0.2%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.74 ± (11.72 - 11.75) MB11.73 ± (11.71 - 11.75) MB-0.1%
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)-0.7%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms515.59 ± (513.35 - 517.84) ms517.31 ± (514.63 - 519.98) ms+0.3%✅⬆️
process.time_to_main_ms491.63 ± (490.86 - 492.40) ms492.18 ± (491.26 - 493.10) ms+0.1%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed50.55 ± (50.52 - 50.59) MB50.61 ± (50.57 - 50.65) MB+0.1%✅⬆️
runtime.dotnet.threads.count30 ± (29 - 30)30 ± (30 - 30)+0.8%✅⬆️
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 (8621) - mean (73ms)  : 70, 75
    master - mean (73ms)  : 68, 77

    section Bailout
    This PR (8621) - mean (76ms)  : 74, 78
    master - mean (77ms)  : 74, 80

    section CallTarget+Inlining+NGEN
    This PR (8621) - mean (1,113ms)  : 1054, 1172
    master - mean (1,106ms)  : 1059, 1153

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 (8621) - mean (114ms)  : 110, 117
    master - mean (113ms)  : 109, 116

    section Bailout
    This PR (8621) - mean (114ms)  : 111, 117
    master - mean (118ms)  : 110, 126

    section CallTarget+Inlining+NGEN
    This PR (8621) - mean (793ms)  : 760, 825
    master - mean (785ms)  : 758, 812

Loading
FakeDbCommand (.NET 6)
gantt
    title Execution time (ms) FakeDbCommand (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8621) - mean (100ms)  : 97, 104
    master - mean (104ms)  : 98, 110

    section Bailout
    This PR (8621) - mean (101ms)  : 98, 103
    master - mean (103ms)  : 99, 107

    section CallTarget+Inlining+NGEN
    This PR (8621) - mean (946ms)  : 900, 992
    master - mean (944ms)  : 901, 987

Loading
FakeDbCommand (.NET 8)
gantt
    title Execution time (ms) FakeDbCommand (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8621) - mean (103ms)  : 97, 109
    master - mean (99ms)  : 96, 102

    section Bailout
    This PR (8621) - mean (101ms)  : 98, 103
    master - mean (104ms)  : 98, 110

    section CallTarget+Inlining+NGEN
    This PR (8621) - mean (823ms)  : 787, 859
    master - mean (821ms)  : 786, 856

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 (8621) - mean (199ms)  : 194, 204
    master - mean (199ms)  : 192, 205

    section Bailout
    This PR (8621) - mean (203ms)  : 198, 209
    master - mean (203ms)  : 198, 207

    section CallTarget+Inlining+NGEN
    This PR (8621) - mean (1,200ms)  : 1159, 1240
    master - mean (1,199ms)  : 1157, 1241

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 (8621) - mean (286ms)  : 277, 296
    master - mean (289ms)  : 282, 296

    section Bailout
    This PR (8621) - mean (287ms)  : 279, 296
    master - mean (289ms)  : 282, 296

    section CallTarget+Inlining+NGEN
    This PR (8621) - mean (959ms)  : 935, 984
    master - mean (964ms)  : 940, 988

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

    section Bailout
    This PR (8621) - mean (279ms)  : 273, 285
    master - mean (281ms)  : 276, 286

    section CallTarget+Inlining+NGEN
    This PR (8621) - mean (1,155ms)  : 1119, 1190
    master - mean (1,156ms)  : 1120, 1193

Loading
HttpMessageHandler (.NET 8)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8621) - mean (276ms)  : 266, 287
    master - mean (279ms)  : 273, 285

    section Bailout
    This PR (8621) - mean (278ms)  : 272, 284
    master - mean (279ms)  : 271, 286

    section CallTarget+Inlining+NGEN
    This PR (8621) - mean (1,042ms)  : 999, 1086
    master - mean (1,039ms)  : 1003, 1076

Loading

@dudikeleti
dudikeleti force-pushed the dudik/debugger/capture-expression branch from e03064f to 1e4d76d Compare May 13, 2026 09:33
@dudikeleti
dudikeleti requested a review from Copilot May 13, 2026 09:58

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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@pr-commenter

pr-commenter Bot commented May 13, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-05-15 14:15:27

Comparing candidate commit e0164db in PR branch dudik/debugger/capture-expression with baseline commit d63034b in branch master.

Some scenarios are present only in baseline or only in candidate runs. If you didn't create or remove some scenarios in your branch, this maybe a sign of crashed benchmarks 💥💥💥
Check Gitlab CI job log to find if any benchmark has crashed.

Scenarios present only in baseline:

  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_GetContext_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_AddEvent_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_UpdateName_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_SetAttributes_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_AddEvent_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_SetAttributes_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_SetStatus_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_GetContext_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan net472
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_AddEvent_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_UpdateName_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_UpdateName_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_SetAttributes_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_SetStatus_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_SetAttributes_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_UpdateName_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_RecordException_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_UpdateName_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_SetStatus_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_GetContext_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan net472
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_SetStatus_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_AddEvent_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_SetAttributes_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_AddEvent_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_GetContext_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_UpdateName_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_AddEvent_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_GetContext_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_GetContext_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_SetStatus_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_SetStatus_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_RecordException_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_RecordException_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_SetAttributes_Sampled net6.0

Found 3 performance improvements and 3 performance regressions! Performance is the same for 47 metrics, 19 unstable metrics, 85 known flaky benchmarks, 41 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.OpenTelemetry.InstrumentedApi.Trace.TracerBenchmark.StartRootSpan net6.0

  • 🟥 allocated_mem [+143 bytes; +144 bytes] or [+10.108%; +10.117%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TracerBenchmark.StartSpan net6.0

  • 🟩 allocated_mem [-144 bytes; -143 bytes] or [-9.188%; -9.180%]

scenario:Benchmarks.Trace.HttpClientBenchmark.SendAsync net6.0

  • 🟥 throughput [-69161.869op/s; -62557.450op/s] or [-46.983%; -42.496%]
  • 🟩 execution_time [-44.124ms; -29.211ms] or [-21.896%; -14.496%]

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

  • 🟥 throughput [-50980.013op/s; -33672.721op/s] or [-25.562%; -16.884%]

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

  • 🟩 execution_time [-91.779ms; -88.735ms] or [-46.708%; -45.159%]

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.ActivityBenchmark.StartSpan net6.0

  • unstable execution_time [+5.563ms; +23.536ms] or [+4.472%; +18.919%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan netcoreapp3.1

  • unstable execution_time [+9.615ms; +34.628ms] or [+10.749%; +38.713%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_AddEvent_Sampled net6.0

  • unstable execution_time [-34.161ms; -12.427ms] or [-22.267%; -8.100%]
  • unstable throughput [+10364.566op/s; +27547.428op/s] or [+7.337%; +19.500%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_AddEvent_Sampled netcoreapp3.1

  • unstable execution_time [+9.902ms; +34.493ms] or [+11.152%; +38.846%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_GetContext_Sampled net6.0

  • unstable execution_time [-38.383ms; +0.022ms] or [-23.135%; +0.013%]
  • unstable throughput [-6079.616op/s; +25625.191op/s] or [-3.929%; +16.559%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_GetContext_Sampled netcoreapp3.1

  • unstable execution_time [-15.787ms; +19.364ms] or [-14.222%; +17.444%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_SetStatus_Sampled net6.0

  • unstable execution_time [-32.095ms; +4.210ms] or [-21.051%; +2.761%]
  • unstable throughput [-3665.426op/s; +23883.463op/s] or [-2.177%; +14.183%]

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

  • unstable execution_time [-14.648ms; +21.256ms] or [-13.664%; +19.828%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_UpdateName_Sampled net6.0

  • unstable execution_time [-90.989ms; -54.783ms] or [-42.472%; -25.572%]
  • unstable throughput [+23555.137op/s; +57328.445op/s] or [+17.971%; +43.739%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_UpdateName_Sampled netcoreapp3.1

  • unstable execution_time [-63.955ms; -25.226ms] or [-41.261%; -16.275%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan net6.0

  • 🟩 allocated_mem [-144 bytes; -143 bytes] or [-9.188%; -9.180%]
  • unstable execution_time [-37.047ms; +1.757ms] or [-21.825%; +1.035%]
  • unstable throughput [+14607.528op/s; +43070.112op/s] or [+10.955%; +32.300%]

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

  • unstable execution_time [-16.663ms; +19.533ms] or [-15.274%; +17.904%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_AddEvent_Sampled net6.0

  • unstable execution_time [-70.183ms; -27.827ms] or [-35.503%; -14.076%]
  • unstable throughput [+23949.598op/s; +50053.631op/s] or [+21.876%; +45.719%]

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

  • unstable execution_time [+11.639ms; +36.283ms] or [+13.586%; +42.349%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_GetContext_Sampled net6.0

  • 🟥 allocated_mem [+143 bytes; +144 bytes] or [+10.108%; +10.117%]
  • unstable execution_time [-16.116ms; +8.518ms] or [-11.175%; +5.907%]
  • 🟩 throughput [+10179.723op/s; +17133.647op/s] or [+6.440%; +10.840%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_RecordException_Sampled net6.0

  • unstable execution_time [-32.717ms; -7.118ms] or [-26.745%; -5.818%]
  • unstable throughput [+4182.094op/s; +26567.643op/s] or [+3.369%; +21.404%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetAttributes_Sampled net6.0

  • unstable execution_time [-32.988ms; +7.299ms] or [-18.934%; +4.189%]
  • unstable throughput [-1033.933op/s; +19138.232op/s] or [-0.946%; +17.515%]

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

  • unstable execution_time [-35.170ms; -9.523ms] or [-31.513%; -8.533%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetStatus_Sampled net6.0

  • unstable execution_time [+11.038ms; +28.206ms] or [+9.062%; +23.157%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_UpdateName_Sampled net6.0

  • unstable execution_time [-43.990ms; -10.755ms] or [-29.070%; -7.107%]
  • unstable throughput [+6692.265op/s; +29492.534op/s] or [+4.159%; +18.330%]

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

  • unstable execution_time [-15.242ms; +19.966ms] or [-13.877%; +18.178%]

scenario:Benchmarks.Trace.ActivityBenchmark.StartStopWithChild net472

  • 🟥 throughput [-7488.250op/s; -6578.553op/s] or [-8.879%; -7.800%]

scenario:Benchmarks.Trace.ActivityBenchmark.StartStopWithChild net6.0

  • 🟥 execution_time [+12.275ms; +31.438ms] or [+6.124%; +15.684%]
  • 🟥 throughput [-71294.165op/s; -66873.596op/s] or [-59.926%; -56.210%]

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

  • unstable execution_time [-88.844ms; -65.555ms] or [-44.686%; -32.972%]
  • 🟥 throughput [-7106.343op/s; -5634.060op/s] or [-7.226%; -5.729%]

scenario:Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • 🟥 execution_time [+316.680ms; +332.510ms] or [+157.148%; +165.003%]
  • 🟥 throughput [-56.263op/s; -43.770op/s] or [-10.123%; -7.875%]

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

  • unstable execution_time [+107.805ms; +153.467ms] or [+85.173%; +121.248%]
  • unstable throughput [-7.081op/s; +72.499op/s] or [-0.934%; +9.559%]

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

  • 🟥 execution_time [+83.698ms; +84.494ms] or [+74.070%; +74.774%]

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 [+439 bytes; +440 bytes] or [+9.299%; +9.310%]
  • unstable execution_time [-45.551ms; -21.413ms] or [-21.274%; -10.001%]
  • unstable throughput [-36530.873op/s; -21102.805op/s] or [-26.665%; -15.404%]

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

  • 🟥 allocated_mem [+1.272KB; +1.272KB] or [+27.500%; +27.510%]
  • unstable execution_time [-65.656ms; -43.746ms] or [-31.265%; -20.831%]

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

  • 🟥 allocated_mem [+1.307KB; +1.307KB] or [+105.743%; +105.758%]
  • 🟥 throughput [-269361.722op/s; -262978.467op/s] or [-27.503%; -26.851%]

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

  • 🟥 allocated_mem [+439 bytes; +440 bytes] or [+35.945%; +35.954%]
  • 🟩 execution_time [-109.400ms; -87.557ms] or [-48.787%; -39.046%]
  • unstable throughput [-165625.251op/s; -68102.857op/s] or [-17.694%; -7.276%]

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

  • 🟥 allocated_mem [+1.272KB; +1.272KB] or [+105.288%; +105.304%]
  • unstable execution_time [-42.692ms; -19.063ms] or [-21.310%; -9.515%]
  • 🟥 throughput [-136067.756op/s; -119000.503op/s] or [-19.550%; -17.098%]

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

  • 🟥 throughput [-40331.977op/s; -28507.792op/s] or [-25.663%; -18.139%]

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

  • 🟩 execution_time [-60.968ms; -44.988ms] or [-31.083%; -22.936%]
  • 🟩 throughput [+10214.408op/s; +13002.884op/s] or [+8.137%; +10.358%]

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

  • 🟩 execution_time [-68.549ms; -54.399ms] or [-33.892%; -26.896%]

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

  • 🟩 execution_time [-17.849ms; -13.372ms] or [-8.228%; -6.164%]
  • 🟩 throughput [+166276.728op/s; +223855.165op/s] or [+6.600%; +8.885%]

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

  • 🟥 execution_time [+301.695ms; +315.675ms] or [+150.747%; +157.732%]

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

  • unstable execution_time [+211.057ms; +259.008ms] or [+106.436%; +130.618%]

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

  • unstable execution_time [+252.104ms; +289.511ms] or [+126.990%; +145.833%]

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

  • 🟥 execution_time [+298.704ms; +312.393ms] or [+146.711%; +153.435%]

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

  • 🟥 execution_time [+244.296ms; +261.396ms] or [+119.427%; +127.787%]

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

  • 🟥 execution_time [+277.025ms; +291.821ms] or [+138.457%; +145.852%]

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

  • 🟥 execution_time [+18.939µs; +42.538µs] or [+6.046%; +13.580%]
  • 🟥 throughput [-399.712op/s; -201.093op/s] or [-12.460%; -6.269%]

scenario:Benchmarks.Trace.AspNetCoreBenchmark.SendRequest net472

  • 🟥 execution_time [+300.182ms; +300.907ms] or [+149.822%; +150.183%]

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

  • unstable execution_time [+355.084ms; +367.155ms] or [+385.813%; +398.929%]
  • 🟥 throughput [-6839.901op/s; -6676.051op/s] or [-56.204%; -54.858%]

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

  • unstable execution_time [+182.226ms; +247.478ms] or [+138.362%; +187.908%]
  • 🟥 throughput [-1310.736op/s; -1064.043op/s] or [-12.689%; -10.301%]

scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • 🟥 execution_time [+293.234ms; +308.557ms] or [+134.826%; +141.872%]
  • 🟥 throughput [-679.112op/s; -661.789op/s] or [-61.534%; -59.965%]

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

  • unstable execution_time [-57.734ms; +75.911ms] or [-24.604%; +32.350%]
  • 🟥 throughput [-685.979op/s; -596.617op/s] or [-45.755%; -39.795%]

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

  • 🟥 allocated_mem [+2.305KB; +2.308KB] or [+5.442%; +5.450%]
  • 🟥 execution_time [+341.107ms; +349.352ms] or [+204.022%; +208.953%]
  • 🟥 throughput [-728.531op/s; -694.456op/s] or [-50.727%; -48.354%]

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

  • 🟩 execution_time [-186.847µs; -160.942µs] or [-9.465%; -8.153%]
  • 🟩 throughput [+45.255op/s; +53.346op/s] or [+8.934%; +10.531%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch net472

  • 🟥 execution_time [+305.869ms; +319.010ms] or [+154.030%; +160.647%]

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

  • 🟥 execution_time [+250.765ms; +260.930ms] or [+125.659%; +130.752%]

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

  • 🟥 execution_time [+298.706ms; +305.829ms] or [+150.057%; +153.635%]
  • 🟩 throughput [+24195.090op/s; +34701.801op/s] or [+5.097%; +7.310%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync net472

  • 🟥 execution_time [+302.946ms; +316.753ms] or [+152.129%; +159.063%]

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

  • 🟥 execution_time [+214.878ms; +223.475ms] or [+106.247%; +110.498%]

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

  • 🟥 execution_time [+306.207ms; +313.792ms] or [+155.199%; +159.044%]

scenario:Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync net472

  • 🟥 execution_time [+300.827ms; +315.173ms] or [+150.988%; +158.188%]

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

  • 🟥 execution_time [+304.778ms; +312.319ms] or [+151.904%; +155.662%]
  • 🟩 throughput [+32078.423op/s; +43655.378op/s] or [+6.370%; +8.669%]

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

  • 🟥 execution_time [+303.435ms; +310.441ms] or [+150.956%; +154.442%]

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

  • unstable execution_time [-90.345ms; -63.034ms] or [-42.011%; -29.311%]
  • unstable throughput [-105948.647op/s; -59139.903op/s] or [-29.065%; -16.224%]

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

  • unstable execution_time [-86.781ms; -64.135ms] or [-43.531%; -32.171%]

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

  • 🟩 allocated_mem [-24.677KB; -24.656KB] or [-9.002%; -8.994%]
  • unstable execution_time [-62.094µs; -3.771µs] or [-12.273%; -0.745%]
  • unstable throughput [+35.641op/s; +245.463op/s] or [+1.779%; +12.249%]

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

  • 🟩 allocated_mem [-15.254KB; -15.236KB] or [-5.561%; -5.554%]
  • 🟩 throughput [+94.124op/s; +255.497op/s] or [+5.377%; +14.597%]

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

  • unstable execution_time [+4.932µs; +10.383µs] or [+11.658%; +24.541%]
  • 🟥 throughput [-4428.966op/s; -2342.988op/s] or [-18.645%; -9.863%]

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

  • unstable execution_time [-13.822µs; -3.836µs] or [-21.445%; -5.951%]
  • unstable throughput [+1340.520op/s; +3398.509op/s] or [+8.225%; +20.851%]

scenario:Benchmarks.Trace.Log4netBenchmark.EnrichedLog net472

  • 🟥 execution_time [+305.581ms; +319.423ms] or [+154.458%; +161.454%]

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

  • unstable execution_time [+276.382ms; +297.201ms] or [+140.678%; +151.274%]

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

  • 🟥 execution_time [+300.642ms; +305.692ms] or [+150.508%; +153.037%]

scenario:Benchmarks.Trace.RedisBenchmark.SendReceive net6.0

  • unstable execution_time [-71.502ms; -44.162ms] or [-35.740%; -22.074%]
  • unstable throughput [-185430.363op/s; -128007.908op/s] or [-35.098%; -24.229%]

scenario:Benchmarks.Trace.RedisBenchmark.SendReceive netcoreapp3.1

  • unstable execution_time [-56.953ms; -25.741ms] or [-28.869%; -13.048%]

scenario:Benchmarks.Trace.SerilogBenchmark.EnrichedLog net472

  • 🟥 execution_time [+300.111ms; +314.114ms] or [+149.578%; +156.558%]

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

  • unstable execution_time [+198.806ms; +257.151ms] or [+99.831%; +129.129%]

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

  • 🟥 execution_time [+304.596ms; +310.027ms] or [+154.471%; +157.226%]

scenario:Benchmarks.Trace.SingleSpanAspNetCoreBenchmark.SingleSpanAspNetCore net472

  • 🟥 execution_time [+299.747ms; +301.084ms] or [+149.515%; +150.182%]
  • 🟩 throughput [+59794175.791op/s; +60305566.014op/s] or [+43.546%; +43.918%]

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

  • unstable execution_time [+374.371ms; +387.156ms] or [+465.597%; +481.497%]
  • 🟥 throughput [-7432.882op/s; -7227.588op/s] or [-57.460%; -55.873%]

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

  • 🟥 execution_time [+304.050ms; +307.552ms] or [+151.653%; +153.400%]
  • 🟥 throughput [-30616839.660op/s; -29085892.808op/s] or [-13.561%; -12.883%]

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

  • unstable execution_time [-59.949ms; -15.498ms] or [-29.362%; -7.590%]
  • unstable throughput [-294029.612op/s; -102057.434op/s] or [-27.453%; -9.529%]

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

  • unstable execution_time [-89.975ms; -68.737ms] or [-45.528%; -34.781%]

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

  • unstable execution_time [-79.787ms; -59.939ms] or [-41.569%; -31.228%]
  • unstable throughput [-107167.417op/s; +36364.677op/s] or [-8.295%; +2.815%]

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

  • unstable execution_time [-74.594ms; -47.673ms] or [-36.649%; -23.422%]
  • 🟩 throughput [+99180.827op/s; +106703.169op/s] or [+9.850%; +10.597%]

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

  • unstable execution_time [-48.372ms; -16.213ms] or [-24.157%; -8.097%]
  • unstable throughput [-178463.134op/s; -95046.724op/s] or [-32.406%; -17.259%]

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

  • unstable execution_time [-88.909ms; -67.350ms] or [-44.671%; -33.839%]

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

  • 🟩 execution_time [-109.585ms; -105.248ms] or [-54.812%; -52.642%]
  • 🟩 throughput [+55709.190op/s; +80732.557op/s] or [+6.224%; +9.020%]

scenario:Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin netcoreapp3.1

  • unstable execution_time [-74.996ms; -46.208ms] or [-38.089%; -23.468%]

Known flaky benchmarks without significant changes:

  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_AddEvent_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_GetContext_Sampled net472
  • 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_UpdateName_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_AddEvent_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_GetContext_Sampled net472
  • 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 netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetAttributes_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetStatus_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetStatus_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_UpdateName_Sampled net472
  • 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.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.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark net472
  • scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark net472
  • scenario:Benchmarks.Trace.RedisBenchmark.SendReceive net472
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishScope net472
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishSpan net472
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishTwoScopes net472
  • scenario:Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin net472

@andrewlock andrewlock left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I haven't reviewed the debugger side really, not sure it needs an APM review!


public CompiledExpression<object>[]? GetOrCompileCaptureExpressions(ProbeExpressionEvaluator evaluator, MethodScopeMembers scopeMembers)
{
if (Volatile.Read(ref _captureExpressionsCompiledInitialized) == 1)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I would mark the field _captureExpressionsCompiledInitialized as volatile. This could avoid forgetting to use Volatile.Read if used at other places

@dudikeleti dudikeleti May 15, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I would have to do that for others as well, maybe in a follow-up pr

for example:

if (Volatile.Read(ref _compiledInitialized) == 1)
{
    return _compiled;
}

Comment on lines +41 to +42
// The instance is not published until after construction, so a plain assignment is sufficient here.
_state = ProbeProcessorState.Create(probe);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Feels wrong to me. I would declare the field volatile here.

Even if the instance is published after the creation there is no guarantee that the other thread reading through the call to TryBeginProcess.
Do you have strong guarantee that after execution of the constructor all your fields are written and "flushed" via memory barrier? because otherwise this is what can happen with instruction reordering:

T1 T2
create ProbeProcessor -
published instance if (instance != null)
- call to TryBeginProcess()
call to constructor and store into _state

in Java we have this guarantee with final fields ( equivalent of readonly field)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

to be clearer, your code would work on x86 because the writes cannot be reordered on this arch, but not true for ARM and requires a hardware memory barrier.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

You’re right, I improved the comment.

78f84fd

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Even with this comment I found that fragile: The day you change the way your ProbeProcessor is created then you have the publication issue.
I would avoid to rely on external (outside of the class) memory barrier here

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Personally, I think it was ok, but I trust your judgment. Fixed. e0164db

Comment thread tracer/src/Datadog.Trace/Debugger/Expressions/ProbeProcessor.cs Outdated
@dudikeleti
dudikeleti force-pushed the dudik/debugger/capture-expression branch from 1e4d76d to c051c9a Compare May 15, 2026 11:38
@dudikeleti
dudikeleti enabled auto-merge (squash) May 15, 2026 12:06
@dudikeleti
dudikeleti force-pushed the dudik/debugger/capture-expression branch from c051c9a to fcda9a0 Compare May 15, 2026 12:11
@dudikeleti
dudikeleti merged commit 10598a9 into master May 15, 2026
139 of 140 checks passed
@dudikeleti
dudikeleti deleted the dudik/debugger/capture-expression branch May 15, 2026 14:43
@github-actions github-actions Bot added this to the vNext-v3 milestone May 15, 2026
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.

4 participants