Skip to content

fix(server-utils): Ensure all orchestrion instrumentation lazy registers#22518

Open
isaacs wants to merge 1 commit into
developfrom
isaacs/lazy-register-orchestrion
Open

fix(server-utils): Ensure all orchestrion instrumentation lazy registers#22518
isaacs wants to merge 1 commit into
developfrom
isaacs/lazy-register-orchestrion

Conversation

@isaacs

@isaacs isaacs commented Jul 23, 2026

Copy link
Copy Markdown
Member

This ports and refactors the intent of #22387, using the mechanisms landed on develop in #22094, rather than the mechanisms in #22386 which are similar in intent, but substantially different in implementation.

The difference from #22387 is entirely in the plumbing underneath the helper. The way that "is my module injected?" and "tell me when it gets injected" are answered, both now use the machinery that already landed.

Beyond that, the actual registration, event emitting, double-wrap guard, and integration refactoring, should all look very familiar.

@isaacs
isaacs requested review from JPeer264 and mydea July 23, 2026 03:32
@isaacs
isaacs requested review from a team as code owners July 23, 2026 03:32
Comment thread packages/server-utils/src/integrations/tracing-channel/mongoose.ts Outdated
Comment thread packages/server-utils/src/orchestrion/instrumentation.ts
@github-actions

github-actions Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 27.95 kB - -
@sentry/browser - with treeshaking flags 26.39 kB - -
@sentry/browser (incl. Tracing) 46.41 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 48.18 kB - -
@sentry/browser (incl. Tracing, Profiling) 51.21 kB - -
@sentry/browser (incl. Tracing, Replay) 85.69 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 75.33 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 90.4 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 103.06 kB - -
@sentry/browser (incl. Feedback) 45.13 kB - -
@sentry/browser (incl. sendFeedback) 32.74 kB - -
@sentry/browser (incl. FeedbackAsync) 37.8 kB - -
@sentry/browser (incl. Metrics) 29.04 kB - -
@sentry/browser (incl. Logs) 29.26 kB - -
@sentry/browser (incl. Metrics & Logs) 29.97 kB - -
@sentry/react 29.75 kB - -
@sentry/react (incl. Tracing) 48.71 kB - -
@sentry/vue 33.38 kB - -
@sentry/vue (incl. Tracing) 48.4 kB - -
@sentry/svelte 27.97 kB - -
CDN Bundle 30.28 kB - -
CDN Bundle (incl. Tracing) 48.26 kB - -
CDN Bundle (incl. Logs, Metrics) 31.85 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 49.58 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 71.13 kB - -
CDN Bundle (incl. Tracing, Replay) 85.83 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 87.14 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 91.6 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 92.89 kB - -
CDN Bundle - uncompressed 90.15 kB - -
CDN Bundle (incl. Tracing) - uncompressed 145.22 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 94.86 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 149.2 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 219.62 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 264.46 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 268.42 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 278.16 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 282.11 kB - -
@sentry/nextjs (client) 51.24 kB - -
@sentry/sveltekit (client) 46.84 kB - -
@sentry/core/server 80.05 kB - -
@sentry/core/browser 52.01 kB - -
@sentry/node 123.14 kB - -
@sentry/node (incl. diagnostics channel injection) 167.33 kB +0.12% +190 B 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection) 166 B - -
@sentry/node - without tracing 73.31 kB -0.01% -1 B 🔽
@sentry/aws-serverless 82.82 kB - -
@sentry/cloudflare (withSentry) - minified 197.05 kB - -
@sentry/cloudflare (withSentry) 484.73 kB - -

View base workflow run

@isaacs
isaacs force-pushed the isaacs/lazy-register-orchestrion branch 2 times, most recently from 73c683a to d752238 Compare July 23, 2026 15:13
Comment thread packages/server-utils/src/integrations/tracing-channel/knex.ts Outdated
@isaacs

isaacs commented Jul 23, 2026

Copy link
Copy Markdown
Member Author

Going to port this atop #22443 once that lands, since there are some conflicts.


UPDATE: this is now done. Single commit can base cleanly on develop if CI goes green and reviewers approve.

@isaacs
isaacs force-pushed the isaacs/lazy-register-orchestrion branch from 6d6a126 to 464dc8f Compare July 23, 2026 22:41
isaacs added a commit that referenced this pull request Jul 23, 2026
…on Node (#22518)

Co-Authored-By: isaacs <i@izs.me>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@isaacs
isaacs force-pushed the isaacs/lazy-register-orchestrion branch from 464dc8f to ae93c4e Compare July 23, 2026 22:43
@isaacs
isaacs enabled auto-merge (rebase) July 23, 2026 22:43
Comment thread packages/server-utils/src/orchestrion/instrumentation.ts Outdated
isaacs added a commit that referenced this pull request Jul 24, 2026
Comment thread packages/server-utils/src/orchestrion/instrumentation.ts
isaacs added a commit that referenced this pull request Jul 24, 2026
isaacs added a commit that referenced this pull request Jul 24, 2026
…on Node (#22518)

Co-Authored-By: isaacs <i@izs.me>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@isaacs
isaacs force-pushed the isaacs/lazy-register-orchestrion branch from 38d60ec to 7edaad4 Compare July 24, 2026 14:28
Comment thread packages/server-utils/src/orchestrion/runtime/register.ts
Comment thread packages/server-utils/src/orchestrion/instrumentation.ts
isaacs added a commit that referenced this pull request Jul 24, 2026
isaacs added a commit that referenced this pull request Jul 24, 2026
Comment thread packages/server-utils/src/orchestrion/instrumentation.ts
isaacs added a commit that referenced this pull request Jul 24, 2026
…on Node (#22518)

Co-Authored-By: isaacs <i@izs.me>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
isaacs added a commit that referenced this pull request Jul 24, 2026
isaacs added a commit that referenced this pull request Jul 24, 2026
@isaacs
isaacs force-pushed the isaacs/lazy-register-orchestrion branch from 549f754 to 3f5b4ba Compare July 24, 2026 16:38
Comment thread packages/server-utils/src/orchestrion/bundler/webpack-loader.ts
Comment thread packages/server-utils/src/orchestrion/bundler/webpack-loader.ts Outdated
isaacs added a commit that referenced this pull request Jul 24, 2026
…n Node (#22518)

Co-Authored-By: isaacs <i@izs.me>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@isaacs
isaacs force-pushed the isaacs/lazy-register-orchestrion branch from 62e4483 to 96d3ac4 Compare July 24, 2026 19:44
isaacs added a commit that referenced this pull request Jul 24, 2026
…on Node (#22518)

Co-Authored-By: isaacs <i@izs.me>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@isaacs
isaacs force-pushed the isaacs/lazy-register-orchestrion branch from 96d3ac4 to bf10337 Compare July 24, 2026 19:45
…on Node (#22518)

Co-Authored-By: isaacs <i@izs.me>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@isaacs
isaacs force-pushed the isaacs/lazy-register-orchestrion branch from bf10337 to 0f52d62 Compare July 24, 2026 22:37

@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 0f52d62. Configure here.

bindNodeRedisBatchChannel(CHANNELS.NODE_REDIS_BATCH, data =>
data.arguments?.[2] !== undefined ? 'MULTI' : 'PIPELINE',
);
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Redis legacy subscribe deferred incorrectly

Medium Severity

subscribeLegacyRedisCommand used to run immediately because redis v2–v3 does not need bindStore. It now sits inside invokeOrchestrionInstrumentation, which always waits on the tracing-channel binding. On the bundler path that list is already populated at setup, so subscription is deferred past Sentry.init() while OpenTelemetry is still coming up, and early redis v2–v3 commands can emit with no subscriber.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 0f52d62. Configure here.

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.

2 participants