Skip to content

Conversation

EmrysMyrddin
Copy link
Collaborator

No description provided.

@EmrysMyrddin EmrysMyrddin force-pushed the repro/otel/bad-validation-error-handling branch from 529318e to 627a488 Compare September 23, 2025 19:20
@EmrysMyrddin EmrysMyrddin changed the title added test for validation errors fix(opentelemetry): attributes missing on validation errors Sep 23, 2025
@EmrysMyrddin EmrysMyrddin marked this pull request as ready for review September 23, 2025 19:39
@Copilot Copilot AI review requested due to automatic review settings September 23, 2025 19:39
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes missing attributes on validation errors in OpenTelemetry spans by restructuring how GraphQL operation attributes are set during different phases of query processing.

Key changes:

  • Refactored attribute setting to ensure operation metadata is available during validation errors
  • Added proper error code collection and attribute setting for validation spans
  • Enhanced test coverage for validation error scenarios with Hive tracing

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
packages/plugins/opentelemetry/tests/utils.ts Updates test utilities to support custom tracer providers and switches from proxy to supergraph configuration
packages/plugins/opentelemetry/tests/useOpenTelemetry.spec.ts Adds validation error test case and updates existing tests for new supergraph setup
packages/plugins/opentelemetry/src/spans.ts Refactors attribute setting functions and adds operation caching mechanism
packages/plugins/opentelemetry/src/plugin.ts Updates plugin hooks to properly set attributes during validation and execution phases
e2e/opentelemetry/opentelemetry.e2e.ts Adds focused end-to-end test for validation error telemetry
e2e/opentelemetry/gateway.config.ts Adds alternative configuration setup for testing

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@theguild-bot
Copy link
Collaborator

theguild-bot commented Sep 26, 2025

🚀 Snapshot Release (alpha)

The latest changes of this PR are available as alpha on npm (based on the declared changesets):

Package Version Info
@graphql-hive/gateway 2.1.10-alpha-c23bad336892557a6f135ee4e9ebdca6a1baabec npm ↗︎ unpkg ↗︎
@graphql-hive/nestjs 2.0.15-alpha-c23bad336892557a6f135ee4e9ebdca6a1baabec npm ↗︎ unpkg ↗︎
@graphql-hive/plugin-aws-sigv4 2.0.10-alpha-c23bad336892557a6f135ee4e9ebdca6a1baabec npm ↗︎ unpkg ↗︎
@graphql-hive/plugin-opentelemetry 1.0.12-alpha-c23bad336892557a6f135ee4e9ebdca6a1baabec npm ↗︎ unpkg ↗︎
@graphql-mesh/plugin-prometheus 2.0.13-alpha-c23bad336892557a6f135ee4e9ebdca6a1baabec npm ↗︎ unpkg ↗︎
@graphql-hive/gateway-runtime 2.1.9-alpha-c23bad336892557a6f135ee4e9ebdca6a1baabec npm ↗︎ unpkg ↗︎

@EmrysMyrddin EmrysMyrddin force-pushed the repro/otel/bad-validation-error-handling branch from 1a5b4c6 to eab949a Compare September 26, 2025 15:38
@theguild-bot
Copy link
Collaborator

theguild-bot commented Sep 26, 2025

🚀 Snapshot Release (Binary for Linux-ARM64)

The latest changes of this PR are available for download (based on the declared changesets).

Download

@theguild-bot
Copy link
Collaborator

theguild-bot commented Sep 26, 2025

🚀 Snapshot Release (Binary for macOS-ARM64)

The latest changes of this PR are available for download (based on the declared changesets).

Download

@theguild-bot
Copy link
Collaborator

theguild-bot commented Sep 26, 2025

🚀 Snapshot Release (Binary for Linux-X64)

The latest changes of this PR are available for download (based on the declared changesets).

Download

@theguild-bot
Copy link
Collaborator

theguild-bot commented Sep 26, 2025

🚀 Snapshot Release (Binary for Windows-X64)

The latest changes of this PR are available for download (based on the declared changesets).

Download

@theguild-bot
Copy link
Collaborator

theguild-bot commented Sep 26, 2025

🚀 Snapshot Release (Node Docker Image)

The latest changes of this PR are available as image on GitHub Container Registry (based on the declared changesets):

ghcr.io/graphql-hive/gateway:2.1.10-alpha-c23bad336892557a6f135ee4e9ebdca6a1baabec

@theguild-bot
Copy link
Collaborator

theguild-bot commented Sep 26, 2025

🚀 Snapshot Release (Bun Docker Image)

The latest changes of this PR are available as image on GitHub Container Registry (based on the declared changesets):

ghcr.io/graphql-hive/gateway:2.1.10-alpha-c23bad336892557a6f135ee4e9ebdca6a1baabec-bun

@theguild-bot
Copy link
Collaborator

theguild-bot commented Sep 26, 2025

🚀 Snapshot Release (Binary for macOS-X64)

The latest changes of this PR are available for download (based on the declared changesets).

Download

@EmrysMyrddin EmrysMyrddin marked this pull request as draft September 26, 2025 15:56
@n1ru4l n1ru4l self-requested a review October 8, 2025 13:21
Copy link
Contributor

@n1ru4l n1ru4l left a comment

Choose a reason for hiding this comment

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

Works!

@EmrysMyrddin EmrysMyrddin marked this pull request as ready for review October 8, 2025 17:23
@EmrysMyrddin EmrysMyrddin force-pushed the repro/otel/bad-validation-error-handling branch from d157565 to 1840765 Compare October 9, 2025 09:34
@EmrysMyrddin EmrysMyrddin force-pushed the repro/otel/bad-validation-error-handling branch from a408fb7 to a91533a Compare October 10, 2025 09:29
@EmrysMyrddin EmrysMyrddin merged commit 1f419db into main Oct 13, 2025
46 checks passed
@EmrysMyrddin EmrysMyrddin deleted the repro/otel/bad-validation-error-handling branch October 13, 2025 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants