Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for HotChocolate v15.x.x #6648

Merged
merged 5 commits into from
Feb 11, 2025
Merged

Conversation

andrewlock
Copy link
Member

Summary of changes

Bump to support latest version of HotChocolate

Reason for change

We want to support the latest versions

Implementation details

Bumped places where we use 14.x to 15.x, counting on the tests to catch any issues

Test coverage

Updated the Windows samples to test against latest, but otherwise pretty standard

@andrewlock andrewlock added type:enhancement Improvement to an existing feature area:automatic-instrumentation Automatic instrumentation managed C# code (Datadog.Trace.ClrProfiler.Managed) area:tests unit tests, integration tests area:test-apps apps used to test integrations labels Feb 10, 2025
@andrewlock andrewlock requested review from a team as code owners February 10, 2025 14:34
@andrewlock andrewlock force-pushed the andrew/bump-hotchocolate branch from 9dfd4ab to 7dfa90b Compare February 10, 2025 14:41
@andrewlock
Copy link
Member Author

andrewlock commented Feb 10, 2025

Execution-Time Benchmarks Report ⏱️

Execution-time results for samples comparing the following branches/commits:

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 shown 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).

gantt
    title Execution time (ms) FakeDbCommand (.NET Framework 4.6.2) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6648) - mean (69ms)  : 67, 72
     .   : milestone, 69,
    master - mean (71ms)  : 63, 79
     .   : milestone, 71,

    section CallTarget+Inlining+NGEN
    This PR (6648) - mean (1,000ms)  : 977, 1023
     .   : milestone, 1000,
    master - mean (992ms)  : 975, 1010
     .   : milestone, 992,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6648) - mean (103ms)  : 101, 105
     .   : milestone, 103,
    master - mean (103ms)  : 101, 105
     .   : milestone, 103,

    section CallTarget+Inlining+NGEN
    This PR (6648) - mean (672ms)  : 657, 687
     .   : milestone, 672,
    master - mean (674ms)  : 659, 690
     .   : milestone, 674,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6648) - mean (90ms)  : 88, 92
     .   : milestone, 90,
    master - mean (90ms)  : 88, 92
     .   : milestone, 90,

    section CallTarget+Inlining+NGEN
    This PR (6648) - mean (632ms)  : 617, 647
     .   : milestone, 632,
    master - mean (634ms)  : 617, 650
     .   : milestone, 634,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6648) - mean (190ms)  : 186, 194
     .   : milestone, 190,
    master - mean (190ms)  : 185, 196
     .   : milestone, 190,

    section CallTarget+Inlining+NGEN
    This PR (6648) - mean (1,094ms)  : 1066, 1123
     .   : milestone, 1094,
    master - mean (1,101ms)  : 1063, 1139
     .   : milestone, 1101,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6648) - mean (270ms)  : 265, 274
     .   : milestone, 270,
    master - mean (270ms)  : 262, 279
     .   : milestone, 270,

    section CallTarget+Inlining+NGEN
    This PR (6648) - mean (860ms)  : 829, 892
     .   : milestone, 860,
    master - mean (864ms)  : 833, 896
     .   : milestone, 864,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6648) - mean (261ms)  : 258, 265
     .   : milestone, 261,
    master - mean (262ms)  : 258, 266
     .   : milestone, 262,

    section CallTarget+Inlining+NGEN
    This PR (6648) - mean (847ms)  : 812, 882
     .   : milestone, 847,
    master - mean (847ms)  : 807, 886
     .   : milestone, 847,

Loading

@datadog-ddstaging
Copy link

datadog-ddstaging bot commented Feb 10, 2025

Datadog Report

Branch report: andrew/bump-hotchocolate
Commit report: 02d7a13
Test service: dd-trace-dotnet

✅ 0 Failed, 574436 Passed, 5454 Skipped, 46h 2m 7.95s Total Time

@bouwkast bouwkast force-pushed the andrew/bump-hotchocolate branch from 7dfa90b to 02d7a13 Compare February 10, 2025 21:55
@andrewlock
Copy link
Member Author

Benchmarks Report for tracer 🐌

Benchmarks for #6648 compared to master:

  • 4 benchmarks are faster, with geometric mean 1.169
  • 1 benchmarks are slower, with geometric mean 1.138
  • All benchmarks have the same allocations

The following thresholds were used for comparing the benchmark speeds:

  • Mann–Whitney U test with statistical test for significance of 5%
  • Only results indicating a difference greater than 10% and 0.3 ns are considered.

Allocation changes below 0.5% are ignored.

Benchmark details

