Skip to content

Fix the HTTP QUERY activity test failing on .NET 9 - #10434

Merged
glen-84 merged 1 commit into
mainfrom
gai/net9-http-query-activity-snapshot
Sep 25, 2026
Merged

glen-84 merged 1 commit into
mainfrom
gai/net9-http-query-activity-snapshot

Conversation

@glen-84

@glen-84 glen-84 commented Sep 25, 2026

Copy link
Copy Markdown
Member

Summary

  • Http_Query_SingleRequest_GetHeroName failed on net9.0. OpenTelemetry.Instrumentation.AspNetCore leaves QUERY out of its known HTTP methods when running on .NET 9 (open-telemetry/opentelemetry-dotnet-contrib#3969), so the server span there reports http.request.method as _OTHER, adds http.request.method_original: QUERY, and is named HTTP /graphql/{**slug}. CI runs tests on net11.0 only, so this did not show up there.
  • The test now uses a dedicated NET9_0 snapshot. net8.0 and net10.0 keep sharing the default snapshot, and net11.0 keeps its own.

Test plan

  • ActivityServerDiagnosticListenerTests passes on net8.0, net9.0, and net10.0. The net11.0 postfix and snapshot are unchanged.
  • The new NET9_0 snapshot differs from the default one only in the span name and the two method tags.

Copilot AI lite review requested due to automatic review settings September 25, 2026 15:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

No unresolved review issues remain.

Review effort: Lite
Findings: None

What changed in this PR

Updates the HTTP QUERY activity test to handle .NET 9-specific OpenTelemetry output.

Changes:

  • Adds a dedicated .NET 9 snapshot selection.
  • Records .NET 9’s _OTHER method tags and span name.
  • Preserves existing snapshots for other frameworks.
File Description
src/​HotChocolate/​Diagnostics/​test/​Diagnostics.Tests/​ActivityServerDiagnosticListenerTests.cs Selects the dedicated .NET 9 snapshot.
src/​HotChocolate/​Diagnostics/​test/​Diagnostics.Tests/​__snapshots__/​ActivityServerDiagnosticListenerTests.Http_Query_SingleRequest_GetHeroName_NET9_0.snap Adds expected .NET 9 activity output.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@glen-84
glen-84 merged commit 0194da3 into main Sep 25, 2026
159 checks passed
@glen-84
glen-84 deleted the gai/net9-http-query-activity-snapshot branch September 25, 2026 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants