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 GraphQL HotChocolate v14 #6248

Merged
merged 13 commits into from
Dec 3, 2024
Merged

Conversation

vandonr
Copy link
Contributor

@vandonr vandonr commented Nov 6, 2024

Summary of changes

Hot Chocolate v14 was released recently: NuGet
This new version doesn't work with the existing integration

Reason for change

Implementation details

picked up work from an external contributor (@tobias-tengler in #6180)
tried to reduce a bit the amount of diff by reusing more existing code

Test coverage

integration test runs on new version

Other details

@vandonr vandonr requested review from a team as code owners November 6, 2024 16:24
Copy link
Contributor

github-actions bot commented Nov 6, 2024

Snapshots difference summary

The following differences have been observed in committed snapshots. It is meant to help the reviewer.
The diff is simplistic, so please check some files anyway while we improve it.

2 occurrences of :

-    Error: 1,
[...]
-      error.msg: The HTTP response has status code 500.,
[...]
-      http.status_code: 500,
+      http.status_code: 200,

6 occurrences of :

-    Resource: Uncompleted operation,
+    Resource: Query ErrorQuery,

6 occurrences of :

-      graphql.operation.type: Uncompleted,
+      graphql.operation.name: ErrorQuery,
+      graphql.operation.type: Query,
[...]
-  throwNotImplementedException {
-    name
-  }
[...]
+  throwException

2 occurrences of :

-      http.status_code: 400,
+      http.status_code: 200,

@datadog-ddstaging
Copy link

datadog-ddstaging bot commented Nov 6, 2024

Datadog Report

Branch report: vandonr/hotchocolate
Commit report: 2a8fd3d
Test service: dd-trace-dotnet

✅ 0 Failed, 461810 Passed, 3615 Skipped, 32h 32m 54.8s Total Time

@andrewlock
Copy link
Member

andrewlock commented Nov 6, 2024

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 (6248) - mean (69ms)  : 66, 71
     .   : milestone, 69,
    master - mean (69ms)  : 66, 71
     .   : milestone, 69,

    section CallTarget+Inlining+NGEN
    This PR (6248) - mean (977ms)  : 952, 1002
     .   : milestone, 977,
    master - mean (981ms)  : 959, 1003
     .   : milestone, 981,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6248) - mean (108ms)  : 107, 110
     .   : milestone, 108,
    master - mean (108ms)  : 106, 111
     .   : milestone, 108,

    section CallTarget+Inlining+NGEN
    This PR (6248) - mean (679ms)  : 665, 693
     .   : milestone, 679,
    master - mean (681ms)  : 663, 700
     .   : milestone, 681,

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

    section CallTarget+Inlining+NGEN
    This PR (6248) - mean (628ms)  : 613, 644
     .   : milestone, 628,
    master - mean (633ms)  : 620, 646
     .   : milestone, 633,

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

    section CallTarget+Inlining+NGEN
    This PR (6248) - mean (1,094ms)  : 1070, 1119
     .   : milestone, 1094,
    master - mean (1,095ms)  : 1066, 1123
     .   : milestone, 1095,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6248) - mean (276ms)  : 271, 280
     .   : milestone, 276,
    master - mean (277ms)  : 272, 282
     .   : milestone, 277,

    section CallTarget+Inlining+NGEN
    This PR (6248) - mean (872ms)  : 841, 903
     .   : milestone, 872,
    master - mean (867ms)  : 842, 893
     .   : milestone, 867,

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

    section CallTarget+Inlining+NGEN
    This PR (6248) - mean (846ms)  : 814, 878
     .   : milestone, 846,
    master - mean (853ms)  : 822, 884
     .   : milestone, 853,

Loading

@andrewlock
Copy link
Member

andrewlock commented Nov 6, 2024

Benchmarks Report for tracer 🐌

Benchmarks for #6248 compared to master:

  • 1 benchmarks are faster, with geometric mean 1.128
  • 1 benchmarks are slower, with geometric mean 1.117
  • 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.91μs 44.6ns 309ns 0.015 0.00751 0 5.61 KB
master StartStopWithChild netcoreapp3.1 10.1μs 44.6ns 194ns 0.0193 0.00482 0 5.81 KB
master StartStopWithChild net472 16.3μs 59.9ns 232ns 1.05 0.306 0.105 6.2 KB
#6248 StartStopWithChild net6.0 7.97μs 42.1ns 298ns 0.0151 0.00756 0 5.61 KB
#6248 StartStopWithChild netcoreapp3.1 9.9μs 55.8ns 374ns 0.0239 0.00955 0 5.8 KB
#6248 StartStopWithChild net472 16.2μs 34ns 127ns 1.04 0.31 0.0979 6.21 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 483μs 125ns 468ns 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 654μs 586ns 2.19μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces net472 847μs 498ns 1.93μs 0.419 0 0 3.3 KB
#6248 WriteAndFlushEnrichedTraces net6.0 480μs 435ns 1.63μs 0 0 0 2.7 KB
#6248 WriteAndFlushEnrichedTraces netcoreapp3.1 645μs 371ns 1.39μs 0 0 0 2.7 KB
#6248 WriteAndFlushEnrichedTraces net472 837μs 659ns 2.55μs 0.417 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 148μs 849ns 6.52μs 0.142 0 0 14.47 KB
master SendRequest netcoreapp3.1 170μs 954ns 8.69μs 0.157 0 0 17.27 KB
master SendRequest net472 0.000269ns 0.000207ns 0.000748ns 0 0 0 0 b
#6248 SendRequest net6.0 149μs 854ns 7.3μs 0.154 0 0 14.47 KB
#6248 SendRequest netcoreapp3.1 164μs 877ns 6.2μs 0.162 0 0 17.27 KB
#6248 SendRequest net472 0.00165ns 0.000591ns 0.00229ns 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 590μs 3.35μs 23μs 0.568 0 0 41.7 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 693μs 3.78μs 21.4μs 0.336 0 0 41.85 KB
master WriteAndFlushEnrichedTraces net472 863μs 4.43μs 22.2μs 8.5 2.55 0.425 53.35 KB
#6248 WriteAndFlushEnrichedTraces net6.0 580μs 2.75μs 12.9μs 0.561 0 0 41.63 KB
#6248 WriteAndFlushEnrichedTraces netcoreapp3.1 676μs 3.11μs 12.4μs 0.34 0 0 41.77 KB
#6248 WriteAndFlushEnrichedTraces net472 875μs 3.54μs 13.2μs 8.08 2.55 0.425 53.3 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.27μs 0.915ns 3.42ns 0.014 0 0 1.02 KB
master ExecuteNonQuery netcoreapp3.1 1.75μs 1.36ns 5.28ns 0.0141 0 0 1.02 KB
master ExecuteNonQuery net472 2.1μs 1.26ns 4.7ns 0.156 0.00105 0 987 B
#6248 ExecuteNonQuery net6.0 1.31μs 1.34ns 5.17ns 0.0145 0 0 1.02 KB
#6248 ExecuteNonQuery netcoreapp3.1 1.73μs 1.38ns 5.33ns 0.0138 0 0 1.02 KB
#6248 ExecuteNonQuery net472 2.02μs 2.06ns 7.99ns 0.157 0.00102 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.22μs 0.861ns 3.33ns 0.0134 0 0 976 B
master CallElasticsearch netcoreapp3.1 1.62μs 0.876ns 3.39ns 0.0128 0 0 976 B
master CallElasticsearch net472 2.59μs 7.43ns 28.8ns 0.158 0 0 995 B
master CallElasticsearchAsync net6.0 1.35μs 0.445ns 1.72ns 0.0128 0 0 952 B
master CallElasticsearchAsync netcoreapp3.1 1.61μs 0.798ns 3.09ns 0.0136 0 0 1.02 KB
master CallElasticsearchAsync net472 2.57μs 0.884ns 3.19ns 0.166 0 0 1.05 KB
#6248 CallElasticsearch net6.0 1.28μs 0.81ns 3.14ns 0.0135 0 0 976 B
#6248 CallElasticsearch netcoreapp3.1 1.54μs 1.24ns 4.79ns 0.0132 0 0 976 B
#6248 CallElasticsearch net472 2.68μs 1.51ns 5.45ns 0.157 0 0 995 B
#6248 CallElasticsearchAsync net6.0 1.29μs 3.2ns 12ns 0.0134 0 0 952 B
#6248 CallElasticsearchAsync netcoreapp3.1 1.6μs 0.342ns 1.23ns 0.0136 0 0 1.02 KB
#6248 CallElasticsearchAsync net472 2.66μs 1.58ns 6.12ns 0.166 0 0 1.05 KB
Benchmarks.Trace.GraphQLBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master ExecuteAsync net6.0 1.32μs 0.442ns 1.65ns 0.0133 0 0 952 B
master ExecuteAsync netcoreapp3.1 1.68μs 4.13ns 15.5ns 0.0125 0 0 952 B
master ExecuteAsync net472 1.77μs 0.709ns 2.75ns 0.145 0 0 915 B
#6248 ExecuteAsync net6.0 1.36μs 0.894ns 3.35ns 0.0136 0 0 952 B
#6248 ExecuteAsync netcoreapp3.1 1.61μs 0.827ns 3.1ns 0.0129 0 0 952 B
#6248 ExecuteAsync net472 1.91μs 0.554ns 2.15ns 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.3μs 1.74ns 6.53ns 0.0324 0 0 2.31 KB
master SendAsync netcoreapp3.1 5.32μs 2.56ns 9.57ns 0.0373 0 0 2.85 KB
master SendAsync net472 7.38μs 1.92ns 7.43ns 0.493 0 0 3.12 KB
#6248 SendAsync net6.0 4.47μs 1.62ns 6.07ns 0.0311 0 0 2.31 KB
#6248 SendAsync netcoreapp3.1 5.34μs 3.4ns 13.2ns 0.0374 0 0 2.85 KB
#6248 SendAsync net472 7.34μs 1.72ns 6.66ns 0.496 0 0 3.12 KB
Benchmarks.Trace.ILoggerBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 1.47μs 2.06ns 7.97ns 0.023 0 0 1.64 KB
master EnrichedLog netcoreapp3.1 2.19μs 1.73ns 6.7ns 0.0218 0 0 1.64 KB
master EnrichedLog net472 2.48μs 1.15ns 4.29ns 0.249 0 0 1.57 KB
#6248 EnrichedLog net6.0 1.47μs 1.04ns 3.9ns 0.023 0 0 1.64 KB
#6248 EnrichedLog netcoreapp3.1 2.2μs 1.02ns 3.82ns 0.0221 0 0 1.64 KB
#6248 EnrichedLog net472 2.58μs 1.43ns 5.54ns 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 120μs 172ns 620ns 0.0606 0 0 4.28 KB
master EnrichedLog netcoreapp3.1 123μs 226ns 875ns 0 0 0 4.28 KB
master EnrichedLog net472 153μs 85.2ns 330ns 0.683 0.228 0 4.46 KB
#6248 EnrichedLog net6.0 120μs 167ns 647ns 0.0605 0 0 4.28 KB
#6248 EnrichedLog netcoreapp3.1 124μs 235ns 912ns 0.062 0 0 4.28 KB
#6248 EnrichedLog net472 152μs 98.4ns 381ns 0.684 0.228 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.09μs 0.872ns 3.38ns 0.031 0 0 2.2 KB
master EnrichedLog netcoreapp3.1 4.21μs 3.09ns 12ns 0.0293 0 0 2.2 KB
master EnrichedLog net472 4.87μs 1.41ns 5.28ns 0.319 0 0 2.02 KB
#6248 EnrichedLog net6.0 3.08μs 0.701ns 2.72ns 0.0308 0 0 2.2 KB
#6248 EnrichedLog netcoreapp3.1 4.13μs 1.9ns 7.11ns 0.0289 0 0 2.2 KB
#6248 EnrichedLog net472 4.77μs 0.933ns 3.36ns 0.32 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.33μs 0.963ns 3.73ns 0.0159 0 0 1.14 KB
master SendReceive netcoreapp3.1 1.73μs 0.295ns 1.1ns 0.0156 0 0 1.14 KB
master SendReceive net472 2.09μs 1.09ns 4.24ns 0.184 0 0 1.16 KB
#6248 SendReceive net6.0 1.39μs 0.513ns 1.92ns 0.016 0 0 1.14 KB
#6248 SendReceive netcoreapp3.1 1.83μs 0.98ns 3.79ns 0.0155 0 0 1.14 KB
#6248 SendReceive net472 2.21μs 1.45ns 5.6ns 0.184 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.78μs 1.05ns 4.07ns 0.0221 0 0 1.6 KB
master EnrichedLog netcoreapp3.1 3.84μs 8.26ns 32ns 0.0227 0 0 1.65 KB
master EnrichedLog net472 4.39μs 3.6ns 13.9ns 0.322 0 0 2.04 KB
#6248 EnrichedLog net6.0 2.76μs 1.55ns 6.02ns 0.022 0 0 1.6 KB
#6248 EnrichedLog netcoreapp3.1 3.85μs 1.49ns 5.75ns 0.0213 0 0 1.65 KB
#6248 EnrichedLog net472 4.42μs 1.1ns 3.97ns 0.322 0 0 2.04 KB
Benchmarks.Trace.SpanBenchmark - Slower ⚠️ Same allocations ✔️

Slower ⚠️ in #6248

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.SpanBenchmark.StartFinishScope‑net6.0 1.117 503.56 562.49

Faster 🎉 in #6248

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑netcoreapp3.1 1.128 636.21 563.85

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartFinishSpan net6.0 396ns 0.253ns 0.979ns 0.00807 0 0 576 B
master StartFinishSpan netcoreapp3.1 636ns 0.527ns 2.04ns 0.00747 0 0 576 B
master StartFinishSpan net472 609ns 0.368ns 1.43ns 0.0918 0 0 578 B
master StartFinishScope net6.0 503ns 0.279ns 1.08ns 0.00961 0 0 696 B
master StartFinishScope netcoreapp3.1 768ns 0.609ns 2.36ns 0.00953 0 0 696 B
master StartFinishScope net472 831ns 1.18ns 4.59ns 0.104 0 0 658 B
#6248 StartFinishSpan net6.0 428ns 0.222ns 0.859ns 0.00803 0 0 576 B
#6248 StartFinishSpan netcoreapp3.1 563ns 0.466ns 1.8ns 0.00787 0 0 576 B
#6248 StartFinishSpan net472 678ns 1.15ns 4.46ns 0.0915 0 0 578 B
#6248 StartFinishScope net6.0 564ns 0.574ns 2.15ns 0.00988 0 0 696 B
#6248 StartFinishScope netcoreapp3.1 697ns 0.471ns 1.82ns 0.0094 0 0 696 B
#6248 StartFinishScope net472 846ns 0.844ns 3.27ns 0.104 0 0 658 B
Benchmarks.Trace.TraceAnnotationsBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master RunOnMethodBegin net6.0 641ns 0.381ns 1.47ns 0.00968 0 0 696 B
master RunOnMethodBegin netcoreapp3.1 881ns 0.657ns 2.54ns 0.00925 0 0 696 B
master RunOnMethodBegin net472 1.07μs 0.673ns 2.61ns 0.104 0 0 658 B
#6248 RunOnMethodBegin net6.0 605ns 1.73ns 6.7ns 0.0098 0 0 696 B
#6248 RunOnMethodBegin netcoreapp3.1 890ns 0.713ns 2.76ns 0.00905 0 0 696 B
#6248 RunOnMethodBegin net472 1.13μs 0.817ns 3.16ns 0.104 0 0 658 B

@andrewlock
Copy link
Member

andrewlock commented Nov 6, 2024

Throughput/Crank Report ⚡

Throughput results for AspNetCoreSimpleController comparing the following branches/commits:

Cases where throughput results for the PR are worse than latest master (5% drop or greater), results are shown in red.

Note that these results are based on a single point-in-time result for each branch. For full results, see one of the many, many dashboards!

gantt
    title Throughput Linux x64 (Total requests) 
    dateFormat  X
    axisFormat %s
    section Baseline
    This PR (6248) (11.275M)   : 0, 11275487
    master (11.142M)   : 0, 11142160
    benchmarks/2.9.0 (11.033M)   : 0, 11032866

    section Automatic
    This PR (6248) (7.349M)   : 0, 7349440
    master (7.363M)   : 0, 7363424
    benchmarks/2.9.0 (7.786M)   : 0, 7785853

    section Trace stats
    master (7.607M)   : 0, 7607008

    section Manual
    master (11.275M)   : 0, 11275455

    section Manual + Automatic
    This PR (6248) (6.826M)   : 0, 6826433
    master (6.792M)   : 0, 6792352

    section DD_TRACE_ENABLED=0
    master (10.439M)   : 0, 10439037

Loading
gantt
    title Throughput Linux arm64 (Total requests) 
    dateFormat  X
    axisFormat %s
    section Baseline
    This PR (6248) (9.712M)   : 0, 9712096
    master (9.654M)   : 0, 9653591
    benchmarks/2.9.0 (9.495M)   : 0, 9494821

    section Automatic
    This PR (6248) (6.405M)   : 0, 6405365
    master (6.390M)   : 0, 6389835

    section Trace stats
    master (6.750M)   : 0, 6750226

    section Manual
    master (9.569M)   : 0, 9568710

    section Manual + Automatic
    This PR (6248) (6.051M)   : 0, 6051417
    master (6.103M)   : 0, 6103364

    section DD_TRACE_ENABLED=0
    master (8.654M)   : 0, 8654106

Loading
gantt
    title Throughput Windows x64 (Total requests) 
    dateFormat  X
    axisFormat %s
    section Baseline
    This PR (6248) (10.099M)   : 0, 10098659
    master (10.012M)   : 0, 10011511
    benchmarks/2.9.0 (10.020M)   : 0, 10019592

    section Automatic
    This PR (6248) (6.413M)   : 0, 6413081
    master (6.299M)   : 0, 6298610
    benchmarks/2.9.0 (7.255M)   : 0, 7255257

    section Trace stats
    master (7.028M)   : 0, 7027938

    section Manual
    master (9.897M)   : 0, 9896735

    section Manual + Automatic
    This PR (6248) (6.134M)   : 0, 6133640
    master (5.876M)   : 0, 5876361

    section DD_TRACE_ENABLED=0
    master (9.276M)   : 0, 9275838

Loading

@vandonr
Copy link
Contributor Author

vandonr commented Nov 14, 2024

the current issue with this PR is around the subscription step of the integration tests.
We have a step that sends a subscription request, which is supposed to fail, but it used to fail because subscriptions were not supported (the wrong kind of failure), and this went unnoticed.
Now, apparently subscriptions are supported, and we get an "Unexpected Execution Error" (the right kind of error I think), EXCEPT for dotnet 6.0 where subscriptions are still not supported it'd seem ? I didn't find any documentation on this.
I can reproduce this locally, but it hasn't helped me much so far.

@tobias-tengler
Copy link
Contributor

@vandonr As you just want to test what happens if an error is thrown during the execution step and not subscriptions per se, you can simply create a new field that throws upon execution.

You can apply the below diff via git apply and it should (hopefully) make it work across all target frameworks. The snapshots will need to be updated.

diff --git a/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/HotChocolateTests.cs b/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/HotChocolateTests.cs
index 1e04245ab..c7d22e856 100644
--- a/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/HotChocolateTests.cs
+++ b/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/HotChocolateTests.cs
@@ -135,7 +135,7 @@ namespace Datadog.Trace.ClrProfiler.IntegrationTests
                 SubmitGraphqlRequest(url: "/graphql", httpMethod: "POST", graphQlRequestBody: @"{""query"":""{boook{title author{name}}}""}");
 
                 // FAILURE: query fails 'execute' step
-                SubmitGraphqlRequest(url: "/graphql", httpMethod: "POST", graphQlRequestBody: @"{""query"":""subscription NotImplementedSub{throwNotImplementedException{name}}""}");
+                SubmitGraphqlRequest(url: "/graphql", httpMethod: "POST", graphQlRequestBody: @"{""query"": ""query ErrorQuery{throwException}""}");
             }
 
             async Task SubmitWebsocketRequests()
@@ -147,7 +147,7 @@ namespace Datadog.Trace.ClrProfiler.IntegrationTests
                 await SubmitGraphqlWebsocketRequest(url: "/graphql", httpMethod: null, graphQlRequestBody: @"{""type"": ""start"",""id"": ""1"",""payload"": {""query"": ""mutation m{addBook(book:{title:\""New Book\""}){book{title}}}"",""variables"": {}}}");
 
                 // FAILURE: query fails 'execute' step using Websocket
-                await SubmitGraphqlWebsocketRequest(url: "/graphql", httpMethod: null, graphQlRequestBody: @"{""type"": ""start"",""id"": ""1"",""payload"": {""query"": ""subscription NotImplementedSub{throwNotImplementedException{name}}"",""variables"": {}}}");
+                await SubmitGraphqlWebsocketRequest(url: "/graphql", httpMethod: null, graphQlRequestBody: @"{""type"": ""start"",""id"": ""1"",""payload"": {""query"": ""query ErrorQuery{throwException}"",""variables"": {}}}");
 
                 // FAILURE: query fails 'validate' step using Websocket
                 await SubmitGraphqlWebsocketRequest(url: "/graphql", httpMethod: null, graphQlRequestBody: @"{""type"": ""start"",""id"": ""1"",""payload"": {""query"": ""{boook{title author{name}}}"",""variables"": {}}}");
diff --git a/tracer/test/test-applications/integrations/Samples.HotChocolate/Query.cs b/tracer/test/test-applications/integrations/Samples.HotChocolate/Query.cs
index ed0367a23..5053c1dc2 100644
--- a/tracer/test/test-applications/integrations/Samples.HotChocolate/Query.cs
+++ b/tracer/test/test-applications/integrations/Samples.HotChocolate/Query.cs
@@ -15,13 +15,16 @@ namespace Samples.HotChocolate
     public class Query
     {
         public Book GetBook() =>
-    new Book
-    {
-        Title = "C# in depth.",
-        Author = new Author
-        {
-            Name = "Jon Skeet"
-        }
-    };
+            new Book
+            {
+                Title = "C# in depth.",
+                Author = new Author
+                {
+                    Name = "Jon Skeet"
+                }
+            };
+        
+        public string ThrowException() =>
+            throw new System.Exception("Something went wrong");
     }
 }

@tobias-tengler
Copy link
Contributor

@vandonr Could you apply the patch from above and verify if it fixes the issue? Would be awesome to have support for Hot Chocolate v14 soon :)

@vandonr
Copy link
Contributor Author

vandonr commented Nov 27, 2024

oops sorry I'm out of office at the moment, so I missed your last message. Thanks looking for a fix !
I integrated your patch and updated the snapshots, looks good, but I'm not 100% sure this is going to be enough.
I won't have more time today to look into it, but if you want to investigate, you should be able to run the integration tests with this kind of command: ./tracer/build.sh BuildAndRunOSxIntegrationTests -Filter Chocolate -framework net6.0 -sampleName Samples.HotChocolate

@tobias-tengler
Copy link
Contributor

tobias-tengler commented Nov 28, 2024

If I run your command to execute the integration tests, they error, but seemingly because the native loader can't be fetched:

CleanShot 2024-11-28 at 11 06 24@2x

That doesn't match why they error in CI.

If I try to build the DataDog.Tracer.Native.dylib via ./tracer/build.sh Clean BuildTracerHome it fails:

CleanShot 2024-11-28 at 11 02 35@2x

@tobias-tengler
Copy link
Contributor

tobias-tengler commented Nov 28, 2024

Snapshots difference summary

The following differences have been observed in committed snapshots. It is meant to help the reviewer. The diff is simplistic, so please check some files anyway while we improve it.

4 occurrences of :

-    Resource: Uncompleted operation,
+    Resource: Query ErrorQuery,

4 occurrences of :

-      graphql.operation.type: Uncompleted,
+      graphql.operation.name: ErrorQuery,
+      graphql.operation.type: Query,
[...]
-  throwNotImplementedException {
-    name
-  }
[...]
+  throwException

Ah I see what the problem with this PR is. We also need to update the snapshots of the other versions.

Here's another diff you can apply:

Diff
diff --git a/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/HotChocolateTests.cs b/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/HotChocolateTests.cs
index c7d22e856..9a6d5261d 100644
--- a/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/HotChocolateTests.cs
+++ b/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/HotChocolateTests.cs
@@ -188,16 +188,11 @@ namespace Datadog.Trace.ClrProfiler.IntegrationTests
         {
             // An empty package version means we're in the sample,
             // which targets the latest version of the package.
-            if (string.IsNullOrEmpty(packageVersion) || new Version(packageVersion) >= new Version("14.0.0"))
+            if (string.IsNullOrEmpty(packageVersion) || new Version(packageVersion) >= new Version("13.1.0"))
             {
                 return string.Empty;
             }
 
-            if (new Version(packageVersion) >= new Version("13.1.0"))
-            {
-                return ".Pre_14_0_0";
-            }
-
             return ".Pre_13_1_0";
         }
     }
diff --git a/tracer/test/snapshots/HotChocolateTests.SubmitsTraces.SchemaV0.Pre_13_1_0.verified.txt b/tracer/test/snapshots/HotChocolateTests.SubmitsTraces.SchemaV0.Pre_13_1_0.verified.txt
index c57818c20..1e657f618 100644
--- a/tracer/test/snapshots/HotChocolateTests.SubmitsTraces.SchemaV0.Pre_13_1_0.verified.txt
+++ b/tracer/test/snapshots/HotChocolateTests.SubmitsTraces.SchemaV0.Pre_13_1_0.verified.txt
@@ -292,7 +292,7 @@ errors: [
     TraceId: Id_10,
     SpanId: Id_15,
     Name: graphql.execute,
-    Resource: Uncompleted operation,
+    Resource: Query ErrorQuery,
     Service: Samples.HotChocolate-graphql,
     Type: graphql,
     ParentId: Id_11,
@@ -304,19 +304,22 @@ errors: [
       error.stack:
 errors: [
 {
-"message": "The specified root type `Subscription` is not supported by this server.",
+"message": "Unexpected Execution Error",
 "locations": [
+{
+"line": 1,
+"column": 18
+},
 ]
 },
 ]
 ,
       error.type: HotChocolate.Error,
-      graphql.operation.type: Uncompleted,
+      graphql.operation.name: ErrorQuery,
+      graphql.operation.type: Query,
       graphql.source:
-subscription NotImplementedSub {
-  throwNotImplementedException {
-    name
-  }
+query ErrorQuery {
+  throwException
 },
       language: dotnet,
       runtime-id: Guid_1,
diff --git a/tracer/test/snapshots/HotChocolateTests.SubmitsTraces.SchemaV0.Pre_14_0_0.verified.txt b/tracer/test/snapshots/HotChocolateTests.SubmitsTraces.SchemaV0.Pre_14_0_0.verified.txt
deleted file mode 100644
index 6dcb196c0..000000000
--- a/tracer/test/snapshots/HotChocolateTests.SubmitsTraces.SchemaV0.Pre_14_0_0.verified.txt
+++ /dev/null
@@ -1,328 +0,0 @@
-[
-  {
-    TraceId: Id_1,
-    SpanId: Id_2,
-    Name: aspnet_core.request,
-    Resource: GET /graphql/{*slug},
-    Service: Samples.HotChocolate,
-    Type: web,
-    Tags: {
-      aspnet_core.endpoint: Hot Chocolate GraphQL Pipeline,
-      aspnet_core.route: /graphql/{**slug},
-      component: aspnet_core,
-      env: integration_tests,
-      http.method: GET,
-      http.request.headers.host: localhost:00000,
-      http.route: /graphql/{**slug},
-      http.status_code: 200,
-      http.url: http://localhost:00000/graphql?query=query%7Bbook%7Btitle+author%7Bname%7D%7D%7D,
-      http.useragent: testhelper,
-      language: dotnet,
-      runtime-id: Guid_1,
-      span.kind: server,
-      version: 1.0.0
-    },
-    Metrics: {
-      process_id: 0,
-      _dd.top_level: 1.0,
-      _dd.tracer_kr: 1.0,
-      _sampling_priority_v1: 1.0
-    }
-  },
-  {
-    TraceId: Id_1,
-    SpanId: Id_3,
-    Name: graphql.execute,
-    Resource: Query operation,
-    Service: Samples.HotChocolate-graphql,
-    Type: graphql,
-    ParentId: Id_2,
-    Tags: {
-      component: HotChocolate,
-      env: integration_tests,
-      graphql.operation.type: Query,
-      graphql.source:
-{
-  book {
-    title
-    author {
-      name
-    }
-  }
-},
-      language: dotnet,
-      runtime-id: Guid_1,
-      span.kind: server,
-      _dd.base_service: Samples.HotChocolate
-    },
-    Metrics: {
-      _dd.top_level: 1.0
-    }
-  },
-  {
-    TraceId: Id_4,
-    SpanId: Id_5,
-    Name: aspnet_core.request,
-    Resource: POST /graphql/{*slug},
-    Service: Samples.HotChocolate,
-    Type: web,
-    Tags: {
-      aspnet_core.endpoint: Hot Chocolate GraphQL Pipeline,
-      aspnet_core.route: /graphql/{**slug},
-      component: aspnet_core,
-      env: integration_tests,
-      http.method: POST,
-      http.request.headers.host: localhost:00000,
-      http.route: /graphql/{**slug},
-      http.status_code: 200,
-      http.url: http://localhost:00000/graphql,
-      http.useragent: testhelper,
-      language: dotnet,
-      runtime-id: Guid_1,
-      span.kind: server,
-      version: 1.0.0
-    },
-    Metrics: {
-      process_id: 0,
-      _dd.top_level: 1.0,
-      _dd.tracer_kr: 1.0,
-      _sampling_priority_v1: 1.0
-    }
-  },
-  {
-    TraceId: Id_6,
-    SpanId: Id_7,
-    Name: aspnet_core.request,
-    Resource: POST /graphql/{*slug},
-    Service: Samples.HotChocolate,
-    Type: web,
-    Tags: {
-      aspnet_core.endpoint: Hot Chocolate GraphQL Pipeline,
-      aspnet_core.route: /graphql/{**slug},
-      component: aspnet_core,
-      env: integration_tests,
-      http.method: POST,
-      http.request.headers.host: localhost:00000,
-      http.route: /graphql/{**slug},
-      http.status_code: 200,
-      http.url: http://localhost:00000/graphql,
-      http.useragent: testhelper,
-      language: dotnet,
-      runtime-id: Guid_1,
-      span.kind: server,
-      version: 1.0.0
-    },
-    Metrics: {
-      process_id: 0,
-      _dd.top_level: 1.0,
-      _dd.tracer_kr: 1.0,
-      _sampling_priority_v1: 1.0
-    }
-  },
-  {
-    TraceId: Id_8,
-    SpanId: Id_9,
-    Name: aspnet_core.request,
-    Resource: POST /graphql/{*slug},
-    Service: Samples.HotChocolate,
-    Type: web,
-    Tags: {
-      aspnet_core.endpoint: Hot Chocolate GraphQL Pipeline,
-      aspnet_core.route: /graphql/{**slug},
-      component: aspnet_core,
-      env: integration_tests,
-      http.method: POST,
-      http.request.headers.host: localhost:00000,
-      http.route: /graphql/{**slug},
-      http.status_code: 400,
-      http.url: http://localhost:00000/graphql,
-      http.useragent: testhelper,
-      language: dotnet,
-      runtime-id: Guid_1,
-      span.kind: server,
-      version: 1.0.0
-    },
-    Metrics: {
-      process_id: 0,
-      _dd.top_level: 1.0,
-      _dd.tracer_kr: 1.0,
-      _sampling_priority_v1: 1.0
-    }
-  },
-  {
-    TraceId: Id_10,
-    SpanId: Id_11,
-    Name: aspnet_core.request,
-    Resource: POST /graphql/{*slug},
-    Service: Samples.HotChocolate,
-    Type: web,
-    Tags: {
-      aspnet_core.endpoint: Hot Chocolate GraphQL Pipeline,
-      aspnet_core.route: /graphql/{**slug},
-      component: aspnet_core,
-      env: integration_tests,
-      http.method: POST,
-      http.request.headers.host: localhost:00000,
-      http.route: /graphql/{**slug},
-      http.status_code: 400,
-      http.url: http://localhost:00000/graphql,
-      http.useragent: testhelper,
-      language: dotnet,
-      runtime-id: Guid_1,
-      span.kind: server,
-      version: 1.0.0
-    },
-    Metrics: {
-      process_id: 0,
-      _dd.top_level: 1.0,
-      _dd.tracer_kr: 1.0,
-      _sampling_priority_v1: 1.0
-    }
-  },
-  {
-    TraceId: Id_4,
-    SpanId: Id_12,
-    Name: graphql.execute,
-    Resource: Query Book,
-    Service: Samples.HotChocolate-graphql,
-    Type: graphql,
-    ParentId: Id_5,
-    Tags: {
-      component: HotChocolate,
-      env: integration_tests,
-      graphql.operation.name: Book,
-      graphql.operation.type: Query,
-      graphql.source:
-query Book {
-  book {
-    title
-    author {
-      name
-    }
-  }
-},
-      language: dotnet,
-      runtime-id: Guid_1,
-      span.kind: server,
-      _dd.base_service: Samples.HotChocolate
-    },
-    Metrics: {
-      _dd.top_level: 1.0
-    }
-  },
-  {
-    TraceId: Id_6,
-    SpanId: Id_13,
-    Name: graphql.execute,
-    Resource: Mutation m,
-    Service: Samples.HotChocolate-graphql,
-    Type: graphql,
-    ParentId: Id_7,
-    Tags: {
-      component: HotChocolate,
-      env: integration_tests,
-      graphql.operation.name: m,
-      graphql.operation.type: Mutation,
-      graphql.source:
-mutation m {
-  addBook(book: { title: "New Book" }) {
-    book {
-      title
-    }
-  }
-},
-      language: dotnet,
-      runtime-id: Guid_1,
-      span.kind: server,
-      _dd.base_service: Samples.HotChocolate
-    },
-    Metrics: {
-      _dd.top_level: 1.0
-    }
-  },
-  {
-    TraceId: Id_8,
-    SpanId: Id_14,
-    Name: graphql.execute,
-    Resource: Uncompleted operation,
-    Service: Samples.HotChocolate-graphql,
-    Type: graphql,
-    ParentId: Id_9,
-    Error: 1,
-    Tags: {
-      component: HotChocolate,
-      env: integration_tests,
-      error.msg: 1 error(s),
-      error.stack:
-errors: [
-{
-"message": "The field `boook` does not exist on the type `Query`.",
-"locations": [
-{
-"line": 1,
-"column": 2
-},
-]
-},
-]
-,
-      error.type: HotChocolate.Error,
-      graphql.operation.type: Uncompleted,
-      graphql.source:
-{
-  boook {
-    title
-    author {
-      name
-    }
-  }
-},
-      language: dotnet,
-      runtime-id: Guid_1,
-      span.kind: server,
-      _dd.base_service: Samples.HotChocolate
-    },
-    Metrics: {
-      _dd.top_level: 1.0
-    }
-  },
-  {
-    TraceId: Id_10,
-    SpanId: Id_15,
-    Name: graphql.execute,
-    Resource: Uncompleted operation,
-    Service: Samples.HotChocolate-graphql,
-    Type: graphql,
-    ParentId: Id_11,
-    Error: 1,
-    Tags: {
-      component: HotChocolate,
-      env: integration_tests,
-      error.msg: 1 error(s),
-      error.stack:
-errors: [
-{
-"message": "The specified root type `Subscription` is not supported by this server.",
-"locations": [
-]
-},
-]
-,
-      error.type: HotChocolate.Error,
-      graphql.operation.type: Uncompleted,
-      graphql.source:
-subscription NotImplementedSub {
-  throwNotImplementedException {
-    name
-  }
-},
-      language: dotnet,
-      runtime-id: Guid_1,
-      span.kind: server,
-      _dd.base_service: Samples.HotChocolate
-    },
-    Metrics: {
-      _dd.top_level: 1.0
-    }
-  }
-]
\ No newline at end of file
diff --git a/tracer/test/snapshots/HotChocolateTests.SubmitsTraces.SchemaV1.Pre_13_1_0.verified.txt b/tracer/test/snapshots/HotChocolateTests.SubmitsTraces.SchemaV1.Pre_13_1_0.verified.txt
index d5f315c38..db2c53d45 100644
--- a/tracer/test/snapshots/HotChocolateTests.SubmitsTraces.SchemaV1.Pre_13_1_0.verified.txt
+++ b/tracer/test/snapshots/HotChocolateTests.SubmitsTraces.SchemaV1.Pre_13_1_0.verified.txt
@@ -1,4 +1,4 @@
-[
+[
   {
     TraceId: Id_1,
     SpanId: Id_2,
@@ -276,7 +276,7 @@ errors: [
     TraceId: Id_10,
     SpanId: Id_15,
     Name: graphql.execute,
-    Resource: Uncompleted operation,
+    Resource: Query ErrorQuery,
     Service: Samples.HotChocolate,
     Type: graphql,
     ParentId: Id_11,
@@ -288,19 +288,22 @@ errors: [
       error.stack:
 errors: [
 {
-"message": "The specified root type `Subscription` is not supported by this server.",
+"message": "Unexpected Execution Error",
 "locations": [
+{
+"line": 1,
+"column": 18
+},
 ]
 },
 ]
 ,
       error.type: HotChocolate.Error,
-      graphql.operation.type: Uncompleted,
+      graphql.operation.name: ErrorQuery,
+      graphql.operation.type: Query,
       graphql.source:
-subscription NotImplementedSub {
-  throwNotImplementedException {
-    name
-  }
+query ErrorQuery {
+  throwException
 },
       language: dotnet,
       span.kind: server,
diff --git a/tracer/test/snapshots/HotChocolateTests.SubmitsTraces.SchemaV1.Pre_14_0_0.verified.txt b/tracer/test/snapshots/HotChocolateTests.SubmitsTraces.SchemaV1.Pre_14_0_0.verified.txt
deleted file mode 100644
index 848394146..000000000
--- a/tracer/test/snapshots/HotChocolateTests.SubmitsTraces.SchemaV1.Pre_14_0_0.verified.txt
+++ /dev/null
@@ -1,308 +0,0 @@
-[
-  {
-    TraceId: Id_1,
-    SpanId: Id_2,
-    Name: aspnet_core.request,
-    Resource: GET /graphql/{*slug},
-    Service: Samples.HotChocolate,
-    Type: web,
-    Tags: {
-      aspnet_core.endpoint: Hot Chocolate GraphQL Pipeline,
-      aspnet_core.route: /graphql/{**slug},
-      component: aspnet_core,
-      env: integration_tests,
-      http.method: GET,
-      http.request.headers.host: localhost:00000,
-      http.route: /graphql/{**slug},
-      http.status_code: 200,
-      http.url: http://localhost:00000/graphql?query=query%7Bbook%7Btitle+author%7Bname%7D%7D%7D,
-      http.useragent: testhelper,
-      language: dotnet,
-      runtime-id: Guid_1,
-      span.kind: server,
-      version: 1.0.0
-    },
-    Metrics: {
-      process_id: 0,
-      _dd.top_level: 1.0,
-      _dd.tracer_kr: 1.0,
-      _sampling_priority_v1: 1.0
-    }
-  },
-  {
-    TraceId: Id_1,
-    SpanId: Id_3,
-    Name: graphql.execute,
-    Resource: Query operation,
-    Service: Samples.HotChocolate,
-    Type: graphql,
-    ParentId: Id_2,
-    Tags: {
-      component: HotChocolate,
-      env: integration_tests,
-      graphql.operation.type: Query,
-      graphql.source:
-{
-  book {
-    title
-    author {
-      name
-    }
-  }
-},
-      language: dotnet,
-      span.kind: server,
-      version: 1.0.0
-    }
-  },
-  {
-    TraceId: Id_4,
-    SpanId: Id_5,
-    Name: aspnet_core.request,
-    Resource: POST /graphql/{*slug},
-    Service: Samples.HotChocolate,
-    Type: web,
-    Tags: {
-      aspnet_core.endpoint: Hot Chocolate GraphQL Pipeline,
-      aspnet_core.route: /graphql/{**slug},
-      component: aspnet_core,
-      env: integration_tests,
-      http.method: POST,
-      http.request.headers.host: localhost:00000,
-      http.route: /graphql/{**slug},
-      http.status_code: 200,
-      http.url: http://localhost:00000/graphql,
-      http.useragent: testhelper,
-      language: dotnet,
-      runtime-id: Guid_1,
-      span.kind: server,
-      version: 1.0.0
-    },
-    Metrics: {
-      process_id: 0,
-      _dd.top_level: 1.0,
-      _dd.tracer_kr: 1.0,
-      _sampling_priority_v1: 1.0
-    }
-  },
-  {
-    TraceId: Id_6,
-    SpanId: Id_7,
-    Name: aspnet_core.request,
-    Resource: POST /graphql/{*slug},
-    Service: Samples.HotChocolate,
-    Type: web,
-    Tags: {
-      aspnet_core.endpoint: Hot Chocolate GraphQL Pipeline,
-      aspnet_core.route: /graphql/{**slug},
-      component: aspnet_core,
-      env: integration_tests,
-      http.method: POST,
-      http.request.headers.host: localhost:00000,
-      http.route: /graphql/{**slug},
-      http.status_code: 200,
-      http.url: http://localhost:00000/graphql,
-      http.useragent: testhelper,
-      language: dotnet,
-      runtime-id: Guid_1,
-      span.kind: server,
-      version: 1.0.0
-    },
-    Metrics: {
-      process_id: 0,
-      _dd.top_level: 1.0,
-      _dd.tracer_kr: 1.0,
-      _sampling_priority_v1: 1.0
-    }
-  },
-  {
-    TraceId: Id_8,
-    SpanId: Id_9,
-    Name: aspnet_core.request,
-    Resource: POST /graphql/{*slug},
-    Service: Samples.HotChocolate,
-    Type: web,
-    Tags: {
-      aspnet_core.endpoint: Hot Chocolate GraphQL Pipeline,
-      aspnet_core.route: /graphql/{**slug},
-      component: aspnet_core,
-      env: integration_tests,
-      http.method: POST,
-      http.request.headers.host: localhost:00000,
-      http.route: /graphql/{**slug},
-      http.status_code: 400,
-      http.url: http://localhost:00000/graphql,
-      http.useragent: testhelper,
-      language: dotnet,
-      runtime-id: Guid_1,
-      span.kind: server,
-      version: 1.0.0
-    },
-    Metrics: {
-      process_id: 0,
-      _dd.top_level: 1.0,
-      _dd.tracer_kr: 1.0,
-      _sampling_priority_v1: 1.0
-    }
-  },
-  {
-    TraceId: Id_10,
-    SpanId: Id_11,
-    Name: aspnet_core.request,
-    Resource: POST /graphql/{*slug},
-    Service: Samples.HotChocolate,
-    Type: web,
-    Tags: {
-      aspnet_core.endpoint: Hot Chocolate GraphQL Pipeline,
-      aspnet_core.route: /graphql/{**slug},
-      component: aspnet_core,
-      env: integration_tests,
-      http.method: POST,
-      http.request.headers.host: localhost:00000,
-      http.route: /graphql/{**slug},
-      http.status_code: 400,
-      http.url: http://localhost:00000/graphql,
-      http.useragent: testhelper,
-      language: dotnet,
-      runtime-id: Guid_1,
-      span.kind: server,
-      version: 1.0.0
-    },
-    Metrics: {
-      process_id: 0,
-      _dd.top_level: 1.0,
-      _dd.tracer_kr: 1.0,
-      _sampling_priority_v1: 1.0
-    }
-  },
-  {
-    TraceId: Id_4,
-    SpanId: Id_12,
-    Name: graphql.execute,
-    Resource: Query Book,
-    Service: Samples.HotChocolate,
-    Type: graphql,
-    ParentId: Id_5,
-    Tags: {
-      component: HotChocolate,
-      env: integration_tests,
-      graphql.operation.name: Book,
-      graphql.operation.type: Query,
-      graphql.source:
-query Book {
-  book {
-    title
-    author {
-      name
-    }
-  }
-},
-      language: dotnet,
-      span.kind: server,
-      version: 1.0.0
-    }
-  },
-  {
-    TraceId: Id_6,
-    SpanId: Id_13,
-    Name: graphql.execute,
-    Resource: Mutation m,
-    Service: Samples.HotChocolate,
-    Type: graphql,
-    ParentId: Id_7,
-    Tags: {
-      component: HotChocolate,
-      env: integration_tests,
-      graphql.operation.name: m,
-      graphql.operation.type: Mutation,
-      graphql.source:
-mutation m {
-  addBook(book: { title: "New Book" }) {
-    book {
-      title
-    }
-  }
-},
-      language: dotnet,
-      span.kind: server,
-      version: 1.0.0
-    }
-  },
-  {
-    TraceId: Id_8,
-    SpanId: Id_14,
-    Name: graphql.execute,
-    Resource: Uncompleted operation,
-    Service: Samples.HotChocolate,
-    Type: graphql,
-    ParentId: Id_9,
-    Error: 1,
-    Tags: {
-      component: HotChocolate,
-      env: integration_tests,
-      error.msg: 1 error(s),
-      error.stack:
-errors: [
-{
-"message": "The field `boook` does not exist on the type `Query`.",
-"locations": [
-{
-"line": 1,
-"column": 2
-},
-]
-},
-]
-,
-      error.type: HotChocolate.Error,
-      graphql.operation.type: Uncompleted,
-      graphql.source:
-{
-  boook {
-    title
-    author {
-      name
-    }
-  }
-},
-      language: dotnet,
-      span.kind: server,
-      version: 1.0.0
-    }
-  },
-  {
-    TraceId: Id_10,
-    SpanId: Id_15,
-    Name: graphql.execute,
-    Resource: Uncompleted operation,
-    Service: Samples.HotChocolate,
-    Type: graphql,
-    ParentId: Id_11,
-    Error: 1,
-    Tags: {
-      component: HotChocolate,
-      env: integration_tests,
-      error.msg: 1 error(s),
-      error.stack:
-errors: [
-{
-"message": "The specified root type `Subscription` is not supported by this server.",
-"locations": [
-]
-},
-]
-,
-      error.type: HotChocolate.Error,
-      graphql.operation.type: Uncompleted,
-      graphql.source:
-subscription NotImplementedSub {
-  throwNotImplementedException {
-    name
-  }
-},
-      language: dotnet,
-      span.kind: server,
-      version: 1.0.0
-    }
-  }
-]
\ No newline at end of file
diff --git a/tracer/test/snapshots/HotChocolateTestsWebsockets.SubmitsTraces.SchemaV0.Pre_13_1_0.verified.txt b/tracer/test/snapshots/HotChocolateTestsWebsockets.SubmitsTraces.SchemaV0.Pre_13_1_0.verified.txt
index d47ae5bc3..25f66eac4 100644
--- a/tracer/test/snapshots/HotChocolateTestsWebsockets.SubmitsTraces.SchemaV0.Pre_13_1_0.verified.txt
+++ b/tracer/test/snapshots/HotChocolateTestsWebsockets.SubmitsTraces.SchemaV0.Pre_13_1_0.verified.txt
@@ -180,7 +180,7 @@ mutation m {
     TraceId: Id_5,
     SpanId: Id_11,
     Name: graphql.execute,
-    Resource: Uncompleted operation,
+    Resource: Query ErrorQuery,
     Service: Samples.HotChocolate-graphql,
     Type: graphql,
     ParentId: Id_6,
@@ -192,19 +192,22 @@ mutation m {
       error.stack:
 errors: [
 {
-"message": "The specified root type `Subscription` is not supported by this server.",
+"message": "Unexpected Execution Error",
 "locations": [
+{
+"line": 1,
+"column": 18
+},
 ]
 },
 ]
 ,
       error.type: HotChocolate.Error,
-      graphql.operation.type: Uncompleted,
+      graphql.operation.name: ErrorQuery,
+      graphql.operation.type: Query,
       graphql.source:
-subscription NotImplementedSub {
-  throwNotImplementedException {
-    name
-  }
+query ErrorQuery {
+  throwException
 },
       language: dotnet,
       runtime-id: Guid_1,
diff --git a/tracer/test/snapshots/HotChocolateTestsWebsockets.SubmitsTraces.SchemaV0.Pre_14_0_0.verified.txt b/tracer/test/snapshots/HotChocolateTestsWebsockets.SubmitsTraces.SchemaV0.Pre_14_0_0.verified.txt
deleted file mode 100644
index d47ae5bc3..000000000
--- a/tracer/test/snapshots/HotChocolateTestsWebsockets.SubmitsTraces.SchemaV0.Pre_14_0_0.verified.txt
+++ /dev/null
@@ -1,264 +0,0 @@
-[
-  {
-    TraceId: Id_1,
-    SpanId: Id_2,
-    Name: aspnet_core.request,
-    Resource: GET /graphql/{*slug},
-    Service: Samples.HotChocolate,
-    Type: web,
-    Tags: {
-      aspnet_core.endpoint: Hot Chocolate GraphQL Pipeline,
-      aspnet_core.route: /graphql/{**slug},
-      component: aspnet_core,
-      env: integration_tests,
-      http.method: GET,
-      http.request.headers.host: localhost:00000,
-      http.route: /graphql/{**slug},
-      http.status_code: 101,
-      http.url: http://localhost:00000/graphql,
-      language: dotnet,
-      runtime-id: Guid_1,
-      span.kind: server,
-      version: 1.0.0
-    },
-    Metrics: {
-      process_id: 0,
-      _dd.top_level: 1.0,
-      _dd.tracer_kr: 1.0,
-      _sampling_priority_v1: 1.0
-    }
-  },
-  {
-    TraceId: Id_3,
-    SpanId: Id_4,
-    Name: aspnet_core.request,
-    Resource: GET /graphql/{*slug},
-    Service: Samples.HotChocolate,
-    Type: web,
-    Tags: {
-      aspnet_core.endpoint: Hot Chocolate GraphQL Pipeline,
-      aspnet_core.route: /graphql/{**slug},
-      component: aspnet_core,
-      env: integration_tests,
-      http.method: GET,
-      http.request.headers.host: localhost:00000,
-      http.route: /graphql/{**slug},
-      http.status_code: 101,
-      http.url: http://localhost:00000/graphql,
-      language: dotnet,
-      runtime-id: Guid_1,
-      span.kind: server,
-      version: 1.0.0
-    },
-    Metrics: {
-      process_id: 0,
-      _dd.top_level: 1.0,
-      _dd.tracer_kr: 1.0,
-      _sampling_priority_v1: 1.0
-    }
-  },
-  {
-    TraceId: Id_5,
-    SpanId: Id_6,
-    Name: aspnet_core.request,
-    Resource: GET /graphql/{*slug},
-    Service: Samples.HotChocolate,
-    Type: web,
-    Tags: {
-      aspnet_core.endpoint: Hot Chocolate GraphQL Pipeline,
-      aspnet_core.route: /graphql/{**slug},
-      component: aspnet_core,
-      env: integration_tests,
-      http.method: GET,
-      http.request.headers.host: localhost:00000,
-      http.route: /graphql/{**slug},
-      http.status_code: 101,
-      http.url: http://localhost:00000/graphql,
-      language: dotnet,
-      runtime-id: Guid_1,
-      span.kind: server,
-      version: 1.0.0
-    },
-    Metrics: {
-      process_id: 0,
-      _dd.top_level: 1.0,
-      _dd.tracer_kr: 1.0,
-      _sampling_priority_v1: 1.0
-    }
-  },
-  {
-    TraceId: Id_7,
-    SpanId: Id_8,
-    Name: aspnet_core.request,
-    Resource: GET /graphql/{*slug},
-    Service: Samples.HotChocolate,
-    Type: web,
-    Tags: {
-      aspnet_core.endpoint: Hot Chocolate GraphQL Pipeline,
-      aspnet_core.route: /graphql/{**slug},
-      component: aspnet_core,
-      env: integration_tests,
-      http.method: GET,
-      http.request.headers.host: localhost:00000,
-      http.route: /graphql/{**slug},
-      http.status_code: 101,
-      http.url: http://localhost:00000/graphql,
-      language: dotnet,
-      runtime-id: Guid_1,
-      span.kind: server,
-      version: 1.0.0
-    },
-    Metrics: {
-      process_id: 0,
-      _dd.top_level: 1.0,
-      _dd.tracer_kr: 1.0,
-      _sampling_priority_v1: 1.0
-    }
-  },
-  {
-    TraceId: Id_1,
-    SpanId: Id_9,
-    Name: graphql.execute,
-    Resource: Query Book,
-    Service: Samples.HotChocolate-graphql,
-    Type: graphql,
-    ParentId: Id_2,
-    Tags: {
-      component: HotChocolate,
-      env: integration_tests,
-      graphql.operation.name: Book,
-      graphql.operation.type: Query,
-      graphql.source:
-query Book {
-  book {
-    title
-    author {
-      name
-    }
-  }
-},
-      language: dotnet,
-      runtime-id: Guid_1,
-      span.kind: server,
-      _dd.base_service: Samples.HotChocolate
-    },
-    Metrics: {
-      _dd.top_level: 1.0
-    }
-  },
-  {
-    TraceId: Id_3,
-    SpanId: Id_10,
-    Name: graphql.execute,
-    Resource: Mutation m,
-    Service: Samples.HotChocolate-graphql,
-    Type: graphql,
-    ParentId: Id_4,
-    Tags: {
-      component: HotChocolate,
-      env: integration_tests,
-      graphql.operation.name: m,
-      graphql.operation.type: Mutation,
-      graphql.source:
-mutation m {
-  addBook(book: { title: "New Book" }) {
-    book {
-      title
-    }
-  }
-},
-      language: dotnet,
-      runtime-id: Guid_1,
-      span.kind: server,
-      _dd.base_service: Samples.HotChocolate
-    },
-    Metrics: {
-      _dd.top_level: 1.0
-    }
-  },
-  {
-    TraceId: Id_5,
-    SpanId: Id_11,
-    Name: graphql.execute,
-    Resource: Uncompleted operation,
-    Service: Samples.HotChocolate-graphql,
-    Type: graphql,
-    ParentId: Id_6,
-    Error: 1,
-    Tags: {
-      component: HotChocolate,
-      env: integration_tests,
-      error.msg: 1 error(s),
-      error.stack:
-errors: [
-{
-"message": "The specified root type `Subscription` is not supported by this server.",
-"locations": [
-]
-},
-]
-,
-      error.type: HotChocolate.Error,
-      graphql.operation.type: Uncompleted,
-      graphql.source:
-subscription NotImplementedSub {
-  throwNotImplementedException {
-    name
-  }
-},
-      language: dotnet,
-      runtime-id: Guid_1,
-      span.kind: server,
-      _dd.base_service: Samples.HotChocolate
-    },
-    Metrics: {
-      _dd.top_level: 1.0
-    }
-  },
-  {
-    TraceId: Id_7,
-    SpanId: Id_12,
-    Name: graphql.execute,
-    Resource: Uncompleted operation,
-    Service: Samples.HotChocolate-graphql,
-    Type: graphql,
-    ParentId: Id_8,
-    Error: 1,
-    Tags: {
-      component: HotChocolate,
-      env: integration_tests,
-      error.msg: 1 error(s),
-      error.stack:
-errors: [
-{
-"message": "The field `boook` does not exist on the type `Query`.",
-"locations": [
-{
-"line": 1,
-"column": 2
-},
-]
-},
-]
-,
-      error.type: HotChocolate.Error,
-      graphql.operation.type: Uncompleted,
-      graphql.source:
-{
-  boook {
-    title
-    author {
-      name
-    }
-  }
-},
-      language: dotnet,
-      runtime-id: Guid_1,
-      span.kind: server,
-      _dd.base_service: Samples.HotChocolate
-    },
-    Metrics: {
-      _dd.top_level: 1.0
-    }
-  }
-]
\ No newline at end of file
diff --git a/tracer/test/snapshots/HotChocolateTestsWebsockets.SubmitsTraces.SchemaV1.Pre_13_1_0.verified.txt b/tracer/test/snapshots/HotChocolateTestsWebsockets.SubmitsTraces.SchemaV1.Pre_13_1_0.verified.txt
index 042ff78f9..70d19553f 100644
--- a/tracer/test/snapshots/HotChocolateTestsWebsockets.SubmitsTraces.SchemaV1.Pre_13_1_0.verified.txt
+++ b/tracer/test/snapshots/HotChocolateTestsWebsockets.SubmitsTraces.SchemaV1.Pre_13_1_0.verified.txt
@@ -172,7 +172,7 @@ mutation m {
     TraceId: Id_5,
     SpanId: Id_11,
     Name: graphql.execute,
-    Resource: Uncompleted operation,
+    Resource: Query ErrorQuery,
     Service: Samples.HotChocolate,
     Type: graphql,
     ParentId: Id_6,
@@ -184,19 +184,22 @@ mutation m {
       error.stack:
 errors: [
 {
-"message": "The specified root type `Subscription` is not supported by this server.",
+"message": "Unexpected Execution Error",
 "locations": [
+{
+"line": 1,
+"column": 18
+},
 ]
 },
 ]
 ,
       error.type: HotChocolate.Error,
-      graphql.operation.type: Uncompleted,
+      graphql.operation.name: ErrorQuery,
+      graphql.operation.type: Query,
       graphql.source:
-subscription NotImplementedSub {
-  throwNotImplementedException {
-    name
-  }
+query ErrorQuery {
+  throwException
 },
       language: dotnet,
       span.kind: server,
diff --git a/tracer/test/snapshots/HotChocolateTestsWebsockets.SubmitsTraces.SchemaV1.Pre_14_0_0.verified.txt b/tracer/test/snapshots/HotChocolateTestsWebsockets.SubmitsTraces.SchemaV1.Pre_14_0_0.verified.txt
deleted file mode 100644
index 042ff78f9..000000000
--- a/tracer/test/snapshots/HotChocolateTestsWebsockets.SubmitsTraces.SchemaV1.Pre_14_0_0.verified.txt
+++ /dev/null
@@ -1,248 +0,0 @@
-[
-  {
-    TraceId: Id_1,
-    SpanId: Id_2,
-    Name: aspnet_core.request,
-    Resource: GET /graphql/{*slug},
-    Service: Samples.HotChocolate,
-    Type: web,
-    Tags: {
-      aspnet_core.endpoint: Hot Chocolate GraphQL Pipeline,
-      aspnet_core.route: /graphql/{**slug},
-      component: aspnet_core,
-      env: integration_tests,
-      http.method: GET,
-      http.request.headers.host: localhost:00000,
-      http.route: /graphql/{**slug},
-      http.status_code: 101,
-      http.url: http://localhost:00000/graphql,
-      language: dotnet,
-      runtime-id: Guid_1,
-      span.kind: server,
-      version: 1.0.0
-    },
-    Metrics: {
-      process_id: 0,
-      _dd.top_level: 1.0,
-      _dd.tracer_kr: 1.0,
-      _sampling_priority_v1: 1.0
-    }
-  },
-  {
-    TraceId: Id_3,
-    SpanId: Id_4,
-    Name: aspnet_core.request,
-    Resource: GET /graphql/{*slug},
-    Service: Samples.HotChocolate,
-    Type: web,
-    Tags: {
-      aspnet_core.endpoint: Hot Chocolate GraphQL Pipeline,
-      aspnet_core.route: /graphql/{**slug},
-      component: aspnet_core,
-      env: integration_tests,
-      http.method: GET,
-      http.request.headers.host: localhost:00000,
-      http.route: /graphql/{**slug},
-      http.status_code: 101,
-      http.url: http://localhost:00000/graphql,
-      language: dotnet,
-      runtime-id: Guid_1,
-      span.kind: server,
-      version: 1.0.0
-    },
-    Metrics: {
-      process_id: 0,
-      _dd.top_level: 1.0,
-      _dd.tracer_kr: 1.0,
-      _sampling_priority_v1: 1.0
-    }
-  },
-  {
-    TraceId: Id_5,
-    SpanId: Id_6,
-    Name: aspnet_core.request,
-    Resource: GET /graphql/{*slug},
-    Service: Samples.HotChocolate,
-    Type: web,
-    Tags: {
-      aspnet_core.endpoint: Hot Chocolate GraphQL Pipeline,
-      aspnet_core.route: /graphql/{**slug},
-      component: aspnet_core,
-      env: integration_tests,
-      http.method: GET,
-      http.request.headers.host: localhost:00000,
-      http.route: /graphql/{**slug},
-      http.status_code: 101,
-      http.url: http://localhost:00000/graphql,
-      language: dotnet,
-      runtime-id: Guid_1,
-      span.kind: server,
-      version: 1.0.0
-    },
-    Metrics: {
-      process_id: 0,
-      _dd.top_level: 1.0,
-      _dd.tracer_kr: 1.0,
-      _sampling_priority_v1: 1.0
-    }
-  },
-  {
-    TraceId: Id_7,
-    SpanId: Id_8,
-    Name: aspnet_core.request,
-    Resource: GET /graphql/{*slug},
-    Service: Samples.HotChocolate,
-    Type: web,
-    Tags: {
-      aspnet_core.endpoint: Hot Chocolate GraphQL Pipeline,
-      aspnet_core.route: /graphql/{**slug},
-      component: aspnet_core,
-      env: integration_tests,
-      http.method: GET,
-      http.request.headers.host: localhost:00000,
-      http.route: /graphql/{**slug},
-      http.status_code: 101,
-      http.url: http://localhost:00000/graphql,
-      language: dotnet,
-      runtime-id: Guid_1,
-      span.kind: server,
-      version: 1.0.0
-    },
-    Metrics: {
-      process_id: 0,
-      _dd.top_level: 1.0,
-      _dd.tracer_kr: 1.0,
-      _sampling_priority_v1: 1.0
-    }
-  },
-  {
-    TraceId: Id_1,
-    SpanId: Id_9,
-    Name: graphql.execute,
-    Resource: Query Book,
-    Service: Samples.HotChocolate,
-    Type: graphql,
-    ParentId: Id_2,
-    Tags: {
-      component: HotChocolate,
-      env: integration_tests,
-      graphql.operation.name: Book,
-      graphql.operation.type: Query,
-      graphql.source:
-query Book {
-  book {
-    title
-    author {
-      name
-    }
-  }
-},
-      language: dotnet,
-      span.kind: server,
-      version: 1.0.0
-    }
-  },
-  {
-    TraceId: Id_3,
-    SpanId: Id_10,
-    Name: graphql.execute,
-    Resource: Mutation m,
-    Service: Samples.HotChocolate,
-    Type: graphql,
-    ParentId: Id_4,
-    Tags: {
-      component: HotChocolate,
-      env: integration_tests,
-      graphql.operation.name: m,
-      graphql.operation.type: Mutation,
-      graphql.source:
-mutation m {
-  addBook(book: { title: "New Book" }) {
-    book {
-      title
-    }
-  }
-},
-      language: dotnet,
-      span.kind: server,
-      version: 1.0.0
-    }
-  },
-  {
-    TraceId: Id_5,
-    SpanId: Id_11,
-    Name: graphql.execute,
-    Resource: Uncompleted operation,
-    Service: Samples.HotChocolate,
-    Type: graphql,
-    ParentId: Id_6,
-    Error: 1,
-    Tags: {
-      component: HotChocolate,
-      env: integration_tests,
-      error.msg: 1 error(s),
-      error.stack:
-errors: [
-{
-"message": "The specified root type `Subscription` is not supported by this server.",
-"locations": [
-]
-},
-]
-,
-      error.type: HotChocolate.Error,
-      graphql.operation.type: Uncompleted,
-      graphql.source:
-subscription NotImplementedSub {
-  throwNotImplementedException {
-    name
-  }
-},
-      language: dotnet,
-      span.kind: server,
-      version: 1.0.0
-    }
-  },
-  {
-    TraceId: Id_7,
-    SpanId: Id_12,
-    Name: graphql.execute,
-    Resource: Uncompleted operation,
-    Service: Samples.HotChocolate,
-    Type: graphql,
-    ParentId: Id_8,
-    Error: 1,
-    Tags: {
-      component: HotChocolate,
-      env: integration_tests,
-      error.msg: 1 error(s),
-      error.stack:
-errors: [
-{
-"message": "The field `boook` does not exist on the type `Query`.",
-"locations": [
-{
-"line": 1,
-"column": 2
-},
-]
-},
-]
-,
-      error.type: HotChocolate.Error,
-      graphql.operation.type: Uncompleted,
-      graphql.source:
-{
-  boook {
-    title
-    author {
-      name
-    }
-  }
-},
-      language: dotnet,
-      span.kind: server,
-      version: 1.0.0
-    }
-  }
-]
\ No newline at end of file

Sorry to disturb you while you're out of office 😅

Copy link
Member

@andrewlock andrewlock left a comment

Choose a reason for hiding this comment

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

LGTM! Just a couple of nitpics about partially adding #nullable enable IMO doing it piecemeal potentially does more harm than good, so I'd rather not add them to existing, and tackle the whole hotchocolate surface area in a subsequent PR, but not a blocker 🙂

I also rebased, updated the generated files, and applied your diff for the snapshots @tobias-tengler, thanks!

Comment on lines +6 to +7
#nullable enable

Copy link
Member

Choose a reason for hiding this comment

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

nit: I'm generally opposed to just putting #nullable enable in without doing the full nullable analysis. e.g. operationContext.Operation could throw a null ref exception, so adding #nullable enable adds a false sense of security. Better to be "honest" and just not add it unless you're going to do the full nullable "fixing" (and that should be a separate PR anyway 🙂 )

Comment on lines +6 to +7
#nullable enable

Copy link
Member

Choose a reason for hiding this comment

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

Same goes here, technically there are null ref possibilities (e.g. we're not checking request.Instance for null) so I'd rather we did the full analysis in a separate PR if possible

@tobias-tengler
Copy link
Contributor

Mhmm the tests are still failing in CI, but it doesn't make much sense to me. The snapshot difference summary comment has been updated, but it still complains about the snapshots differing, but the mentioned throwNotImplementedException field no longer exists in any of the checked in snapshots...
I'm having a tough time comparing the snapshots in the CI output and running them locally doesn't work for me. Could one of you execute the tests locally and figure out why they're failing?

@andrewlock
Copy link
Member

Hmmm, it looks like this is due to a difference in how an exceptions are handled and how that bubbles up to the aspnetcore/HTTP side 🤔

The difference in the snapshot shows in the "root" aspnetcore span (Verified on the left, received on the right)

image

This is probably a benign change, but it shows the changing from the non-existent error subscription to the explicit exception throw are fundamentally different - essentially the former triggers an exception in the "core" of the HotChocolate library, whereas the latter is handled by the library and returns a 200 🤔

It would probably be a good idea to test both paths in reality...

@vandonr
Copy link
Contributor Author

vandonr commented Dec 3, 2024

😌
ok I thought it was going to be something with discrepancies between versions of dotnet again, but it was just a matter of getting the right snapshots aligned, we lost ourselves between the different modifications.
I'll take a quick look at adding a test that errors in the core, if it's more than half a day of work I'll merge this and try to add it as a separate PR.

@vandonr
Copy link
Contributor Author

vandonr commented Dec 3, 2024

I actually don't know how to purposely trigger a 500 error in HotChocolate, and tbf it seems normal, there shouldn't be a way for clients to reliably trigger 500 errors in a working system, they should get 400 errors at best.
We used to have this with the subscriptions, but I don't know what other feature of graphQL is still unsupported by HotChocolate, and even if we find one, there is no guarantee it'll stay unsupported.

@vandonr vandonr merged commit 24b7001 into master Dec 3, 2024
83 checks passed
@vandonr vandonr deleted the vandonr/hotchocolate branch December 3, 2024 14:33
@github-actions github-actions bot added this to the vNext-v3 milestone Dec 3, 2024
@tobias-tengler
Copy link
Contributor

Thanks for merging this @vandonr! ❤️
Do you roughly know when there will be a new release of the tracer?

@vandonr
Copy link
Contributor Author

vandonr commented Dec 4, 2024

Do you roughly know when there will be a new release of the tracer?

I don't want to make any promises, but we're not releasing this week, and I know we're not releasing around end of year celebrations either, so we'll probably do a release inbetween :p

veerbia pushed a commit that referenced this pull request Dec 16, 2024
## Summary of changes

Hot Chocolate v14 was released recently:
[NuGet](https://www.nuget.org/packages/HotChocolate.AspNetCore/14.0.0)
This new version doesn't work with the existing integration

## Reason for change

## Implementation details

picked up work from an external contributor (@tobias-tengler in #6180)
tried to reduce a bit the amount of diff by reusing more existing code

## Test coverage

integration test runs on new version

## Other details
<!-- Fixes #{issue} -->

<!-- ⚠️ Note: where possible, please obtain 2 approvals prior to
merging. Unless CODEOWNERS specifies otherwise, for external teams it is
typically best to have one review from a team member, and one review
from apm-dotnet. Trivial changes do not require 2 reviews. -->

---------

Co-authored-by: Andrew Lock <andrew.lock@datadoghq.com>
Co-authored-by: Tobias Tengler <45513122+tobias-tengler@users.noreply.github.com>
@robertpi robertpi added the area:tracer The core tracer library (Datadog.Trace, does not include OpenTracing, native code, or integrations) label Dec 18, 2024
@andrewlock andrewlock added type:enhancement Improvement to an existing feature area:automatic-instrumentation Automatic instrumentation managed C# code (Datadog.Trace.ClrProfiler.Managed) labels Dec 18, 2024
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:tracer The core tracer library (Datadog.Trace, does not include OpenTracing, native code, or integrations) type:enhancement Improvement to an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants