Skip to content

[DSM] Fix missing produce-side checkpoints for Azure Service Bus#8433

Merged
robcarlan-datadog merged 17 commits into
masterfrom
rob/fix-asb-dsm-produce-checkpoint-v2
May 15, 2026
Merged

[DSM] Fix missing produce-side checkpoints for Azure Service Bus#8433
robcarlan-datadog merged 17 commits into
masterfrom
rob/fix-asb-dsm-produce-checkpoint-v2

Conversation

@robcarlan-datadog

@robcarlan-datadog robcarlan-datadog commented Apr 9, 2026

Copy link
Copy Markdown
Contributor

DSM produce checkpoints were missing for most Azure Service Bus send paths.

Fix: Move DSM injection to hooks that actually fire:

  • SendServiceBusMessagesIntegration (CreateDiagnosticScope) — covers SendMessageAsync and SendMessagesAsync(IEnumerable)
  • ServiceBusSenderScheduleMessagesAsyncIntegration — covers ScheduleMessagesAsync
  • SendServiceBusMessageBatchIntegration (TryAddMessage) — covers batch-with-links (pre-existing, unchanged)

Also removes the dead 3-step Activity chain (ActiveMessageProperties AsyncLocal + ApplicationPropertiesToMessageMap weak table + ActivityStopped DSM block) that was never reachable.

Tested the following in a DSM test app:

  1. SendMessageAsync(ServiceBusMessage) — single message send
  2. SendMessagesAsync(IEnumerable<ServiceBusMessage>) — collection send (including lazy LINQ sequences)
  3. SendMessagesAsync(ServiceBusMessageBatch) — pre-built batch via TryAddMessage
  4. ScheduleMessagesAsync(IEnumerable<ServiceBusMessage>, DateTimeOffset) — scheduled delivery

@dd-trace-dotnet-ci-bot

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

Copy link
Copy Markdown

Execution-Time Benchmarks Report ⏱️

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

✅ No regressions detected - check the details below

Full Metrics Comparison

FakeDbCommand

Metric Master (Mean ± 95% CI) Current (Mean ± 95% CI) Change Status
.NET Framework 4.8 - Baseline
duration74.68 ± (74.67 - 75.30) ms73.33 ± (73.19 - 73.62) ms-1.8%
.NET Framework 4.8 - Bailout
duration77.76 ± (77.79 - 78.20) ms79.74 ± (79.40 - 79.86) ms+2.5%✅⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1125.14 ± (1124.78 - 1130.94) ms1126.85 ± (1126.91 - 1134.09) ms+0.2%✅⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms22.51 ± (22.46 - 22.56) ms22.84 ± (22.77 - 22.91) ms+1.4%✅⬆️
process.time_to_main_ms85.36 ± (85.07 - 85.64) ms87.20 ± (86.91 - 87.50) ms+2.2%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.85 ± (10.84 - 10.85) MB10.91 ± (10.91 - 10.91) MB+0.6%✅⬆️
runtime.dotnet.threads.count12 ± (12 - 12)12 ± (12 - 12)+0.0%
.NET Core 3.1 - Bailout
process.internal_duration_ms22.38 ± (22.34 - 22.42) ms22.51 ± (22.48 - 22.54) ms+0.6%✅⬆️
process.time_to_main_ms86.11 ± (85.91 - 86.31) ms86.27 ± (86.05 - 86.48) ms+0.2%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.94 ± (10.94 - 10.94) MB10.94 ± (10.94 - 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_ms205.88 ± (205.33 - 206.44) ms205.59 ± (205.03 - 206.14) ms-0.1%
process.time_to_main_ms568.57 ± (567.21 - 569.92) ms571.35 ± (569.81 - 572.89) ms+0.5%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed49.84 ± (49.82 - 49.86) MB49.80 ± (49.77 - 49.83) MB-0.1%
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)+0.0%✅⬆️
.NET 6 - Baseline
process.internal_duration_ms21.11 ± (21.07 - 21.14) ms21.28 ± (21.23 - 21.33) ms+0.8%✅⬆️
process.time_to_main_ms73.15 ± (72.98 - 73.32) ms74.67 ± (74.42 - 74.93) ms+2.1%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.61 ± (10.60 - 10.61) MB10.63 ± (10.62 - 10.63) MB+0.2%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 6 - Bailout
process.internal_duration_ms21.01 ± (20.97 - 21.05) ms21.57 ± (21.51 - 21.63) ms+2.7%✅⬆️
process.time_to_main_ms73.97 ± (73.81 - 74.12) ms77.39 ± (77.13 - 77.66) ms+4.6%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.73 ± (10.72 - 10.73) MB10.74 ± (10.74 - 10.74) MB+0.1%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms353.03 ± (350.93 - 355.13) ms353.29 ± (351.37 - 355.20) ms+0.1%✅⬆️
process.time_to_main_ms564.28 ± (563.00 - 565.57) ms563.19 ± (561.82 - 564.56) ms-0.2%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed50.96 ± (50.94 - 50.99) MB51.14 ± (51.12 - 51.17) MB+0.4%✅⬆️
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)+0.0%✅⬆️
.NET 8 - Baseline
process.internal_duration_ms19.90 ± (19.84 - 19.97) ms19.55 ± (19.51 - 19.59) ms-1.8%
process.time_to_main_ms76.08 ± (75.78 - 76.38) ms72.89 ± (72.73 - 73.06) ms-4.2%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.66 ± (7.66 - 7.67) MB7.67 ± (7.66 - 7.68) MB+0.1%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 8 - Bailout
process.internal_duration_ms19.49 ± (19.44 - 19.53) ms19.80 ± (19.75 - 19.86) ms+1.6%✅⬆️
process.time_to_main_ms74.26 ± (74.06 - 74.46) ms75.07 ± (74.85 - 75.28) ms+1.1%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.71 ± (7.71 - 7.72) MB7.71 ± (7.71 - 7.72) MB-0.0%
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms284.58 ± (280.87 - 288.29) ms292.13 ± (287.69 - 296.57) ms+2.7%✅⬆️
process.time_to_main_ms525.30 ± (524.03 - 526.57) ms524.31 ± (522.91 - 525.71) ms-0.2%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed37.89 ± (37.86 - 37.91) MB37.87 ± (37.84 - 37.90) MB-0.0%
runtime.dotnet.threads.count27 ± (27 - 27)27 ± (27 - 28)+0.2%✅⬆️

HttpMessageHandler

Metric Master (Mean ± 95% CI) Current (Mean ± 95% CI) Change Status
.NET Framework 4.8 - Baseline
duration207.60 ± (209.38 - 212.24) ms208.12 ± (208.49 - 210.30) ms+0.2%✅⬆️
.NET Framework 4.8 - Bailout
duration211.11 ± (212.63 - 215.45) ms211.16 ± (211.77 - 213.41) ms+0.0%✅⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1308.19 ± (1311.81 - 1323.56) ms1284.88 ± (1285.27 - 1293.45) ms-1.8%
.NET Core 3.1 - Baseline
process.internal_duration_ms201.23 ± (200.21 - 202.25) ms203.29 ± (202.01 - 204.57) ms+1.0%✅⬆️
process.time_to_main_ms87.80 ± (87.29 - 88.31) ms88.57 ± (87.93 - 89.20) ms+0.9%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed15.95 ± (15.93 - 15.97) MB15.88 ± (15.86 - 15.90) MB-0.4%
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (20 - 20)+0.9%✅⬆️
.NET Core 3.1 - Bailout
process.internal_duration_ms201.32 ± (200.31 - 202.33) ms200.81 ± (199.82 - 201.80) ms-0.3%
process.time_to_main_ms88.58 ± (88.12 - 89.04) ms88.97 ± (88.46 - 89.47) ms+0.4%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed15.99 ± (15.97 - 16.01) MB15.96 ± (15.94 - 15.97) MB-0.2%
runtime.dotnet.threads.count21 ± (21 - 21)21 ± (21 - 21)-0.1%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms385.94 ± (384.67 - 387.21) ms387.05 ± (385.27 - 388.83) ms+0.3%✅⬆️
process.time_to_main_ms585.81 ± (583.95 - 587.66) ms584.84 ± (582.83 - 586.85) ms-0.2%
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed58.75 ± (58.62 - 58.88) MB58.84 ± (58.70 - 58.98) MB+0.2%✅⬆️
runtime.dotnet.threads.count30 ± (30 - 30)30 ± (30 - 30)-0.0%
.NET 6 - Baseline
process.internal_duration_ms210.46 ± (209.45 - 211.46) ms203.76 ± (202.93 - 204.60) ms-3.2%
process.time_to_main_ms77.40 ± (77.05 - 77.75) ms75.33 ± (74.95 - 75.71) ms-2.7%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.18 ± (16.16 - 16.20) MB16.27 ± (16.25 - 16.29) MB+0.6%✅⬆️
runtime.dotnet.threads.count20 ± (19 - 20)19 ± (19 - 19)-0.9%
.NET 6 - Bailout
process.internal_duration_ms210.05 ± (209.03 - 211.07) ms204.12 ± (203.28 - 204.96) ms-2.8%
process.time_to_main_ms78.73 ± (78.33 - 79.13) ms76.53 ± (76.16 - 76.90) ms-2.8%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.19 ± (16.17 - 16.21) MB16.30 ± (16.28 - 16.32) MB+0.7%✅⬆️
runtime.dotnet.threads.count20 ± (20 - 21)20 ± (20 - 20)-0.6%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms585.55 ± (580.24 - 590.87) ms570.68 ± (568.13 - 573.24) ms-2.5%
process.time_to_main_ms590.15 ± (587.73 - 592.57) ms577.86 ± (576.24 - 579.48) ms-2.1%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed61.98 ± (61.91 - 62.06) MB61.93 ± (61.89 - 61.97) MB-0.1%
runtime.dotnet.threads.count31 ± (31 - 31)31 ± (31 - 31)-0.3%
.NET 8 - Baseline
process.internal_duration_ms211.23 ± (209.71 - 212.76) ms205.71 ± (204.68 - 206.75) ms-2.6%
process.time_to_main_ms77.28 ± (76.86 - 77.70) ms75.91 ± (75.55 - 76.27) ms-1.8%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.52 ± (11.50 - 11.54) MB11.55 ± (11.53 - 11.57) MB+0.3%✅⬆️
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)-1.1%
.NET 8 - Bailout
process.internal_duration_ms210.28 ± (208.88 - 211.68) ms206.28 ± (205.29 - 207.26) ms-1.9%
process.time_to_main_ms78.58 ± (78.15 - 79.00) ms77.46 ± (77.08 - 77.84) ms-1.4%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.57 ± (11.55 - 11.59) MB11.61 ± (11.59 - 11.63) MB+0.3%✅⬆️
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (20 - 20)+0.1%✅⬆️
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms536.47 ± (528.50 - 544.43) ms529.22 ± (521.93 - 536.51) ms-1.4%
process.time_to_main_ms545.02 ± (542.71 - 547.33) ms544.00 ± (542.35 - 545.65) ms-0.2%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed51.67 ± (51.60 - 51.74) MB51.60 ± (51.54 - 51.67) MB-0.1%
runtime.dotnet.threads.count30 ± (30 - 30)30 ± (30 - 30)-0.0%
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 (8433) - mean (73ms)  : 70, 77
    master - mean (75ms)  : 70, 80

    section Bailout
    This PR (8433) - mean (80ms)  : 76, 83
    master - mean (78ms)  : 75, 81

    section CallTarget+Inlining+NGEN
    This PR (8433) - mean (1,130ms)  : 1079, 1182
    master - mean (1,128ms)  : 1084, 1172

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 (8433) - mean (117ms)  : 112, 123
    master - mean (115ms)  : 108, 121

    section Bailout
    This PR (8433) - mean (116ms)  : 112, 119
    master - mean (115ms)  : 112, 119

    section CallTarget+Inlining+NGEN
    This PR (8433) - mean (813ms)  : 785, 841
    master - mean (813ms)  : 780, 846

Loading
FakeDbCommand (.NET 6)
gantt
    title Execution time (ms) FakeDbCommand (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8433) - mean (102ms)  : 96, 109
    master - mean (101ms)  : 97, 104

    section Bailout
    This PR (8433) - mean (106ms)  : 100, 111
    master - mean (101ms)  : 99, 103

    section CallTarget+Inlining+NGEN
    This PR (8433) - mean (943ms)  : 908, 979
    master - mean (946ms)  : 903, 990

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

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

    section CallTarget+Inlining+NGEN
    This PR (8433) - mean (841ms)  : 781, 900
    master - mean (840ms)  : 784, 895

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 (8433) - mean (209ms)  : 196, 223
    master - mean (211ms)  : 190, 231

    section Bailout
    This PR (8433) - mean (213ms)  : 201, 224
    master - mean (214ms)  : 194, 234

    section CallTarget+Inlining+NGEN
    This PR (8433) - mean (1,289ms)  : 1230, 1349
    master - mean (1,318ms)  : 1228, 1407

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 (8433) - mean (304ms)  : 272, 335
    master - mean (304ms)  : 270, 338

    section Bailout
    This PR (8433) - mean (304ms)  : 275, 332
    master - mean (301ms)  : 277, 325

    section CallTarget+Inlining+NGEN
    This PR (8433) - mean (1,018ms)  : 983, 1053
    master - mean (1,018ms)  : 976, 1060

Loading
HttpMessageHandler (.NET 6)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8433) - mean (289ms)  : 270, 308
    master - mean (299ms)  : 274, 325

    section Bailout
    This PR (8433) - mean (291ms)  : 271, 311
    master - mean (301ms)  : 275, 326

    section CallTarget+Inlining+NGEN
    This PR (8433) - mean (1,184ms)  : 1133, 1236
    master - mean (1,213ms)  : 1134, 1293

Loading
HttpMessageHandler (.NET 8)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8433) - mean (293ms)  : 273, 314
    master - mean (300ms)  : 273, 326

    section Bailout
    This PR (8433) - mean (296ms)  : 275, 317
    master - mean (303ms)  : 271, 335

    section CallTarget+Inlining+NGEN
    This PR (8433) - mean (1,108ms)  : 1000, 1217
    master - mean (1,122ms)  : 994, 1251

Loading

@pr-commenter

pr-commenter Bot commented Apr 9, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-05-08 20:04:00

Comparing candidate commit d9a1cc9 in PR branch rob/fix-asb-dsm-produce-checkpoint-v2 with baseline commit d34f526 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_UpdateName_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_UpdateName_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_RecordException_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_SetAttributes_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_AddEvent_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_AddEvent_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_SetStatus_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_SetAttributes_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_GetContext_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan net472
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_UpdateName_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_SetAttributes_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_SetStatus_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_AddEvent_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_GetContext_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_AddEvent_Sampled net6.0
  • 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_AddEvent_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_RecordException_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_RecordException_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_GetContext_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan net472
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_UpdateName_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_SetAttributes_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_SetStatus_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_SetStatus_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_SetAttributes_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_AddEvent_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_SetStatus_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_SetAttributes_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_GetContext_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_GetContext_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_GetContext_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_SetStatus_Sampled net472

Found 4 performance improvements and 1 performance regressions! Performance is the same for 48 metrics, 19 unstable metrics, 84 known flaky benchmarks, 42 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.StartActiveSpan net6.0

  • 🟩 throughput [+10287.174op/s; +26603.627op/s] or [+6.244%; +16.149%]

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

  • 🟩 allocated_mem [-144 bytes; -143 bytes] or [-7.321%; -7.312%]

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

  • 🟥 throughput [-65278.624op/s; -59788.612op/s] or [-44.345%; -40.615%]
  • 🟩 execution_time [-49.885ms; -37.332ms] or [-24.755%; -18.526%]

scenario:Benchmarks.Trace.HttpClientBenchmark.SendAsync netcoreapp3.1

  • 🟩 execution_time [-101.551ms; -99.308ms] or [-50.714%; -49.594%]

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 [-46.655ms; -10.344ms] or [-27.957%; -6.199%]
  • unstable throughput [+5041.311op/s; +36195.359op/s] or [+3.250%; +23.337%]

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

  • unstable execution_time [-17430.581µs; +17819.337µs] or [-15.567%; +15.914%]

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

  • unstable execution_time [-33.271ms; -13.238ms] or [-22.633%; -9.006%]
  • unstable throughput [+19649.828op/s; +39726.513op/s] or [+14.183%; +28.673%]

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

  • unstable execution_time [-6.354ms; +21.032ms] or [-4.512%; +14.937%]
  • unstable throughput [-16996.014op/s; +13032.014op/s] or [-10.619%; +8.143%]

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

  • unstable execution_time [-20.793ms; +14.433ms] or [-18.028%; +12.514%]

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

  • unstable execution_time [-5.814ms; +27.041ms] or [-3.870%; +17.997%]
  • unstable throughput [-12534.833op/s; +5769.513op/s] or [-9.663%; +4.448%]

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

  • unstable execution_time [-55.692ms; -22.446ms] or [-33.683%; -13.576%]
  • unstable throughput [+6750.826op/s; +30576.989op/s] or [+4.005%; +18.142%]

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

  • unstable execution_time [-34.685ms; -9.140ms] or [-31.465%; -8.291%]

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

  • unstable execution_time [+12.931ms; +44.307ms] or [+10.616%; +36.375%]
  • unstable throughput [-26814.035op/s; -6360.577op/s] or [-14.250%; -3.380%]

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

  • unstable execution_time [-16.234ms; +18.288ms] or [-14.436%; +16.263%]

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

  • unstable execution_time [-30.455ms; -1.421ms] or [-19.726%; -0.921%]
  • unstable throughput [+4029.622op/s; +29387.840op/s] or [+2.630%; +19.180%]

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

  • unstable execution_time [+27.122ms; +58.098ms] or [+30.013%; +64.290%]

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

  • unstable execution_time [+59.717ms; +87.293ms] or [+48.066%; +70.263%]
  • unstable throughput [-38353.614op/s; -18349.807op/s] or [-24.794%; -11.863%]

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

  • 🟩 allocated_mem [-144 bytes; -143 bytes] or [-9.188%; -9.180%]
  • unstable execution_time [-28.707ms; +8.136ms] or [-18.864%; +5.346%]
  • unstable throughput [+20613.563op/s; +50694.690op/s] or [+13.444%; +33.064%]

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

  • 🟩 allocated_mem [-144 bytes; -143 bytes] or [-5.210%; -5.202%]
  • unstable execution_time [-16743.446µs; +18141.538µs] or [-14.089%; +15.265%]
  • unstable throughput [-15412.480op/s; +11286.774op/s] or [-11.816%; +8.653%]

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

  • unstable execution_time [-11.587ms; +21.563ms] or [-7.630%; +14.198%]
  • unstable throughput [-16911.172op/s; -2223.469op/s] or [-13.100%; -1.722%]

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

  • unstable execution_time [+3.742ms; +41.811ms] or [+3.290%; +36.757%]

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

  • 🟩 allocated_mem [-144 bytes; -143 bytes] or [-8.741%; -8.734%]
  • unstable execution_time [-80.019ms; -52.546ms] or [-40.877%; -26.843%]
  • unstable throughput [+45926.718op/s; +72956.845op/s] or [+41.797%; +66.396%]

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

  • unstable execution_time [+5.686ms; +21.779ms] or [+4.544%; +17.407%]

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

  • unstable execution_time [-17797.661µs; +17200.473µs] or [-16.072%; +15.533%]

scenario:Benchmarks.Trace.ActivityBenchmark.StartStopWithChild net472

  • 🟥 throughput [-8476.484op/s; -7493.462op/s] or [-10.051%; -8.885%]

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

  • unstable execution_time [-0.200ms; +24.445ms] or [-0.100%; +12.196%]
  • 🟥 throughput [-70785.631op/s; -63904.328op/s] or [-59.498%; -53.714%]

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

  • unstable execution_time [-88.575ms; -65.709ms] or [-44.550%; -33.049%]
  • 🟥 throughput [-6247.129op/s; -5017.049op/s] or [-6.352%; -5.101%]

scenario:Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • 🟥 execution_time [+320.619ms; +336.096ms] or [+159.103%; +166.783%]
  • 🟥 throughput [-53.712op/s; -41.363op/s] or [-9.664%; -7.442%]

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

  • 🟥 execution_time [+101.947ms; +104.663ms] or [+80.544%; +82.690%]
  • 🟩 throughput [+72.294op/s; +81.974op/s] or [+9.532%; +10.808%]

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

  • 🟥 execution_time [+82.193ms; +83.392ms] or [+72.738%; +73.798%]

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%]
  • 🟩 execution_time [-64.726ms; -46.009ms] or [-30.229%; -21.488%]
  • 🟥 throughput [-21502.379op/s; -8410.235op/s] or [-15.696%; -6.139%]

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

  • 🟥 allocated_mem [+1.272KB; +1.272KB] or [+27.500%; +27.510%]
  • unstable execution_time [-62.987ms; -41.884ms] or [-29.994%; -19.945%]

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

  • 🟥 allocated_mem [+1.307KB; +1.307KB] or [+105.743%; +105.758%]
  • 🟥 throughput [-262144.455op/s; -256705.106op/s] or [-26.766%; -26.211%]

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

  • 🟥 allocated_mem [+439 bytes; +440 bytes] or [+35.945%; +35.954%]
  • unstable execution_time [-74.590ms; -50.112ms] or [-33.264%; -22.348%]
  • unstable throughput [-328129.987op/s; -218808.545op/s] or [-35.055%; -23.376%]

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

  • 🟥 allocated_mem [+1.272KB; +1.272KB] or [+105.288%; +105.304%]
  • 🟩 execution_time [-78.364ms; -58.942ms] or [-39.116%; -29.421%]
  • 🟥 throughput [-150444.832op/s; -134036.390op/s] or [-21.616%; -19.258%]

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

  • 🟥 throughput [-37026.235op/s; -22075.427op/s] or [-23.559%; -14.046%]

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

  • 🟩 execution_time [-69.007ms; -64.962ms] or [-35.182%; -33.120%]
  • 🟩 throughput [+9304.701op/s; +12161.481op/s] or [+7.412%; +9.688%]

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

  • 🟩 execution_time [-68.087ms; -51.810ms] or [-33.664%; -25.616%]

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

  • 🟩 execution_time [-100.375ms; -79.573ms] or [-46.269%; -36.680%]

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

  • 🟥 execution_time [+301.264ms; +315.912ms] or [+150.531%; +157.850%]

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

  • unstable execution_time [+148.838ms; +186.598ms] or [+75.059%; +94.102%]

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

  • unstable execution_time [+254.987ms; +293.413ms] or [+128.443%; +147.799%]

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

  • 🟥 execution_time [+298.073ms; +312.036ms] or [+146.402%; +153.260%]

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

  • 🟥 execution_time [+254.687ms; +272.847ms] or [+124.507%; +133.385%]

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

  • 🟥 execution_time [+265.725ms; +280.344ms] or [+132.809%; +140.116%]

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

  • 🟥 execution_time [+19.752µs; +43.353µs] or [+6.306%; +13.841%]
  • 🟥 throughput [-406.577op/s; -207.939op/s] or [-12.674%; -6.482%]

scenario:Benchmarks.Trace.AspNetCoreBenchmark.SendRequest net472

  • 🟥 execution_time [+300.098ms; +300.926ms] or [+149.780%; +150.193%]

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

  • unstable execution_time [+354.834ms; +373.007ms] or [+385.541%; +405.287%]
  • 🟥 throughput [-6916.161op/s; -6706.582op/s] or [-56.831%; -55.109%]

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

  • unstable execution_time [+308.575ms; +349.112ms] or [+234.298%; +265.078%]
  • 🟥 throughput [-1284.881op/s; -1052.243op/s] or [-12.438%; -10.186%]

scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • 🟥 execution_time [+296.138ms; +311.290ms] or [+136.161%; +143.128%]
  • 🟥 throughput [-681.381op/s; -664.295op/s] or [-61.740%; -60.192%]

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

  • unstable execution_time [-47.787ms; +86.337ms] or [-20.365%; +36.793%]
  • 🟥 throughput [-718.599op/s; -624.171op/s] or [-47.931%; -41.632%]

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

  • 🟥 allocated_mem [+2.305KB; +2.308KB] or [+5.442%; +5.450%]
  • 🟥 execution_time [+339.712ms; +348.723ms] or [+203.187%; +208.577%]
  • 🟥 throughput [-720.803op/s; -686.814op/s] or [-50.188%; -47.822%]

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

  • 🟩 execution_time [-184.355µs; -164.258µs] or [-9.339%; -8.321%]
  • 🟩 throughput [+46.212op/s; +52.337op/s] or [+9.123%; +10.332%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch net472

  • 🟥 execution_time [+304.466ms; +318.470ms] or [+153.323%; +160.375%]

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

  • unstable execution_time [+153.159ms; +224.638ms] or [+76.748%; +112.566%]

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

  • 🟥 execution_time [+300.627ms; +308.031ms] or [+151.022%; +154.742%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync net472

  • 🟥 execution_time [+303.468ms; +317.522ms] or [+152.391%; +159.449%]

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

  • unstable execution_time [+227.465ms; +249.035ms] or [+112.471%; +123.137%]

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

  • 🟥 execution_time [+300.807ms; +309.051ms] or [+152.462%; +156.641%]

scenario:Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync net472

  • 🟥 execution_time [+302.059ms; +315.935ms] or [+151.607%; +158.571%]

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

  • 🟥 execution_time [+304.560ms; +313.237ms] or [+151.795%; +156.120%]

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

  • 🟥 execution_time [+299.818ms; +306.941ms] or [+149.157%; +152.701%]

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

  • unstable execution_time [-94.452ms; -67.754ms] or [-43.921%; -31.506%]
  • unstable throughput [-91383.415op/s; -41988.654op/s] or [-25.069%; -11.519%]

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

  • unstable execution_time [-87.495ms; -65.536ms] or [-43.889%; -32.874%]

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

  • 🟩 allocated_mem [-24.834KB; -24.811KB] or [-9.059%; -9.051%]
  • unstable execution_time [-78.583µs; -23.010µs] or [-15.531%; -4.548%]
  • unstable throughput [+116.552op/s; +318.478op/s] or [+5.816%; +15.892%]

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

  • 🟩 execution_time [-93.952µs; -39.089µs] or [-16.281%; -6.774%]
  • 🟩 throughput [+140.654op/s; +290.362op/s] or [+8.036%; +16.589%]

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

  • unstable execution_time [+3.734µs; +8.532µs] or [+8.827%; +20.168%]
  • 🟥 throughput [-3847.852op/s; -1869.870op/s] or [-16.198%; -7.872%]

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

  • unstable execution_time [-13.031µs; -3.195µs] or [-20.218%; -4.956%]
  • unstable throughput [+1085.311op/s; +3097.671op/s] or [+6.659%; +19.005%]

scenario:Benchmarks.Trace.Log4netBenchmark.EnrichedLog net472

  • 🟥 execution_time [+301.546ms; +314.511ms] or [+152.418%; +158.971%]

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

  • 🟥 execution_time [+304.485ms; +311.881ms] or [+154.982%; +158.747%]

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

  • 🟥 execution_time [+300.818ms; +306.534ms] or [+150.597%; +153.458%]

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

  • 🟩 execution_time [-108.276ms; -103.864ms] or [-54.121%; -51.916%]

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

  • unstable execution_time [-54.647ms; -25.155ms] or [-27.700%; -12.751%]

scenario:Benchmarks.Trace.SerilogBenchmark.EnrichedLog net472

  • 🟥 execution_time [+302.587ms; +316.432ms] or [+150.812%; +157.713%]

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

  • unstable execution_time [+198.168ms; +254.646ms] or [+99.511%; +127.871%]

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

  • 🟥 execution_time [+304.583ms; +310.028ms] or [+154.465%; +157.226%]

scenario:Benchmarks.Trace.SingleSpanAspNetCoreBenchmark.SingleSpanAspNetCore net472

  • 🟥 execution_time [+300.249ms; +301.327ms] or [+149.766%; +150.303%]
  • 🟩 throughput [+59810942.097op/s; +60166215.524op/s] or [+43.558%; +43.817%]

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

  • unstable execution_time [+372.217ms; +389.210ms] or [+462.918%; +484.052%]
  • 🟥 throughput [-7418.662op/s; -7185.376op/s] or [-57.350%; -55.547%]

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

  • 🟥 execution_time [+303.163ms; +306.045ms] or [+151.211%; +152.648%]
  • 🟥 throughput [-30380568.084op/s; -29046227.730op/s] or [-13.457%; -12.866%]

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

  • unstable execution_time [-81.938ms; -54.908ms] or [-40.132%; -26.893%]
  • unstable throughput [-209198.489op/s; -53583.641op/s] or [-19.532%; -5.003%]

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

  • 🟩 execution_time [-98.213ms; -93.969ms] or [-49.696%; -47.549%]

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

  • 🟩 execution_time [-89.151ms; -85.021ms] or [-46.448%; -44.297%]
  • 🟩 throughput [+65753.805op/s; +97233.622op/s] or [+5.089%; +7.526%]

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

  • unstable execution_time [-76.048ms; -49.010ms] or [-37.364%; -24.079%]
  • 🟩 throughput [+63471.704op/s; +76744.425op/s] or [+6.304%; +7.622%]

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

  • 🟩 execution_time [-100.735ms; -99.093ms] or [-50.307%; -49.487%]
  • 🟩 throughput [+44145.017op/s; +49218.810op/s] or [+8.016%; +8.937%]

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

  • unstable execution_time [-86.812ms; -63.708ms] or [-43.617%; -32.009%]

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

  • unstable execution_time [-80.745ms; -51.004ms] or [-40.387%; -25.511%]
  • unstable throughput [-197865.016op/s; -50414.943op/s] or [-22.106%; -5.633%]

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

  • unstable execution_time [-29.566ms; -7.301ms] or [-15.016%; -3.708%]

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

@robcarlan-datadog
robcarlan-datadog force-pushed the rob/fix-asb-dsm-produce-checkpoint-v2 branch from 8d5176f to 1e5a8a4 Compare April 9, 2026 17:47
@robcarlan-datadog robcarlan-datadog changed the title [DSM] Fix produce-side checkpoints for Azure Service Bus >= 7.18.x [DSM] Fix missing produce-side checkpoints for Azure Service Bus Apr 27, 2026
@robcarlan-datadog
robcarlan-datadog marked this pull request as ready for review April 29, 2026 16:49
@robcarlan-datadog
robcarlan-datadog requested review from a team as code owners April 29, 2026 16:49
@robcarlan-datadog
robcarlan-datadog requested review from anna-git and removed request for a team April 29, 2026 16:49
@pablomartinezbernardo

Copy link
Copy Markdown
Contributor

The SDK skips creating the per-message Activity when traceparent is already present

😢

Does this fix cover this overload? ServiceBusSenderSendMessageBatchAsyncIntegration.cs Was it even supported before?

@bouwkast

Copy link
Copy Markdown
Collaborator

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 362c9898a2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@robcarlan-datadog

Copy link
Copy Markdown
Contributor Author

Does this fix cover this overload? ServiceBusSenderSendMessageBatchAsyncIntegration.cs Was it even supported before?

@pablomartinezbernardo

I don't think we ever supported this for DSM. I can add support as a separate PR (Mostly because I would like to try and get this one into the next release 🤞 )

robcarlan-datadog and others added 5 commits May 1, 2026 12:14
….18.x

The DSM produce checkpoint for ServiceBusSender.Send relied on a 3-step
Activity chain through InstrumentMessage/Message Activity. SDK >= 7.18.x
no longer calls InstrumentMessage, so the checkpoint never fires.

Move the produce checkpoint directly into the calltarget integrations
(SendMessagesAsync, ScheduleMessagesAsync) which have access to the
sender instance and messages. Add a guard flag so the old Activity
handler doesn't double-count on older SDK versions.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
…alltargets

The previous approach kept the Activity handler's produce checkpoint as a
fallback for older SDK versions where the "Message" Activity still fires,
guarding against double-counting with a ProduceCheckpointSetByCalltarget
AsyncLocal flag.

The guard is unnecessary: the Activity-based path was already dead code
because InstrumentMessageIntegration.OnMethodBegin injects traceparent
before InstrumentMessage runs, causing InstrumentMessage to skip creating
the Activity. Remove the guard flag and the produce checkpoint block from
AzureServiceBusActivityHandler entirely. DSM produce checkpoints are now
set exclusively in ServiceBusSenderSendMessagesAsyncIntegration and
ServiceBusSenderScheduleMessagesAsyncIntegration, which have direct
access to messages for all SDK versions >= 7.14.0.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
…n calltargets

Delete SendServiceBusMessagesIntegration (hooked CreateDiagnosticScope solely to
build the applicationProperties→message weak-table mapping).

Strip the DSM block from InstrumentMessageIntegration.OnMethodBegin and its
OnMethodEnd (whose only job was clearing the ActiveMessageProperties AsyncLocal).
The InjectContext call for W3C trace propagation is kept.

Remove ActiveMessageProperties, ApplicationPropertiesToMessageMap, SetMessage,
and TryGetMessage from AzureServiceBusCommon — all were only needed to thread
message data through to AzureServiceBusActivityHandler.ActivityStopped, which
no longer contains any DSM logic.

Remove the SetMessage call from SendServiceBusMessageBatchIntegration; the rest
of that file (span links) is unaffected.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
… profiler compatibility

The native profiler has this type baked into its instrumentation definitions for
CreateDiagnosticScope. Deleting the managed class causes a TypeLoadException at
runtime. The stub satisfies the native side while doing nothing.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@robcarlan-datadog
robcarlan-datadog force-pushed the rob/fix-asb-dsm-produce-checkpoint-v2 branch from 362c989 to 8c43325 Compare May 1, 2026 16:26
Fixes double-enumeration of lazy IEnumerable<ServiceBusMessage> arguments:
the prior per-sender loops iterated messages once for DSM, then the SDK
iterated them again on its own enumeration, discarding the injected context
for generator sequences.

InstrumentMessage is called by the SDK per-message for all send paths
(SendMessageAsync, SendMessagesAsync, SendMessagesAsync(batch),
ScheduleMessagesAsync), so injecting DSM there is both correct and
exhaustive. An idempotency guard on `dd-pathway-ctx-base64` prevents
double-injection when TryAddMessage (batch-with-links) already ran.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@robcarlan-datadog
robcarlan-datadog force-pushed the rob/fix-asb-dsm-produce-checkpoint-v2 branch from 8c43325 to 0f204af Compare May 1, 2026 16:30
robcarlan-datadog and others added 2 commits May 1, 2026 13:39
…led sends

InstrumentMessage (MessagingClientDiagnostics) has ref string parameters which
the CallTarget rewriter cannot instrument — OnMethodBegin was silently skipped.

Move DSM injection to hooks that actually fire:
- SendServiceBusMessagesIntegration (CreateDiagnosticScope) for single/IEnumerable
- ServiceBusSenderScheduleMessagesAsyncIntegration for scheduled sends

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
…CacheKey gained IsConsume param

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@robcarlan-datadog
robcarlan-datadog requested a review from a team as a code owner May 1, 2026 18:04
robcarlan-datadog and others added 3 commits May 1, 2026 14:09
- Correct batch-without-links comment to reference CreateDiagnosticScope hook
- Use ITransportSender (not IServiceBusSender) in SendServiceBusMessagesIntegration
  since only EntityPath is needed

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

@bouwkast bouwkast left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think we've changed logic here, do we not have any tests at all for

robcarlan-datadog and others added 2 commits May 4, 2026 12:08
…tion

ScheduleMessagesAsync internally calls CreateDiagnosticScope(IReadOnlyCollection<ServiceBusMessage>, ...)
which is already hooked by SendServiceBusMessagesIntegration. Emitting a second checkpoint here causes the
span to carry P2 while injected messages carry P1, breaking pathway continuity.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
When AzureServiceBusBatchLinksEnabled=false no per-message span exists,
so DSM was silently skipped for SendMessagesAsync(ServiceBusMessageBatch).
Now calls SetCheckpoint directly using the active scope's PathwayContext
as parent and injects the result into each message's ApplicationProperties.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@robcarlan-datadog
robcarlan-datadog requested a review from bouwkast May 6, 2026 03:58

@bouwkast bouwkast left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I have one set of questions for some of the code. I'm somewhat struggling with wrapping my head around what exactly is expected/going on in tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Azure/ServiceBus/SendServiceBusMessagesIntegration.cs

…d path

Previously SendServiceBusMessagesIntegration set a single checkpoint per
SendMessagesAsync(IEnumerable<ServiceBusMessage>) call with payloadSizeBytes=0,
undercounting throughput and recording one StatsPoint regardless of batch size.
Now matches the behavior of SendServiceBusMessageBatchIntegration: one
checkpoint per message with computed message size.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

@bouwkast bouwkast left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thank you looks good to me now!

@robcarlan-datadog
robcarlan-datadog enabled auto-merge (squash) May 8, 2026 16:31
@robcarlan-datadog
robcarlan-datadog merged commit 856ceba into master May 15, 2026
137 of 138 checks passed
@robcarlan-datadog
robcarlan-datadog deleted the rob/fix-asb-dsm-produce-checkpoint-v2 branch May 15, 2026 15:59
@github-actions github-actions Bot added this to the vNext-v3 milestone May 15, 2026
@andrewlock andrewlock added the type:enhancement Improvement to an existing feature label May 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:data-streams-monitoring type:enhancement Improvement to an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants