-
Notifications
You must be signed in to change notification settings - Fork 25
feat: add hive.graphql attribute on graphql root spans
#1580
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
Conversation
There was a problem hiding this 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.graphqlattribute totrueon 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.
🚀 Snapshot Release (
|
| 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 ↗︎ |
|
superseded by #1530 |
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).