Skip to content

[Dynamic Instrumentation] Fix Equals/GetHashCode contract on Dynamic Instrumentation configuration models#8615

Merged
dudikeleti merged 4 commits into
masterfrom
dudik/di/fix-config-models-equality
May 13, 2026
Merged

[Dynamic Instrumentation] Fix Equals/GetHashCode contract on Dynamic Instrumentation configuration models#8615
dudikeleti merged 4 commits into
masterfrom
dudik/di/fix-config-models-equality

Conversation

@dudikeleti

@dudikeleti dudikeleti commented May 12, 2026

Copy link
Copy Markdown
Contributor

Summary of changes

  • Fix the Equals / GetHashCode contract on the Dynamic Instrumentation configuration models (FilterList, Where, ProbeDefinition, SpanDecorationProbe, LogProbe, SnapshotSegment).
  • Add a NullableSequentialHashCode<T> helper in.

Reason for change

  • HashCode.Combine was being called on array properties which inherit object.GetHashCode/Equals (reference identity).
  • Every time probe configuration is re-applied from RCM, equal configs would produce different hash codes.
  • LogProbe additionally omitted When from GetHashCode even though Equals already used it.

Implementation details

  • The T[] overload of NullableSequentialHashCode is selected by overload resolution at every existing call site (Tags, AdditionalIds, Lines, Decorations, Segments, PackagePrefixes, Classes). It uses an indexed for loop, avoiding the IEnumerator<T> heap allocation and the interface dispatch (MoveNext/Current) the IEnumerable<T> overload would incur on arrays.

Test coverage

  • ProbeConfigurationComparerTests.
  • New regression test ProbeConfigurationComparerTests.CurrentSnapshotsReparsedJsonContent_ProbeRelatedNotChanged

@dudikeleti
dudikeleti requested a review from a team as a code owner May 12, 2026 15:40
@github-actions github-actions Bot added area:tracer The core tracer library (Datadog.Trace, does not include OpenTracing, native code, or integrations) area:debugger labels May 12, 2026

@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: efdd50da52

ℹ️ 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".

Comment thread tracer/src/Datadog.Trace/Debugger/Configurations/Models/SnapshotSegment.cs Outdated
@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 (8615) 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.83 ± (72.87 - 73.28) ms74.59 ± (74.42 - 74.89) ms+2.4%✅⬆️
.NET Framework 4.8 - Bailout
duration76.79 ± (76.46 - 76.87) ms77.20 ± (77.23 - 77.67) ms+0.5%✅⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1101.71 ± (1103.13 - 1111.27) ms1102.00 ± (1103.27 - 1113.50) ms+0.0%✅⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms22.48 ± (22.43 - 22.52) ms22.71 ± (22.65 - 22.77) ms+1.1%✅⬆️
process.time_to_main_ms84.02 ± (83.82 - 84.22) ms86.52 ± (86.22 - 86.82) ms+3.0%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.90 ± (10.90 - 10.91) MB10.91 ± (10.91 - 10.91) MB+0.1%✅⬆️
runtime.dotnet.threads.count12 ± (12 - 12)12 ± (12 - 12)+0.0%
.NET Core 3.1 - Bailout
process.internal_duration_ms22.55 ± (22.50 - 22.59) ms22.19 ± (22.15 - 22.23) ms-1.6%
process.time_to_main_ms85.45 ± (85.27 - 85.62) ms85.36 ± (85.15 - 85.56) ms-0.1%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.94 ± (10.94 - 10.94) MB10.96 ± (10.95 - 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_ms214.52 ± (213.59 - 215.46) ms214.92 ± (214.09 - 215.76) ms+0.2%✅⬆️
process.time_to_main_ms542.30 ± (541.02 - 543.58) ms537.29 ± (536.00 - 538.57) ms-0.9%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed48.50 ± (48.47 - 48.53) MB48.41 ± (48.38 - 48.44) MB-0.2%
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)-0.1%
.NET 6 - Baseline
process.internal_duration_ms21.26 ± (21.22 - 21.29) ms21.46 ± (21.39 - 21.52) ms+0.9%✅⬆️
process.time_to_main_ms73.21 ± (73.03 - 73.39) ms74.97 ± (74.67 - 75.27) ms+2.4%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.61 ± (10.61 - 10.61) MB10.64 ± (10.64 - 10.64) MB+0.3%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 6 - Bailout
process.internal_duration_ms21.07 ± (21.04 - 21.11) ms21.21 ± (21.17 - 21.25) ms+0.6%✅⬆️
process.time_to_main_ms73.57 ± (73.40 - 73.74) ms74.84 ± (74.67 - 75.02) ms+1.7%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.73 ± (10.72 - 10.73) MB10.75 ± (10.75 - 10.75) MB+0.2%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms376.58 ± (374.36 - 378.79) ms378.32 ± (376.09 - 380.54) ms+0.5%✅⬆️
process.time_to_main_ms539.28 ± (537.97 - 540.60) ms540.72 ± (539.40 - 542.05) ms+0.3%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed49.67 ± (49.65 - 49.70) MB49.92 ± (49.90 - 49.95) MB+0.5%✅⬆️
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)-0.4%
.NET 8 - Baseline
process.internal_duration_ms19.68 ± (19.63 - 19.74) ms19.58 ± (19.53 - 19.64) ms-0.5%
process.time_to_main_ms74.49 ± (74.23 - 74.75) ms73.39 ± (73.09 - 73.69) ms-1.5%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.68 ± (7.68 - 7.69) MB7.70 ± (7.69 - 7.70) MB+0.2%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 8 - Bailout
process.internal_duration_ms19.59 ± (19.55 - 19.62) ms19.60 ± (19.55 - 19.65) ms+0.1%✅⬆️
process.time_to_main_ms74.08 ± (73.90 - 74.26) ms74.81 ± (74.55 - 75.08) ms+1.0%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.74 ± (7.73 - 7.74) MB7.74 ± (7.73 - 7.74) MB+0.0%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms290.19 ± (287.99 - 292.39) ms296.56 ± (294.26 - 298.86) ms+2.2%✅⬆️
process.time_to_main_ms497.24 ± (496.02 - 498.45) ms495.14 ± (494.19 - 496.09) ms-0.4%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed37.00 ± (36.97 - 37.03) MB37.00 ± (36.97 - 37.03) MB-0.0%
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.03 ± (197.94 - 198.90) ms200.10 ± (199.30 - 200.31) ms+1.0%✅⬆️
.NET Framework 4.8 - Bailout
duration200.93 ± (200.50 - 201.35) ms202.35 ± (202.02 - 202.81) ms+0.7%✅⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1189.33 ± (1191.98 - 1197.78) ms1194.50 ± (1194.50 - 1201.21) ms+0.4%✅⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms194.91 ± (194.36 - 195.45) ms195.05 ± (194.52 - 195.58) ms+0.1%✅⬆️
process.time_to_main_ms84.31 ± (83.92 - 84.69) ms83.82 ± (83.51 - 84.13) ms-0.6%
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.01 ± (15.99 - 16.04) MB16.03 ± (16.01 - 16.05) MB+0.1%✅⬆️
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (19 - 20)-0.6%
.NET Core 3.1 - Bailout
process.internal_duration_ms193.92 ± (193.42 - 194.43) ms194.50 ± (194.03 - 194.98) ms+0.3%✅⬆️
process.time_to_main_ms84.92 ± (84.63 - 85.22) ms84.87 ± (84.64 - 85.11) ms-0.1%
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.04 ± (16.01 - 16.06) MB16.08 ± (16.05 - 16.10) MB+0.3%✅⬆️
runtime.dotnet.threads.count21 ± (20 - 21)21 ± (21 - 21)+0.4%✅⬆️
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms388.30 ± (387.01 - 389.59) ms390.92 ± (389.55 - 392.29) ms+0.7%✅⬆️
process.time_to_main_ms534.79 ± (533.64 - 535.94) ms534.73 ± (533.51 - 535.95) ms-0.0%
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed57.74 ± (57.53 - 57.95) MB57.99 ± (57.75 - 58.23) MB+0.4%✅⬆️
runtime.dotnet.threads.count30 ± (30 - 30)30 ± (30 - 30)+0.1%✅⬆️
.NET 6 - Baseline
process.internal_duration_ms198.56 ± (198.06 - 199.07) ms198.29 ± (197.83 - 198.74) ms-0.1%
process.time_to_main_ms72.03 ± (71.78 - 72.27) ms72.20 ± (71.93 - 72.48) ms+0.2%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.28 ± (16.26 - 16.31) MB16.35 ± (16.32 - 16.38) MB+0.4%✅⬆️
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)-0.0%
.NET 6 - Bailout
process.internal_duration_ms197.63 ± (197.10 - 198.15) ms197.13 ± (196.58 - 197.67) ms-0.3%
process.time_to_main_ms73.45 ± (73.17 - 73.73) ms72.97 ± (72.71 - 73.22) ms-0.7%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.31 ± (16.28 - 16.33) MB16.40 ± (16.37 - 16.43) MB+0.6%✅⬆️
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (20 - 20)+0.3%✅⬆️
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms594.88 ± (592.36 - 597.40) ms591.27 ± (588.47 - 594.08) ms-0.6%
process.time_to_main_ms534.34 ± (533.41 - 535.27) ms533.79 ± (532.93 - 534.64) ms-0.1%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed61.38 ± (61.27 - 61.49) MB61.30 ± (61.19 - 61.40) MB-0.1%
runtime.dotnet.threads.count31 ± (31 - 31)31 ± (31 - 31)-0.0%
.NET 8 - Baseline
process.internal_duration_ms195.93 ± (195.43 - 196.42) ms195.89 ± (195.45 - 196.32) ms-0.0%
process.time_to_main_ms71.73 ± (71.49 - 71.98) ms72.24 ± (71.99 - 72.48) ms+0.7%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.73 ± (11.72 - 11.75) MB11.71 ± (11.69 - 11.73) MB-0.2%
runtime.dotnet.threads.count18 ± (18 - 18)18 ± (18 - 18)+0.3%✅⬆️
.NET 8 - Bailout
process.internal_duration_ms195.00 ± (194.50 - 195.50) ms194.33 ± (193.91 - 194.74) ms-0.3%
process.time_to_main_ms72.64 ± (72.40 - 72.88) ms72.40 ± (72.18 - 72.62) ms-0.3%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.78 ± (11.76 - 11.80) MB11.79 ± (11.77 - 11.81) MB+0.1%✅⬆️
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)-0.4%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms516.70 ± (514.10 - 519.30) ms515.26 ± (512.78 - 517.74) ms-0.3%
process.time_to_main_ms489.17 ± (488.44 - 489.91) ms489.11 ± (488.26 - 489.97) ms-0.0%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed50.58 ± (50.54 - 50.62) MB50.59 ± (50.55 - 50.63) MB+0.0%✅⬆️
runtime.dotnet.threads.count30 ± (30 - 30)30 ± (29 - 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 (8615) - mean (75ms)  : 71, 78
    master - mean (73ms)  : 70, 76

    section Bailout
    This PR (8615) - mean (77ms)  : 74, 81
    master - mean (77ms)  : 74, 79

    section CallTarget+Inlining+NGEN
    This PR (8615) - mean (1,108ms)  : 1030, 1187
    master - mean (1,107ms)  : 1048, 1166

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 (8615) - mean (116ms)  : 111, 122
    master - mean (113ms)  : 109, 117

    section Bailout
    This PR (8615) - mean (114ms)  : 111, 117
    master - mean (115ms)  : 112, 118

    section CallTarget+Inlining+NGEN
    This PR (8615) - mean (788ms)  : 759, 817
    master - mean (794ms)  : 766, 822

Loading
FakeDbCommand (.NET 6)
gantt
    title Execution time (ms) FakeDbCommand (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8615) - mean (103ms)  : 96, 111
    master - mean (101ms)  : 97, 105

    section Bailout
    This PR (8615) - mean (103ms)  : 100, 105
    master - mean (101ms)  : 99, 103

    section CallTarget+Inlining+NGEN
    This PR (8615) - mean (953ms)  : 911, 994
    master - mean (942ms)  : 904, 980

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

    section Bailout
    This PR (8615) - mean (103ms)  : 97, 109
    master - mean (101ms)  : 98, 105

    section CallTarget+Inlining+NGEN
    This PR (8615) - mean (825ms)  : 782, 868
    master - mean (819ms)  : 779, 859

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 (8615) - mean (200ms)  : 193, 207
    master - mean (198ms)  : 192, 205

    section Bailout
    This PR (8615) - mean (202ms)  : 199, 206
    master - mean (201ms)  : 197, 205

    section CallTarget+Inlining+NGEN
    This PR (8615) - mean (1,198ms)  : 1150, 1246
    master - mean (1,195ms)  : 1154, 1236

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 (8615) - mean (288ms)  : 282, 294
    master - mean (288ms)  : 282, 294

    section Bailout
    This PR (8615) - mean (288ms)  : 281, 296
    master - mean (287ms)  : 281, 294

    section CallTarget+Inlining+NGEN
    This PR (8615) - mean (964ms)  : 946, 981
    master - mean (963ms)  : 945, 981

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

    section Bailout
    This PR (8615) - mean (279ms)  : 272, 286
    master - mean (279ms)  : 271, 288

    section CallTarget+Inlining+NGEN
    This PR (8615) - mean (1,155ms)  : 1115, 1195
    master - mean (1,157ms)  : 1123, 1192

Loading
HttpMessageHandler (.NET 8)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8615) - mean (278ms)  : 271, 284
    master - mean (278ms)  : 271, 285

    section Bailout
    This PR (8615) - mean (277ms)  : 272, 282
    master - mean (278ms)  : 270, 285

    section CallTarget+Inlining+NGEN
    This PR (8615) - mean (1,037ms)  : 1000, 1074
    master - mean (1,037ms)  : 991, 1084

Loading

@pr-commenter

pr-commenter Bot commented May 12, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-05-13 11:59:32

Comparing candidate commit 10f53b7 in PR branch dudik/di/fix-config-models-equality with baseline commit 5a188d7 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.TelemetrySpanBenchmark.StartSpan_RecordException_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan net472
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_UpdateName_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_SetStatus_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_AddEvent_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_RecordException_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_GetContext_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_SetAttributes_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_SetStatus_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_UpdateName_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_SetStatus_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_GetContext_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_SetAttributes_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan net472
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_SetAttributes_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_RecordException_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_UpdateName_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_AddEvent_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_SetAttributes_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_GetContext_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_SetStatus_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_UpdateName_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan net6.0
  • 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_GetContext_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_SetStatus_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_AddEvent_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_SetAttributes_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_AddEvent_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_AddEvent_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_GetContext_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_GetContext_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_SetStatus_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_SetAttributes_Sampled net472

Found 2 performance improvements and 2 performance regressions! Performance is the same for 47 metrics, 21 unstable metrics, 86 known flaky benchmarks, 40 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.StartSpan_GetCurrentSpan net6.0

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

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

  • 🟥 throughput [-69299.287op/s; -62784.991op/s] or [-47.076%; -42.651%]
  • 🟩 execution_time [-42.971ms; -27.755ms] or [-21.324%; -13.773%]

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

  • 🟥 throughput [-40461.459op/s; -36378.782op/s] or [-20.287%; -18.240%]

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 [+0.353ms; +27.197ms] or [+0.254%; +19.573%]
  • unstable throughput [-25817.874op/s; -157.998op/s] or [-14.811%; -0.091%]

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

  • unstable execution_time [+13.246ms; +34.146ms] or [+10.049%; +25.906%]
  • unstable throughput [-32342.001op/s; -15518.052op/s] or [-20.327%; -9.753%]

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

  • unstable execution_time [-31.702ms; -7.483ms] or [-28.787%; -6.795%]

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

  • unstable execution_time [+7.962ms; +34.348ms] or [+5.582%; +24.080%]
  • unstable throughput [-39794.448op/s; -13806.295op/s] or [-23.181%; -8.043%]

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

  • unstable execution_time [+9.447ms; +32.936ms] or [+10.469%; +36.498%]

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

  • unstable execution_time [+21.508ms; +51.752ms] or [+15.588%; +37.508%]
  • unstable throughput [-33016.210op/s; -16487.556op/s] or [-23.285%; -11.628%]

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

  • unstable execution_time [-35.400ms; -10.327ms] or [-30.799%; -8.985%]

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

  • unstable execution_time [-52.568ms; -10.670ms] or [-28.560%; -5.797%]
  • unstable throughput [-7437.680op/s; +24616.206op/s] or [-5.031%; +16.651%]

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

  • unstable execution_time [-24.842ms; -7.300ms] or [-17.656%; -5.189%]

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

  • unstable execution_time [+8.494ms; +33.283ms] or [+9.264%; +36.302%]

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

  • unstable execution_time [-64.927ms; -23.212ms] or [-32.809%; -11.730%]
  • unstable throughput [+27901.137op/s; +56482.151op/s] or [+22.031%; +44.599%]

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

  • 🟥 allocated_mem [+143 bytes; +144 bytes] or [+8.332%; +8.340%]
  • unstable execution_time [-40.697ms; -19.892ms] or [-26.214%; -12.813%]

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

  • unstable execution_time [-35.159ms; -11.283ms] or [-31.443%; -10.090%]

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

  • unstable execution_time [-14.858ms; +2.255ms] or [-10.930%; +1.659%]

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

  • unstable execution_time [-37.428ms; -12.779ms] or [-33.016%; -11.273%]

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 [-4.217ms; +36.153ms] or [-2.684%; +23.011%]
  • unstable throughput [-14474.376op/s; +8556.579op/s] or [-15.426%; +9.119%]

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

  • unstable execution_time [+10.963ms; +36.193ms] or [+12.429%; +41.031%]

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

  • unstable execution_time [-60.900ms; -31.644ms] or [-44.486%; -23.116%]

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

  • 🟥 allocated_mem [+143 bytes; +144 bytes] or [+9.570%; +9.578%]
  • unstable execution_time [+28.062ms; +61.055ms] or [+22.269%; +48.451%]
  • unstable throughput [-48069.530op/s; -28413.443op/s] or [-29.539%; -17.460%]

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

  • unstable execution_time [+16.353ms; +42.828ms] or [+11.525%; +30.183%]

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

  • unstable execution_time [-60.593ms; -30.638ms] or [-44.739%; -22.621%]

scenario:Benchmarks.Trace.ActivityBenchmark.StartStopWithChild net472

  • 🟥 throughput [-7991.717op/s; -7473.861op/s] or [-9.476%; -8.862%]

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

  • unstable execution_time [-38.258ms; -5.672ms] or [-19.087%; -2.830%]
  • unstable throughput [-58456.284op/s; -44190.315op/s] or [-49.135%; -37.144%]

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

  • 🟩 execution_time [-98.175ms; -95.449ms] or [-49.379%; -48.008%]
  • 🟥 throughput [-6655.622op/s; -5399.564op/s] or [-6.767%; -5.490%]

scenario:Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • 🟥 execution_time [+315.802ms; +331.518ms] or [+156.712%; +164.511%]
  • 🟥 throughput [-55.389op/s; -42.856op/s] or [-9.966%; -7.711%]

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

  • 🟥 execution_time [+96.830ms; +101.105ms] or [+76.502%; +79.879%]
  • 🟩 throughput [+86.739op/s; +100.594op/s] or [+11.436%; +13.263%]

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

  • 🟥 execution_time [+83.403ms; +84.944ms] or [+73.808%; +75.172%]

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 [-48.441ms; -25.634ms] or [-22.624%; -11.972%]
  • unstable throughput [-34498.225op/s; -19035.764op/s] or [-25.182%; -13.895%]

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

  • 🟥 allocated_mem [+1.272KB; +1.272KB] or [+27.500%; +27.510%]
  • 🟩 execution_time [-63.658ms; -42.971ms] or [-30.313%; -20.463%]

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

  • 🟥 allocated_mem [+1.307KB; +1.307KB] or [+105.743%; +105.758%]
  • 🟥 throughput [-269469.298op/s; -262177.653op/s] or [-27.514%; -26.770%]

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

  • 🟥 allocated_mem [+439 bytes; +440 bytes] or [+35.945%; +35.954%]
  • unstable execution_time [-93.322ms; -67.237ms] or [-41.617%; -29.985%]
  • unstable throughput [-159464.658op/s; -62739.358op/s] or [-17.036%; -6.703%]

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

  • 🟥 allocated_mem [+1.272KB; +1.272KB] or [+105.288%; +105.304%]
  • 🟩 execution_time [-78.517ms; -61.939ms] or [-39.192%; -30.917%]
  • 🟥 throughput [-136988.336op/s; -116140.740op/s] or [-19.683%; -16.687%]

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

  • 🟩 execution_time [-42.532ms; -26.293ms] or [-21.460%; -13.266%]
  • 🟥 throughput [-21265.162op/s; -7922.744op/s] or [-13.531%; -5.041%]

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

  • unstable execution_time [-35.215ms; -15.017ms] or [-17.954%; -7.656%]
  • 🟩 throughput [+9937.918op/s; +12621.934op/s] or [+7.917%; +10.055%]

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

  • unstable execution_time [-53.377ms; -32.813ms] or [-26.391%; -16.223%]
  • unstable throughput [-277845.857op/s; +52624.850op/s] or [-9.265%; +1.755%]

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

  • unstable execution_time [-82.770ms; -58.558ms] or [-38.154%; -26.993%]
  • 🟩 throughput [+161034.051op/s; +219810.772op/s] or [+6.392%; +8.725%]

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

  • 🟥 execution_time [+301.982ms; +315.800ms] or [+150.890%; +157.795%]

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

  • unstable execution_time [+144.733ms; +184.255ms] or [+72.989%; +92.920%]

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

  • 🟥 execution_time [+299.930ms; +306.550ms] or [+151.082%; +154.416%]

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

  • 🟥 execution_time [+296.384ms; +309.761ms] or [+145.572%; +152.142%]

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

  • 🟥 execution_time [+235.097ms; +242.274ms] or [+114.930%; +118.439%]

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

  • 🟥 execution_time [+288.964ms; +301.988ms] or [+144.424%; +150.933%]

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

  • 🟥 execution_time [+20.483µs; +44.122µs] or [+6.539%; +14.086%]
  • 🟥 throughput [-412.885op/s; -213.959op/s] or [-12.871%; -6.670%]

scenario:Benchmarks.Trace.AspNetCoreBenchmark.SendRequest net472

  • 🟥 execution_time [+299.917ms; +300.765ms] or [+149.689%; +150.113%]

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

  • unstable execution_time [+359.597ms; +371.883ms] or [+390.717%; +404.067%]
  • 🟥 throughput [-6877.647op/s; -6710.990op/s] or [-56.515%; -55.145%]

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

  • 🟥 execution_time [+370.208ms; +374.509ms] or [+281.096%; +284.361%]
  • 🟥 throughput [-1198.316op/s; -990.475op/s] or [-11.600%; -9.588%]

scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • 🟥 execution_time [+311.359ms; +329.784ms] or [+143.160%; +151.632%]
  • 🟥 throughput [-695.079op/s; -676.769op/s] or [-62.981%; -61.322%]

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

  • unstable execution_time [-48.689ms; +85.093ms] or [-20.749%; +36.263%]
  • 🟥 throughput [-704.104op/s; -613.073op/s] or [-46.964%; -40.892%]

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

  • 🟥 allocated_mem [+2.305KB; +2.308KB] or [+5.442%; +5.450%]
  • 🟥 execution_time [+337.697ms; +345.875ms] or [+201.982%; +206.873%]
  • 🟥 throughput [-736.435op/s; -701.715op/s] or [-51.277%; -48.859%]

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

  • 🟩 throughput [+18.257op/s; +19.774op/s] or [+5.248%; +5.684%]

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

  • 🟩 execution_time [-194.715µs; -173.871µs] or [-9.864%; -8.808%]
  • 🟩 throughput [+49.232op/s; +55.550op/s] or [+9.719%; +10.966%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch net472

  • 🟥 execution_time [+305.021ms; +318.166ms] or [+153.603%; +160.223%]

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

  • 🟥 execution_time [+240.280ms; +253.680ms] or [+120.405%; +127.120%]

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

  • 🟥 execution_time [+298.857ms; +306.164ms] or [+150.133%; +153.804%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync net472

  • 🟥 execution_time [+305.374ms; +319.621ms] or [+153.349%; +160.503%]

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

  • unstable execution_time [+222.158ms; +251.350ms] or [+109.847%; +124.282%]

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

  • 🟥 execution_time [+305.461ms; +312.871ms] or [+154.821%; +158.577%]

scenario:Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync net472

  • 🟥 execution_time [+301.806ms; +314.267ms] or [+151.479%; +157.734%]

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

  • unstable execution_time [+209.662ms; +278.687ms] or [+104.497%; +138.900%]
  • 🟩 throughput [+42206.684op/s; +53457.010op/s] or [+8.381%; +10.615%]

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

  • 🟥 execution_time [+301.491ms; +307.824ms] or [+149.989%; +153.140%]

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

  • unstable execution_time [-90.241ms; -62.872ms] or [-41.962%; -29.236%]
  • unstable throughput [-102364.102op/s; -57596.823op/s] or [-28.081%; -15.800%]

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

  • 🟩 execution_time [-100.096ms; -96.005ms] or [-50.210%; -48.158%]

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

  • 🟩 allocated_mem [-26.669KB; -26.645KB] or [-9.728%; -9.720%]
  • 🟩 execution_time [-108.295µs; -59.194µs] or [-21.404%; -11.699%]
  • 🟩 throughput [+283.981op/s; +456.652op/s] or [+14.171%; +22.787%]

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

  • 🟩 execution_time [-94.541µs; -39.953µs] or [-16.383%; -6.924%]
  • 🟩 throughput [+143.412op/s; +291.889op/s] or [+8.193%; +16.676%]

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

  • unstable execution_time [+1.916µs; +6.923µs] or [+4.528%; +16.364%]

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

  • unstable execution_time [-13.809µs; -4.613µs] or [-21.425%; -7.156%]
  • unstable throughput [+1374.867op/s; +3356.505op/s] or [+8.435%; +20.593%]

scenario:Benchmarks.Trace.Log4netBenchmark.EnrichedLog net472

  • 🟥 execution_time [+304.149ms; +318.248ms] or [+153.734%; +160.860%]

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

  • 🟥 execution_time [+277.285ms; +296.847ms] or [+141.137%; +151.094%]

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

  • 🟥 execution_time [+301.764ms; +307.423ms] or [+151.070%; +153.903%]

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

  • unstable execution_time [-80.116ms; -51.563ms] or [-40.046%; -25.773%]
  • unstable throughput [-168538.204op/s; -95203.585op/s] or [-31.901%; -18.020%]

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

  • unstable execution_time [-55.552ms; -24.986ms] or [-28.159%; -12.665%]

scenario:Benchmarks.Trace.SerilogBenchmark.EnrichedLog net472

  • 🟥 execution_time [+299.034ms; +310.465ms] or [+149.042%; +154.739%]

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

  • unstable execution_time [+253.480ms; +291.829ms] or [+127.285%; +146.543%]

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

  • 🟥 execution_time [+303.637ms; +309.973ms] or [+153.985%; +157.199%]

scenario:Benchmarks.Trace.SingleSpanAspNetCoreBenchmark.SingleSpanAspNetCore net472

  • 🟥 execution_time [+299.695ms; +300.355ms] or [+149.489%; +149.819%]
  • 🟩 throughput [+60382405.597op/s; +60660143.031op/s] or [+43.974%; +44.176%]

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

  • unstable execution_time [+362.146ms; +375.467ms] or [+450.394%; +466.960%]
  • 🟥 throughput [-7399.721op/s; -7188.356op/s] or [-57.204%; -55.570%]

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

  • 🟥 execution_time [+301.213ms; +303.984ms] or [+150.238%; +151.620%]
  • 🟥 throughput [-30009396.344op/s; -28642116.175op/s] or [-13.292%; -12.687%]

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

  • unstable execution_time [-92.091ms; -69.962ms] or [-45.105%; -34.266%]

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

  • unstable execution_time [-74.518ms; -46.779ms] or [-37.707%; -23.671%]

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

  • 🟩 execution_time [-89.762ms; -85.497ms] or [-46.766%; -44.545%]

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

  • unstable execution_time [-77.051ms; -49.704ms] or [-37.857%; -24.420%]
  • 🟩 throughput [+72113.727op/s; +84314.901op/s] or [+7.162%; +8.374%]

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

  • unstable execution_time [-58.737ms; -33.290ms] or [-29.333%; -16.625%]
  • unstable throughput [-160870.959op/s; -85583.657op/s] or [-29.211%; -15.540%]

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

  • unstable execution_time [-72.690ms; -46.213ms] or [-36.522%; -23.219%]

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

  • unstable execution_time [-79.384ms; -50.781ms] or [-39.706%; -25.400%]
  • unstable throughput [-218958.762op/s; -85980.202op/s] or [-24.463%; -9.606%]

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

  • unstable execution_time [-26.982ms; -5.008ms] or [-13.704%; -2.543%]

Known flaky benchmarks without significant changes:

  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_AddEvent_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_GetContext_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_SetAttributes_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_SetStatus_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_SetStatus_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_UpdateName_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_AddEvent_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_GetContext_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_RecordException_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetAttributes_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetAttributes_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_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.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

dudikeleti added a commit that referenced this pull request May 12, 2026
…y serialized Json

JToken.DeepEquals on JObject ignores property order (it routes through
JPropertyKeyedCollection lookup), but JObject.ToString preserves the
original property order. Hashing on Json.ToString() therefore violated
the Equals/GetHashCode contract whenever two payloads encoded the same
expression with re-ordered keys - the same class of contract bug the
previous commit fixed for reference identity.

Drop Json from GetHashCode and hash only Str and Dsl. The contract still
holds because Equals already requires Str and Dsl to be ordinally equal
before it ever looks at Json, so any two Equals-equal segments now also
produce equal hash codes. Dsl encodes the same expression as Json in
practice, so hash distribution is unaffected for real probe configs. A
bonus is that we no longer allocate Json.ToString() on every hash.

Adds SnapshotSegmentTests.EquivalentJsonWithDifferentPropertyOrder_
EqualsAndGetHashCodeAreConsistent which fails under the previous hash
(Json?.ToString() captures property-insertion order) and passes with the
new one, locking in the property-order contract.

Addresses chatgpt-codex-connector[bot] review feedback on PR #8615
(discussion_r3227806286).

Co-authored-by: Cursor <[email protected]>
@dudikeleti
dudikeleti requested a review from Copilot May 13, 2026 10:01

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.

dudikeleti and others added 4 commits May 13, 2026 12:38
…ation models

The auto-generated/manually-written GetHashCode on several Dynamic
Instrumentation configuration models compared arrays and a JObject by
reference, while the matching Equals methods compared them by content.
That violates the Equals/GetHashCode contract for any case where Equals
deems them equal but the underlying arrays/JObject are different
instances - which is exactly what happens on every RCM apply, since
configuration is re-parsed into fresh allocations each time.

Fixes:

- Add NullableSequentialHashCode<T> helper alongside the existing
  NullableSequentialEquals<T>, with a T[] overload that avoids the
  IEnumerator<T> heap allocation and interface dispatch on arrays
  (the only kind of input we actually pass).
- FilterList, Where, ProbeDefinition, SpanDecorationProbe, LogProbe:
  hash arrays via NullableSequentialHashCode to match the existing
  content-based Equals.
- LogProbe: also include 'When' in the hash, which Equals already
  considered.
- SnapshotSegment: override the record-synthesized Equals/GetHashCode
  to compare the JObject Json field by content (JToken.DeepEquals /
  Json?.ToString) instead of by reference.

No behavior changes for capture-expression work or any other feature
- these are pure correctness fixes split out from a larger branch.

Co-authored-by: Cursor <[email protected]>
…merable<T>> and add regression test

- Remove the IEnumerable<T> overload of NullableSequentialHashCode. Every
  caller passes a T[] (Tags, AdditionalIds, Lines, Decorations, Segments,
  PackagePrefixes, Classes), so overload resolution always binds to the
  T[] overload anyway. Keeping the IEnumerable<T> version was dead code
  and a footgun if a future caller landed on a List<T>.

- Add ProbeConfigurationComparerTests.CurrentSnapshotsReparsedJsonContent_
  ProbeRelatedNotChanged. The test reproduces the RCM re-apply scenario:
  two LogProbe instances that are content-identical but whose
  SnapshotSegment.Json fields are independently parsed JObject instances
  (different references, same content) - exactly what
  DynamicInstrumentation.Deserialize<LogProbe> produces on every poll.
  Verified the test fails on master (the previous commit's
  SnapshotSegment override is the fix that makes it pass), preventing
  any regression that would re-introduce unnecessary IL re-instrumentation
  on every RCM cycle.

Co-authored-by: Cursor <[email protected]>
…y serialized Json

JToken.DeepEquals on JObject ignores property order (it routes through
JPropertyKeyedCollection lookup), but JObject.ToString preserves the
original property order. Hashing on Json.ToString() therefore violated
the Equals/GetHashCode contract whenever two payloads encoded the same
expression with re-ordered keys - the same class of contract bug the
previous commit fixed for reference identity.

Drop Json from GetHashCode and hash only Str and Dsl. The contract still
holds because Equals already requires Str and Dsl to be ordinally equal
before it ever looks at Json, so any two Equals-equal segments now also
produce equal hash codes. Dsl encodes the same expression as Json in
practice, so hash distribution is unaffected for real probe configs. A
bonus is that we no longer allocate Json.ToString() on every hash.

Adds SnapshotSegmentTests.EquivalentJsonWithDifferentPropertyOrder_
EqualsAndGetHashCodeAreConsistent which fails under the previous hash
(Json?.ToString() captures property-insertion order) and passes with the
new one, locking in the property-order contract.

Addresses chatgpt-codex-connector[bot] review feedback on PR #8615
(discussion_r3227806286).

Co-authored-by: Cursor <[email protected]>
@dudikeleti
dudikeleti merged commit cc6678f into master May 13, 2026
141 checks passed
@dudikeleti
dudikeleti deleted the dudik/di/fix-config-models-equality branch May 13, 2026 15:12
@github-actions github-actions Bot added this to the vNext-v3 milestone May 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants