Skip to content

Conversation

@n1ru4l
Copy link
Contributor

@n1ru4l n1ru4l commented Oct 2, 2025

Closes #1553

Add a simple property on the root span of a graphql request that indicates it is a graphql request trace (a boolean primitive type). This makes it straight-forward and future-proof to indicate graphql requests on our end (Hive Console).

@Copilot Copilot AI review requested due to automatic review settings October 2, 2025 11:31
Copy link
Contributor

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 adds a new hive.graphql attribute to GraphQL root spans in the OpenTelemetry plugin to help identify GraphQL requests in telemetry data.

  • Introduces a new semantic attribute constant SEMATTRS_HIVE_GRAPHQL
  • Sets the hive.graphql attribute to true on operation spans in the span processor
  • Updates test expectations to include the new attribute

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
packages/plugins/opentelemetry/src/attributes.ts Defines new SEMATTRS_HIVE_GRAPHQL constant for the hive.graphql attribute
packages/plugins/opentelemetry/src/hive-span-processor.ts Sets the hive.graphql attribute to true on operation spans
packages/plugins/opentelemetry/tests/useOpenTelemetry.spec.ts Updates test expectations to include the new hive.graphql attribute

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

@theguild-bot
Copy link
Collaborator

🚀 Snapshot Release (alpha)

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

Package Version Info
@graphql-mesh/fusion-runtime 1.2.5-alpha-9844d70300aa7d4b2d9d2966ab97198b6bcbbb8e npm ↗︎ unpkg ↗︎
@graphql-hive/gateway 2.1.9-alpha-9844d70300aa7d4b2d9d2966ab97198b6bcbbb8e npm ↗︎ unpkg ↗︎
@graphql-hive/logger 1.0.6-alpha-9844d70300aa7d4b2d9d2966ab97198b6bcbbb8e npm ↗︎ unpkg ↗︎
@graphql-hive/nestjs 2.0.14-alpha-9844d70300aa7d4b2d9d2966ab97198b6bcbbb8e npm ↗︎ unpkg ↗︎
@graphql-hive/plugin-aws-sigv4 2.0.9-alpha-9844d70300aa7d4b2d9d2966ab97198b6bcbbb8e npm ↗︎ unpkg ↗︎
@graphql-hive/plugin-opentelemetry 1.0.11-alpha-9844d70300aa7d4b2d9d2966ab97198b6bcbbb8e npm ↗︎ unpkg ↗︎
@graphql-mesh/plugin-prometheus 2.0.12-alpha-9844d70300aa7d4b2d9d2966ab97198b6bcbbb8e npm ↗︎ unpkg ↗︎
@graphql-hive/gateway-runtime 2.1.8-alpha-9844d70300aa7d4b2d9d2966ab97198b6bcbbb8e npm ↗︎ unpkg ↗︎
@graphql-mesh/transport-common 1.0.6-alpha-9844d70300aa7d4b2d9d2966ab97198b6bcbbb8e npm ↗︎ unpkg ↗︎
@graphql-mesh/transport-http 1.0.6-alpha-9844d70300aa7d4b2d9d2966ab97198b6bcbbb8e npm ↗︎ unpkg ↗︎
@graphql-mesh/transport-http-callback 1.0.6-alpha-9844d70300aa7d4b2d9d2966ab97198b6bcbbb8e npm ↗︎ unpkg ↗︎
@graphql-mesh/transport-ws 2.0.6-alpha-9844d70300aa7d4b2d9d2966ab97198b6bcbbb8e npm ↗︎ unpkg ↗︎

@theguild-bot
Copy link
Collaborator

🚀 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

🚀 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

🚀 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

🚀 Snapshot Release (Binary for macOS-X64)

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

Download

@theguild-bot
Copy link
Collaborator

🚀 Snapshot Release (Binary for Windows-X64)

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

Download

@n1ru4l n1ru4l closed this Oct 7, 2025
@n1ru4l
Copy link
Contributor Author

n1ru4l commented Oct 13, 2025

superseded by #1530

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.

otel add a simple and consistent way for identifying a graphql root span

3 participants