Skip to content

fix(serve-rutils): Orchestrion diagnostics for async and require#22327

Merged
timfish merged 2 commits into
developfrom
timfish/fix/orchestrion-diagnostics
Jul 16, 2026
Merged

fix(serve-rutils): Orchestrion diagnostics for async and require#22327
timfish merged 2 commits into
developfrom
timfish/fix/orchestrion-diagnostics

Conversation

@timfish

@timfish timfish commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

This PR fixes some issues with capturing runtime orchestrion diagnostics:

  • Handles and logs errors!
  • Configures the hook for the async loader and require hook

Notes:

  • This is all really nasty and can be reduced considerably when we drop support for Node without require(esm).
  • We have to block registerDiagnosticsChannelInjection from running on the loader thread or it crashes!
  • I dropped all the usage of DEBUG_BUILD because this code is all server side and we want these to always be captured when debug: true. Probably worth adjusting the ai prompt to reflect this!

@timfish
timfish requested a review from a team as a code owner July 16, 2026 13:17
@timfish
timfish requested review from isaacs, mydea, s1gr1d and stephanie-anderson and removed request for a team July 16, 2026 13:17
cursor[bot]

This comment was marked as outdated.

@github-actions

github-actions Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 27.74 kB - -
@sentry/browser - with treeshaking flags 26.19 kB - -
@sentry/browser (incl. Tracing) 46.57 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 48.36 kB - -
@sentry/browser (incl. Tracing, Profiling) 51.34 kB - -
@sentry/browser (incl. Tracing, Replay) 85.83 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 75.46 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 90.55 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 103.18 kB - -
@sentry/browser (incl. Feedback) 44.92 kB - -
@sentry/browser (incl. sendFeedback) 32.54 kB - -
@sentry/browser (incl. FeedbackAsync) 37.67 kB - -
@sentry/browser (incl. Metrics) 28.84 kB - -
@sentry/browser (incl. Logs) 29.07 kB - -
@sentry/browser (incl. Metrics & Logs) 29.76 kB - -
@sentry/react 29.54 kB - -
@sentry/react (incl. Tracing) 48.82 kB - -
@sentry/vue 33.17 kB - -
@sentry/vue (incl. Tracing) 48.55 kB - -
@sentry/svelte 27.77 kB - -
CDN Bundle 30.14 kB - -
CDN Bundle (incl. Tracing) 48.52 kB - -
CDN Bundle (incl. Logs, Metrics) 31.72 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 49.83 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 70.97 kB - -
CDN Bundle (incl. Tracing, Replay) 86.04 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 87.33 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 91.82 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 93.09 kB - -
CDN Bundle - uncompressed 89.85 kB - -
CDN Bundle (incl. Tracing) - uncompressed 146.66 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 94.56 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 150.64 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 219.28 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 265.86 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 269.82 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 279.56 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 283.52 kB - -
@sentry/nextjs (client) 51.38 kB - -
@sentry/sveltekit (client) 47 kB - -
@sentry/core/server 78.63 kB - -
@sentry/core/browser 64.99 kB - -
@sentry/node-core 63.21 kB -0.01% -1 B 🔽
@sentry/node 125.45 kB - -
@sentry/node (incl. diagnostics channel injection) 141.28 kB +0.08% +111 B 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection) 70.03 kB +0.01% +2 B 🔺
@sentry/node/light 51.33 kB - -
@sentry/node - without tracing 74.7 kB - -
@sentry/aws-serverless 83.92 kB - -
@sentry/cloudflare (withSentry) - minified 182.1 kB - -
@sentry/cloudflare (withSentry) 450.9 kB - -

View base workflow run

@mydea mydea changed the title fix: Orchestrion diagnostics for async and require fix(serve-rutils): Orchestrion diagnostics for async and require Jul 16, 2026
@timfish
timfish merged commit e0865f9 into develop Jul 16, 2026
226 checks passed
@timfish
timfish deleted the timfish/fix/orchestrion-diagnostics branch July 16, 2026 15:26
timfish added a commit that referenced this pull request Jul 16, 2026
I missed this commit off of #22327.

This ensure that we only skip registering the hooks on the loader thread
which means Sentry in a worker thread can still hook loading.
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