Benchmarks.Trace.ActivityBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartStopWithChild net6.0 7.74μs 33ns 128ns 0.015 0.00748 0 5.61 KB
master StartStopWithChild netcoreapp3.1 9.99μs 55.2ns 336ns 0.0192 0.0096 0 5.8 KB
master StartStopWithChild net472 16μs 74.7ns 289ns 1.04 0.298 0.0942 6.22 KB
#6648 StartStopWithChild net6.0 7.96μs 45.4ns 334ns 0.0155 0.00775 0 5.61 KB
#6648 StartStopWithChild netcoreapp3.1 10.1μs 55.6ns 343ns 0.0154 0.00512 0 5.8 KB
#6648 StartStopWithChild net472 16μs 34.4ns 133ns 1.05 0.322 0.0966 6.2 KB
Benchmarks.Trace.AgentWriterBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 467μs 630ns 2.36μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 664μs 410ns 1.59μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces net472 842μs 596ns 2.23μs 0.422 0 0 3.3 KB
#6648 WriteAndFlushEnrichedTraces net6.0 475μs 234ns 905ns 0 0 0 2.7 KB
#6648 WriteAndFlushEnrichedTraces netcoreapp3.1 655μs 625ns 2.34μs 0 0 0 2.7 KB
#6648 WriteAndFlushEnrichedTraces net472 836μs 406ns 1.52μs 0.419 0 0 3.3 KB
Benchmarks.Trace.AspNetCoreBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendRequest net6.0 130μs 460ns 1.78μs 0.132 0 0 14.47 KB
master SendRequest netcoreapp3.1 147μs 284ns 1.02μs 0.222 0 0 17.27 KB
master SendRequest net472 0.000576ns 0.000431ns 0.00167ns 0 0 0 0 b
#6648 SendRequest net6.0 129μs 547ns 2.12μs 0.193 0 0 14.47 KB
#6648 SendRequest netcoreapp3.1 147μs 258ns 998ns 0.219 0 0 17.27 KB
#6648 SendRequest net472 0.00909ns 0.00166ns 0.00643ns 0 0 0 0 b
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 582μs 3.03μs 20.6μs 0.601 0 0 41.65 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 713μs 3.73μs 18.7μs 0.372 0 0 41.57 KB
master WriteAndFlushEnrichedTraces net472 861μs 4.27μs 19.1μs 8.13 2.57 0.428 53.3 KB
#6648 WriteAndFlushEnrichedTraces net6.0 573μs 2.59μs 13.2μs 0.553 0 0 41.58 KB
#6648 WriteAndFlushEnrichedTraces netcoreapp3.1 663μs 3.53μs 21.8μs 0.336 0 0 41.61 KB
#6648 WriteAndFlushEnrichedTraces net472 885μs 4.11μs 16.4μs 8.5 2.55 0.425 53.31 KB
Benchmarks.Trace.DbCommandBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master ExecuteNonQuery net6.0 1.41μs 1.65ns 6.39ns 0.0147 0 0 1.02 KB
master ExecuteNonQuery netcoreapp3.1 1.84μs 1.32ns 4.93ns 0.0139 0 0 1.02 KB
master ExecuteNonQuery net472 2.1μs 2.05ns 7.66ns 0.156 0.00105 0 987 B
#6648 ExecuteNonQuery net6.0 1.35μs 1.64ns 6.37ns 0.0141 0 0 1.02 KB
#6648 ExecuteNonQuery netcoreapp3.1 1.77μs 1.91ns 7.38ns 0.0132 0 0 1.02 KB
#6648 ExecuteNonQuery net472 2.14μs 1.4ns 5.07ns 0.156 0.00107 0 987 B
Benchmarks.Trace.ElasticsearchBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master CallElasticsearch net6.0 1.18μs 0.375ns 1.35ns 0.0136 0 0 976 B
master CallElasticsearch netcoreapp3.1 1.59μs 0.897ns 3.36ns 0.0127 0 0 976 B
master CallElasticsearch net472 2.62μs 1.35ns 5.05ns 0.158 0 0 995 B
master CallElasticsearchAsync net6.0 1.29μs 0.785ns 2.94ns 0.0131 0 0 952 B
master CallElasticsearchAsync netcoreapp3.1 1.66μs 0.492ns 1.84ns 0.0135 0 0 1.02 KB
master CallElasticsearchAsync net472 2.59μs 0.882ns 3.3ns 0.167 0 0 1.05 KB
#6648 CallElasticsearch net6.0 1.29μs 0.426ns 1.6ns 0.0135 0 0 976 B
#6648 CallElasticsearch netcoreapp3.1 1.51μs 0.849ns 3.29ns 0.0134 0 0 976 B
#6648 CallElasticsearch net472 2.63μs 3.73ns 14.5ns 0.157 0 0 995 B
#6648 CallElasticsearchAsync net6.0 1.25μs 0.566ns 2.04ns 0.0131 0 0 952 B
#6648 CallElasticsearchAsync netcoreapp3.1 1.65μs 1.23ns 4.76ns 0.0134 0 0 1.02 KB
#6648 CallElasticsearchAsync net472 2.61μs 2.09ns 8.1ns 0.166 0 0 1.05 KB
Benchmarks.Trace.GraphQLBenchmark - Faster 🎉 Same allocations ✔️

Faster 🎉 in #6648

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync‑net6.0 1.134 1,528.79 1,348.60

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master ExecuteAsync net6.0 1.53μs 1.12ns 4.33ns 0.0128 0 0 952 B
master ExecuteAsync netcoreapp3.1 1.61μs 0.749ns 2.8ns 0.0128 0 0 952 B
master ExecuteAsync net472 1.87μs 0.901ns 3.37ns 0.145 0 0 915 B
#6648 ExecuteAsync net6.0 1.35μs 0.542ns 2.03ns 0.0129 0 0 952 B
#6648 ExecuteAsync netcoreapp3.1 1.62μs 0.823ns 3.08ns 0.013 0 0 952 B
#6648 ExecuteAsync net472 1.78μs 0.518ns 2ns 0.145 0 0 915 B
Benchmarks.Trace.HttpClientBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendAsync net6.0 4.47μs 1.28ns 4.97ns 0.0314 0 0 2.31 KB
master SendAsync netcoreapp3.1 5.32μs 1.92ns 7.45ns 0.0373 0 0 2.85 KB
master SendAsync net472 7.46μs 2.38ns 9.24ns 0.494 0 0 3.12 KB
#6648 SendAsync net6.0 4.34μs 2.38ns 8.89ns 0.0324 0 0 2.31 KB
#6648 SendAsync netcoreapp3.1 5.26μs 7.2ns 26.9ns 0.0369 0 0 2.85 KB
#6648 SendAsync net472 7.49μs 2.58ns 9.65ns 0.495 0 0 3.12 KB
Benchmarks.Trace.ILoggerBenchmark - Faster 🎉 Same allocations ✔️

Faster 🎉 in #6648

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.ILoggerBenchmark.EnrichedLog‑net6.0 1.182 1,758.35 1,487.92

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 1.76μs 1.96ns 7.32ns 0.0225 0 0 1.64 KB
master EnrichedLog netcoreapp3.1 2.17μs 0.672ns 2.42ns 0.022 0 0 1.64 KB
master EnrichedLog net472 2.61μs 0.937ns 3.63ns 0.249 0 0 1.57 KB
#6648 EnrichedLog net6.0 1.49μs 0.854ns 3.2ns 0.0232 0 0 1.64 KB
#6648 EnrichedLog netcoreapp3.1 2.25μs 1.33ns 4.97ns 0.0223 0 0 1.64 KB
#6648 EnrichedLog net472 2.67μs 1.26ns 4.72ns 0.249 0 0 1.57 KB
Benchmarks.Trace.Log4netBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 115μs 143ns 534ns 0 0 0 4.28 KB
master EnrichedLog netcoreapp3.1 117μs 190ns 737ns 0.0583 0 0 4.28 KB
master EnrichedLog net472 150μs 84.2ns 326ns 0.674 0.225 0 4.46 KB
#6648 EnrichedLog net6.0 111μs 105ns 408ns 0.057 0 0 4.28 KB
#6648 EnrichedLog netcoreapp3.1 117μs 192ns 742ns 0.058 0 0 4.28 KB
#6648 EnrichedLog net472 150μs 98.1ns 380ns 0.674 0.225 0 4.46 KB
Benchmarks.Trace.NLogBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 3.05μs 1.01ns 3.91ns 0.0305 0 0 2.2 KB
master EnrichedLog netcoreapp3.1 4.09μs 1.05ns 4.07ns 0.0309 0 0 2.2 KB
master EnrichedLog net472 4.87μs 1.94ns 7.5ns 0.319 0 0 2.02 KB
#6648 EnrichedLog net6.0 2.9μs 1.11ns 4.17ns 0.0304 0 0 2.2 KB
#6648 EnrichedLog netcoreapp3.1 4.25μs 2.81ns 10.9ns 0.0296 0 0 2.2 KB
#6648 EnrichedLog net472 4.88μs 0.865ns 3ns 0.321 0 0 2.02 KB
Benchmarks.Trace.RedisBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendReceive net6.0 1.4μs 0.757ns 2.73ns 0.0159 0 0 1.14 KB
master SendReceive netcoreapp3.1 1.84μs 0.637ns 2.47ns 0.0148 0 0 1.14 KB
master SendReceive net472 2.15μs 1.95ns 7.55ns 0.183 0 0 1.16 KB
#6648 SendReceive net6.0 1.37μs 0.621ns 2.24ns 0.0164 0 0 1.14 KB
#6648 SendReceive netcoreapp3.1 1.68μs 1.26ns 4.73ns 0.0151 0 0 1.14 KB
#6648 SendReceive net472 2.09μs 1.02ns 3.8ns 0.183 0 0 1.16 KB
Benchmarks.Trace.SerilogBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 2.72μs 0.63ns 2.36ns 0.0229 0 0 1.6 KB
master EnrichedLog netcoreapp3.1 3.86μs 1.57ns 5.86ns 0.0213 0 0 1.65 KB
master EnrichedLog net472 4.38μs 1.49ns 5.57ns 0.322 0 0 2.04 KB
#6648 EnrichedLog net6.0 2.88μs 2.1ns 7.86ns 0.0217 0 0 1.6 KB
#6648 EnrichedLog netcoreapp3.1 4.02μs 8.09ns 31.3ns 0.0219 0 0 1.65 KB
#6648 EnrichedLog net472 4.47μs 10.8ns 41.9ns 0.322 0 0 2.04 KB
Benchmarks.Trace.SpanBenchmark - Slower ⚠️ Same allocations ✔️

Slower ⚠️ in #6648

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.SpanBenchmark.StartFinishScope‑netcoreapp3.1 1.138 686.79 781.58

Faster 🎉 in #6648

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.SpanBenchmark.StartFinishScope‑net6.0 1.180 565.69 479.26

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartFinishSpan net6.0 393ns 0.423ns 1.64ns 0.0081 0 0 576 B
master StartFinishSpan netcoreapp3.1 597ns 0.442ns 1.71ns 0.00769 0 0 576 B
master StartFinishSpan net472 632ns 0.388ns 1.5ns 0.0917 0 0 578 B
master StartFinishScope net6.0 565ns 0.971ns 3.76ns 0.00968 0 0 696 B
master StartFinishScope netcoreapp3.1 687ns 0.883ns 3.42ns 0.0093 0 0 696 B
master StartFinishScope net472 874ns 1ns 3.88ns 0.105 0 0 658 B
#6648 StartFinishSpan net6.0 401ns 0.755ns 2.92ns 0.00813 0 0 576 B
#6648 StartFinishSpan netcoreapp3.1 556ns 0.983ns 3.81ns 0.0078 0 0 576 B
#6648 StartFinishSpan net472 587ns 1.02ns 3.96ns 0.0917 0 0 578 B
#6648 StartFinishScope net6.0 479ns 0.597ns 2.31ns 0.00962 0 0 696 B
#6648 StartFinishScope netcoreapp3.1 782ns 0.991ns 3.84ns 0.00955 0 0 696 B
#6648 StartFinishScope net472 822ns 1.55ns 5.98ns 0.104 0 0 658 B
Benchmarks.Trace.TraceAnnotationsBenchmark - Faster 🎉 Same allocations ✔️

Faster 🎉 in #6648

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin‑net472 1.183 1,180.31 998.13

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master RunOnMethodBegin net6.0 680ns 0.515ns 1.99ns 0.00953 0 0 696 B
master RunOnMethodBegin netcoreapp3.1 932ns 1.03ns 3.85ns 0.00944 0 0 696 B
master RunOnMethodBegin net472 1.18μs 0.902ns 3.49ns 0.104 0 0 658 B
#6648 RunOnMethodBegin net6.0 720ns 0.899ns 3.48ns 0.00972 0 0 696 B
#6648 RunOnMethodBegin netcoreapp3.1 926ns 1.94ns 7.51ns 0.00938 0 0 696 B
#6648 RunOnMethodBegin net472 1μs 3.23ns 12.5ns 0.104 0 0 658 B

@andrewlock andrewlock merged commit 6c4bfa5 into master Feb 11, 2025
141 of 146 checks passed
@andrewlock andrewlock deleted the andrew/bump-hotchocolate branch February 11, 2025 12:05
@github-actions github-actions bot added this to the vNext-v3 milestone Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:automatic-instrumentation Automatic instrumentation managed C# code (Datadog.Trace.ClrProfiler.Managed) area:test-apps apps used to test integrations area:tests unit tests, integration tests type:enhancement Improvement to an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants