Skip to content

test(otlp): Refactor OTLP end-to-end testing helpers - #8973

Open
zacharycmontoya wants to merge 3 commits into
otel-tag-namefrom
refactor-otlp-testing
Open

test(otlp): Refactor OTLP end-to-end testing helpers#8973
zacharycmontoya wants to merge 3 commits into
otel-tag-namefrom
refactor-otlp-testing

Conversation

@zacharycmontoya

Copy link
Copy Markdown
Contributor

Summary of changes

Test-only changes to consolidate the submission/retrieval/scrubbing of OTLP data in the end-to-end snapshot test cases in tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/OpenTelemetrySdkTests.cs.

Reason for change

Isolating OTLP handling will allow us to more easily author OTLP end-to-end snapshot test cases in other sample applications.

Implementation details

Ports helpers methods from tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/OpenTelemetrySdkTests.cs to tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/Helpers/OtlpSnapshotHelper.cs

This also updates the Datadog.Trace.OSX solution filter to exclude a test application with the legacy style csproj file to reduce build errors in Rider on macOS.

Test coverage

The existing OpenTelemetrySdkTests confirm that the tests pass as before.

Other details

Note: This is built on top of the existing OpenTelemetry branches because it was isolated into its own set of commits while working on the comprehensive set of changes.

zacharycmontoya and others added 3 commits July 31, 2026 12:33
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@zacharycmontoya
zacharycmontoya requested review from a team as code owners July 31, 2026 20:52
@zacharycmontoya zacharycmontoya added the area:tests unit tests, integration tests label Jul 31, 2026
@zacharycmontoya
zacharycmontoya requested review from vandonr and removed request for a team July 31, 2026 20:52
@dd-trace-dotnet-ci-bot

Copy link
Copy Markdown

Execution-Time Benchmarks Report ⏱️

Execution-time results for samples comparing This PR (8973) 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
duration71.83 ± (71.79 - 72.13) ms72.76 ± (72.65 - 73.25) ms+1.3%✅⬆️
.NET Framework 4.8 - Bailout
duration80.27 ± (80.46 - 81.58) ms75.20 ± (75.11 - 75.47) ms-6.3%
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1094.89 ± (1093.39 - 1099.55) ms1093.58 ± (1093.55 - 1101.22) ms-0.1%
.NET Core 3.1 - Baseline
process.internal_duration_ms22.40 ± (22.35 - 22.45) ms22.30 ± (22.25 - 22.35) ms-0.4%
process.time_to_main_ms84.76 ± (84.47 - 85.06) ms83.17 ± (82.88 - 83.46) ms-1.9%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed11.03 ± (11.03 - 11.04) MB11.00 ± (11.00 - 11.00) MB-0.3%
runtime.dotnet.threads.count12 ± (12 - 12)12 ± (12 - 12)+0.0%
.NET Core 3.1 - Bailout
process.internal_duration_ms22.33 ± (22.29 - 22.37) ms21.99 ± (21.96 - 22.01) ms-1.5%
process.time_to_main_ms85.28 ± (85.01 - 85.56) ms82.75 ± (82.59 - 82.91) ms-3.0%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed11.06 ± (11.06 - 11.07) MB11.04 ± (11.03 - 11.04) MB-0.2%
runtime.dotnet.threads.count13 ± (13 - 13)13 ± (13 - 13)+0.0%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms210.28 ± (209.34 - 211.21) ms210.85 ± (209.94 - 211.75) ms+0.3%✅⬆️
process.time_to_main_ms538.93 ± (537.63 - 540.23) ms539.50 ± (538.20 - 540.79) ms+0.1%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed49.64 ± (49.60 - 49.67) MB49.49 ± (49.45 - 49.53) MB-0.3%
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)+0.0%✅⬆️
.NET 6 - Baseline
process.internal_duration_ms21.25 ± (21.20 - 21.30) ms21.04 ± (20.99 - 21.08) ms-1.0%
process.time_to_main_ms74.78 ± (74.49 - 75.07) ms73.76 ± (73.48 - 74.03) ms-1.4%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.72 ± (10.72 - 10.73) MB10.73 ± (10.73 - 10.73) MB+0.1%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 6 - Bailout
process.internal_duration_ms20.82 ± (20.79 - 20.86) ms20.96 ± (20.93 - 21.00) ms+0.7%✅⬆️
process.time_to_main_ms72.52 ± (72.35 - 72.69) ms73.93 ± (73.70 - 74.17) ms+2.0%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.83 ± (10.83 - 10.84) MB10.84 ± (10.83 - 10.84) MB+0.0%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms371.98 ± (369.86 - 374.09) ms370.66 ± (367.82 - 373.49) ms-0.4%
process.time_to_main_ms546.78 ± (545.59 - 547.96) ms543.90 ± (542.74 - 545.06) ms-0.5%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed50.65 ± (50.63 - 50.68) MB50.64 ± (50.61 - 50.66) MB-0.0%
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)+0.0%✅⬆️
.NET 8 - Baseline
process.internal_duration_ms19.21 ± (19.17 - 19.25) ms19.09 ± (19.06 - 19.12) ms-0.6%
process.time_to_main_ms71.47 ± (71.20 - 71.74) ms69.95 ± (69.84 - 70.07) ms-2.1%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.76 ± (7.76 - 7.76) MB7.77 ± (7.76 - 7.78) MB+0.1%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 8 - Bailout
process.internal_duration_ms19.44 ± (19.40 - 19.49) ms19.24 ± (19.21 - 19.28) ms-1.0%
process.time_to_main_ms74.88 ± (74.62 - 75.13) ms73.68 ± (73.42 - 73.95) ms-1.6%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.83 ± (7.82 - 7.84) MB7.82 ± (7.81 - 7.82) MB-0.1%
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms296.66 ± (294.51 - 298.81) ms296.84 ± (294.14 - 299.55) ms+0.1%✅⬆️
process.time_to_main_ms492.46 ± (491.49 - 493.44) ms494.21 ± (493.07 - 495.35) ms+0.4%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed38.07 ± (38.04 - 38.10) MB38.11 ± (38.09 - 38.14) MB+0.1%✅⬆️
runtime.dotnet.threads.count27 ± (27 - 27)27 ± (27 - 27)-0.6%

HttpMessageHandler

Metric Master (Mean ± 95% CI) Current (Mean ± 95% CI) Change Status
.NET Framework 4.8 - Baseline
duration210.98 ± (210.61 - 211.56) ms206.55 ± (206.36 - 207.31) ms-2.1%
.NET Framework 4.8 - Bailout
duration214.99 ± (214.44 - 215.34) ms211.14 ± (210.70 - 211.71) ms-1.8%
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1265.27 ± (1264.17 - 1271.43) ms1240.66 ± (1239.29 - 1246.09) ms-1.9%
.NET Core 3.1 - Baseline
process.internal_duration_ms203.57 ± (203.12 - 204.02) ms197.41 ± (196.94 - 197.89) ms-3.0%
process.time_to_main_ms89.89 ± (89.58 - 90.20) ms86.44 ± (86.15 - 86.73) ms-3.8%
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.07 ± (16.05 - 16.09) MB16.15 ± (16.13 - 16.17) MB+0.5%✅⬆️
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (20 - 20)-0.3%
.NET Core 3.1 - Bailout
process.internal_duration_ms202.98 ± (202.52 - 203.44) ms197.99 ± (197.53 - 198.45) ms-2.5%
process.time_to_main_ms91.51 ± (91.27 - 91.76) ms87.98 ± (87.77 - 88.18) ms-3.9%
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.08 ± (16.06 - 16.09) MB16.21 ± (16.19 - 16.23) MB+0.8%✅⬆️
runtime.dotnet.threads.count21 ± (21 - 21)21 ± (21 - 21)-1.3%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms401.33 ± (399.93 - 402.73) ms391.90 ± (390.39 - 393.40) ms-2.4%
process.time_to_main_ms566.20 ± (565.03 - 567.37) ms553.30 ± (551.96 - 554.64) ms-2.3%
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed59.80 ± (59.70 - 59.91) MB58.84 ± (58.62 - 59.07) MB-1.6%
runtime.dotnet.threads.count30 ± (30 - 30)30 ± (30 - 30)-0.2%
.NET 6 - Baseline
process.internal_duration_ms208.47 ± (208.06 - 208.87) ms202.86 ± (202.39 - 203.33) ms-2.7%
process.time_to_main_ms78.92 ± (78.61 - 79.23) ms75.99 ± (75.71 - 76.26) ms-3.7%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.46 ± (16.44 - 16.48) MB16.43 ± (16.40 - 16.45) MB-0.2%
runtime.dotnet.threads.count20 ± (19 - 20)19 ± (19 - 19)-1.2%
.NET 6 - Bailout
process.internal_duration_ms207.40 ± (206.88 - 207.93) ms201.95 ± (201.55 - 202.34) ms-2.6%
process.time_to_main_ms79.58 ± (79.36 - 79.80) ms76.62 ± (76.43 - 76.81) ms-3.7%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.48 ± (16.46 - 16.50) MB16.41 ± (16.38 - 16.44) MB-0.4%
runtime.dotnet.threads.count21 ± (20 - 21)20 ± (20 - 20)-1.4%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms579.91 ± (577.66 - 582.17) ms585.11 ± (582.71 - 587.51) ms+0.9%✅⬆️
process.time_to_main_ms579.70 ± (578.49 - 580.91) ms566.01 ± (564.98 - 567.04) ms-2.4%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed61.61 ± (61.53 - 61.69) MB61.69 ± (61.61 - 61.78) MB+0.1%✅⬆️
runtime.dotnet.threads.count31 ± (31 - 31)31 ± (31 - 31)+0.5%✅⬆️
.NET 8 - Baseline
process.internal_duration_ms209.30 ± (208.84 - 209.75) ms202.18 ± (201.75 - 202.61) ms-3.4%
process.time_to_main_ms78.75 ± (78.48 - 79.01) ms75.53 ± (75.26 - 75.79) ms-4.1%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.78 ± (11.76 - 11.80) MB11.81 ± (11.79 - 11.83) MB+0.3%✅⬆️
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)-2.1%
.NET 8 - Bailout
process.internal_duration_ms209.21 ± (208.71 - 209.70) ms201.78 ± (201.36 - 202.20) ms-3.5%
process.time_to_main_ms80.08 ± (79.86 - 80.29) ms76.65 ± (76.49 - 76.80) ms-4.3%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.83 ± (11.81 - 11.85) MB11.87 ± (11.85 - 11.89) MB+0.3%✅⬆️
runtime.dotnet.threads.count20 ± (20 - 20)19 ± (19 - 19)-2.9%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms517.32 ± (511.82 - 522.81) ms508.91 ± (506.05 - 511.77) ms-1.6%
process.time_to_main_ms531.98 ± (531.07 - 532.89) ms518.00 ± (517.13 - 518.87) ms-2.6%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed51.36 ± (51.31 - 51.41) MB51.40 ± (51.36 - 51.44) MB+0.1%✅⬆️
runtime.dotnet.threads.count30 ± (30 - 30)30 ± (30 - 30)-0.1%
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 (8973) - mean (73ms)  : 68, 77
    master - mean (72ms)  : 69, 75

    section Bailout
    This PR (8973) - mean (75ms)  : 73, 77
    master - mean (81ms)  : 73, 89

    section CallTarget+Inlining+NGEN
    This PR (8973) - mean (1,097ms)  : 1042, 1153
    master - mean (1,096ms)  : 1052, 1141

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 (8973) - mean (113ms)  : 106, 120
    master - mean (115ms)  : 108, 121

    section Bailout
    This PR (8973) - mean (111ms)  : 109, 113
    master - mean (115ms)  : 108, 122

    section CallTarget+Inlining+NGEN
    This PR (8973) - mean (786ms)  : 762, 811
    master - mean (785ms)  : 763, 807

Loading
FakeDbCommand (.NET 6)
gantt
    title Execution time (ms) FakeDbCommand (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8973) - mean (102ms)  : 95, 108
    master - mean (103ms)  : 97, 109

    section Bailout
    This PR (8973) - mean (102ms)  : 96, 108
    master - mean (99ms)  : 96, 103

    section CallTarget+Inlining+NGEN
    This PR (8973) - mean (943ms)  : 904, 981
    master - mean (950ms)  : 901, 999

Loading
FakeDbCommand (.NET 8)
gantt
    title Execution time (ms) FakeDbCommand (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8973) - mean (96ms)  : 94, 99
    master - mean (98ms)  : 92, 105

    section Bailout
    This PR (8973) - mean (101ms)  : 95, 107
    master - mean (102ms)  : 96, 108

    section CallTarget+Inlining+NGEN
    This PR (8973) - mean (821ms)  : 781, 861
    master - mean (822ms)  : 782, 862

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 (8973) - mean (207ms)  : 201, 212
    master - mean (211ms)  : 205, 217

    section Bailout
    This PR (8973) - mean (211ms)  : 206, 216
    master - mean (215ms)  : 211, 219

    section CallTarget+Inlining+NGEN
    This PR (8973) - mean (1,243ms)  : 1192, 1293
    master - mean (1,268ms)  : 1214, 1321

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 (8973) - mean (294ms)  : 287, 301
    master - mean (303ms)  : 294, 312

    section Bailout
    This PR (8973) - mean (295ms)  : 290, 301
    master - mean (305ms)  : 295, 315

    section CallTarget+Inlining+NGEN
    This PR (8973) - mean (987ms)  : 965, 1008
    master - mean (1,009ms)  : 984, 1035

Loading
HttpMessageHandler (.NET 6)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8973) - mean (288ms)  : 282, 294
    master - mean (298ms)  : 291, 305

    section Bailout
    This PR (8973) - mean (287ms)  : 282, 292
    master - mean (297ms)  : 291, 303

    section CallTarget+Inlining+NGEN
    This PR (8973) - mean (1,186ms)  : 1145, 1226
    master - mean (1,200ms)  : 1160, 1239

Loading
HttpMessageHandler (.NET 8)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8973) - mean (288ms)  : 281, 296
    master - mean (300ms)  : 294, 306

    section Bailout
    This PR (8973) - mean (290ms)  : 284, 295
    master - mean (301ms)  : 293, 308

    section CallTarget+Inlining+NGEN
    This PR (8973) - mean (1,059ms)  : 1011, 1108
    master - mean (1,094ms)  : 989, 1199

Loading

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

Labels

area:tests unit tests, integration tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant