Skip to content

ref(server-utils): Streamline graphql integration - #23329

Open
mydea wants to merge 1 commit into
developfrom
fn/streamline-graphql
Open

ref(server-utils): Streamline graphql integration#23329
mydea wants to merge 1 commit into
developfrom
fn/streamline-graphql

Conversation

@mydea

@mydea mydea commented Aug 12, 2026

Copy link
Copy Markdown
Member

Streamline graphql integration files into a single folder, rename it to graphqlIntegration for consistency, combine into a singular integration for consistency.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 89a3910. Configure here.

genericPoolIntegration,
googleGenAIIntegration,
graphqlDiagnosticsIntegration,
graphqlIntegration,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Public GraphQL API renamed without deprecation

Medium Severity

graphqlDiagnosticsIntegration is removed from public Deno and @sentry/server-utils/orchestrion exports and replaced with graphqlIntegration without a deprecated alias. The main @sentry/server-utils entry also drops its previous graphqlIntegration export. This is a public API breaking change without a deprecation notice, which the PR review guidelines ask to flag. Nearby Deno renames keep deprecated aliases for the same reason.

Fix in Cursor Fix in Web

Triggered by project rule: PR Review Guidelines for Cursor Bot

Reviewed by Cursor Bugbot for commit 89a3910. Configure here.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

this was not exposed before at all, so all good.

@github-actions

github-actions Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

⚠️ Warning: Base artifact is not the latest one, because the latest workflow run is not done yet. This may lead to incorrect results. Try to re-run all tests to get up to date results.

Path Size % Change Change
@sentry/browser 30.34 kB - -
@sentry/browser - with treeshaking flags 28.51 kB - -
@sentry/browser - with treeshaking flags tracing without tracing 26.85 kB - -
@sentry/browser (incl. Tracing) 48.56 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 48.57 kB - -
@sentry/browser (incl. Tracing, Profiling) 51.45 kB - -
@sentry/browser (incl. Tracing, Replay) 87.97 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 77.35 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 92.69 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 105.37 kB - -
@sentry/browser (incl. Feedback) 47.66 kB - -
@sentry/browser (incl. sendFeedback) 35.16 kB - -
@sentry/browser (incl. FeedbackAsync) 40.31 kB - -
@sentry/browser (incl. Metrics) 31.31 kB - -
@sentry/browser (incl. Logs) 31.58 kB - -
@sentry/browser (incl. Metrics & Logs) 32.25 kB - -
@sentry/react 32.13 kB - -
@sentry/react (incl. Tracing) 50.77 kB - -
@sentry/vue 35.35 kB - -
@sentry/vue (incl. Tracing) 50.51 kB - -
@sentry/svelte 30.37 kB - -
CDN Bundle 31.64 kB - -
CDN Bundle (incl. Tracing) 48.89 kB - -
CDN Bundle (incl. Logs, Metrics) 33.86 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 50.85 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 74.38 kB - -
CDN Bundle (incl. Tracing, Replay) 86.48 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 88.34 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 92.19 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 94.16 kB - -
CDN Bundle - uncompressed 93.94 kB - -
CDN Bundle (incl. Tracing) - uncompressed 146.76 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 100.34 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 152.56 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 229.28 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 266.02 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 271.81 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 279.72 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 285.49 kB - -
@sentry/nextjs (client) 53.29 kB - -
@sentry/sveltekit (client) 48.98 kB - -
@sentry/core/server 65.44 kB - -
@sentry/core/browser 51.8 kB - -
@sentry/node 117.94 kB -0.03% -32 B 🔽
@sentry/node/import (ESM hook with diagnostics-channel injection) 0 B added added
@sentry/node - without tracing 82.09 kB +0.01% +2 B 🔺
@sentry/aws-serverless 91.5 kB -0.01% -1 B 🔽
@sentry/cloudflare (withSentry) - minified 214.07 kB - -
@sentry/cloudflare (withSentry) 528.89 kB - -

View base workflow run

@mydea
mydea force-pushed the fn/streamline-graphql branch 2 times, most recently from 6c4ec00 to 8960fd0 Compare August 12, 2026 11:40
@mydea
mydea force-pushed the fn/streamline-graphql branch from 8960fd0 to 8b49cb9 Compare August 12, 2026 12:17
Base automatically changed from fn/move-integrations-tracing-channel to develop August 12, 2026 12:54
@mydea
mydea force-pushed the fn/streamline-graphql branch from 8b49cb9 to 760292b Compare August 12, 2026 12:54
@mydea
mydea marked this pull request as ready for review August 12, 2026 13:39
@mydea
mydea requested review from a team as code owners August 12, 2026 13:39
@mydea
mydea requested review from JPeer264 and isaacs and removed request for a team August 12, 2026 13:39
Comment on lines 37 to 40

const _graphqlIntegration = ((options: GraphqlDiagnosticChannelsOptions = {}) => {
const _graphqlIntegration = ((options: GraphQLOptions = {}) => {
const config = getOptionsWithDefaults(options);
const getConfig = (): GraphqlResolvedConfig => config;

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.

Bug: setupOnce calls waitForTracingChannelBinding which may fail if the async context isn't ready during SDK init. The native GraphQL instrumentation will then silently fail without any recovery mechanism.
Severity: HIGH

Suggested Fix

Implement a recovery mechanism for the native GraphQL instrumentation path, similar to the one used by the orchestrion instrumentation. Instead of a single, immediate retry, the code should listen for an event indicating the async context is ready or use a more robust retry strategy to ensure the subscription to diagnostic channels eventually succeeds.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location: packages/server-utils/src/integrations/graphql/index.ts#L37-L40

Potential issue: The `graphqlIntegration.setupOnce()` method calls
`setupNativeGraphQLInstrumentation()`, which uses `waitForTracingChannelBinding()` to
subscribe to native GraphQL diagnostic channels. This subscription can fail if the async
context strategy is not yet configured when `setupOnce()` is executed during SDK
initialization. The `waitForTracingChannelBinding()` function only retries once before
failing silently. Unlike the orchestrion instrumentation path, this new native path
lacks a recovery mechanism to re-attempt the subscription later. Consequently, for
GraphQL v17+, instrumentation may be silently disabled without any indication to the
user, leading to a loss of tracing data.

Did we get this right? 👍 / 👎 to inform future reviews.

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.

1 participant