Skip to content

feat(remix): Auto-wire orchestrion build-time instrumentation - #23988

Merged
chargome merged 2 commits into
remix-vite-subpathfrom
remix-orchestrion-support
Sep 3, 2026
Merged

feat(remix): Auto-wire orchestrion build-time instrumentation#23988
chargome merged 2 commits into
remix-vite-subpathfrom
remix-orchestrion-support

Conversation

@chargome

@chargome chargome commented Sep 3, 2026

Copy link
Copy Markdown
Member
  • sentryRemixVitePlugin() now applies the orchestrion bundler transform automatically. Remix was the last metaframework SDK still asking users to add sentryOrchestrionPlugin() themselves.
  • Cloudflare and Hydrogen builds are skipped — they instrument via instrumentBuild() from @sentry/remix/cloudflare, so the injected channels would be dead code in a worker bundle.
  • The dev server is unaffected: the plugin is added unconditionally, as in SvelteKit/SolidStart/TanStack Start/Astro, and since Investigate build-time instrumentation for meta framework dev-servers #22857 orchestrion opts itself out of serve so deps stay external for the runtime --import hook.

Fixes #23986
Refs #22632

@chargome chargome self-assigned this Sep 3, 2026
@chargome

chargome commented Sep 3, 2026

Copy link
Copy Markdown
Member Author

bugbot run

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 28.71 kB - -
@sentry/browser - with treeshaking flags 27.02 kB - -
@sentry/browser - with treeshaking flags tracing without tracing 26.92 kB - -
@sentry/browser (incl. Tracing) 49.1 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 49.1 kB - -
@sentry/browser (incl. Tracing, Profiling) 52.01 kB - -
@sentry/browser (incl. Tracing, Replay) 88.58 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 77.88 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 93.26 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 106.21 kB - -
@sentry/browser (incl. Feedback) 46.2 kB - -
@sentry/browser (incl. sendFeedback) 33.78 kB - -
@sentry/browser (incl. FeedbackAsync) 38.87 kB - -
@sentry/browser (incl. Metrics) 29.68 kB - -
@sentry/browser (incl. Logs) 29.97 kB - -
@sentry/browser (incl. Metrics & Logs) 30.61 kB - -
@sentry/react 30.47 kB - -
@sentry/react (incl. Tracing) 51.3 kB - -
@sentry/vue 35.95 kB - -
@sentry/vue (incl. Tracing) 51.37 kB - -
@sentry/svelte 28.74 kB - -
CDN Bundle 30.45 kB - -
CDN Bundle (incl. Tracing) 49.64 kB - -
CDN Bundle (incl. Logs, Metrics) 32.69 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 51.56 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 73.28 kB - -
CDN Bundle (incl. Tracing, Replay) 87.13 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 89 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 93.06 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 95.01 kB - -
CDN Bundle - uncompressed 90.19 kB - -
CDN Bundle (incl. Tracing) - uncompressed 147.87 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 96.58 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 153.65 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 225.75 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 267.37 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 273.13 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 281.07 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 286.82 kB - -
@sentry/nextjs (client) 53.92 kB - -
@sentry/sveltekit (client) 49.53 kB - -
@sentry/core/server 40.96 kB - -
@sentry/core/browser 13.53 kB - -
@sentry/node 124.66 kB +0.02% +21 B 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection) 81.51 kB - -
@sentry/node - without tracing 88.5 kB +0.03% +22 B 🔺
@sentry/node - without channel injection 103.95 kB +0.03% +22 B 🔺
@sentry/aws-serverless 96.87 kB +0.03% +23 B 🔺
@sentry/cloudflare (withSentry) - minified 201.56 kB - -
@sentry/cloudflare (withSentry) 501.37 kB - -

View base workflow run

Comment thread packages/remix/src/vite/orchestrionPlugin.ts
`sentryRemixVitePlugin()` now adds the orchestrion bundler plugin automatically, so bundled SSR
builds get `diagnostics_channel` publishers injected with no manual plugin setup. Remix was the
last metaframework SDK still requiring users to wire `sentryOrchestrionPlugin()` themselves.

Builds targeting workerd (Cloudflare Pages, Hydrogen/Oxygen) are skipped: they instrument through
`instrumentBuild()` from `@sentry/remix/cloudflare` and never subscribe to the injected channels.

Fixes #23986
Refs #22632
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0189LWkpCsFqEwM5EFoT11TJ
@chargome
chargome force-pushed the remix-orchestrion-support branch from b6725c7 to e070d45 Compare September 3, 2026 09:22
@chargome
chargome changed the base branch from develop to remix-vite-subpath September 3, 2026 09:22
@chargome chargome changed the title feat(remix)!: Auto-wire orchestrion build-time instrumentation feat(remix): Auto-wire orchestrion build-time instrumentation Sep 3, 2026
@chargome

chargome commented Sep 3, 2026

Copy link
Copy Markdown
Member Author

bugbot run

Remix's own Vite plugin never sets `ssr.target`, so checking it alone missed Cloudflare Pages
apps: `cloudflareDevProxyVitePlugin` marks the runtime with `ssr.resolve.externalConditions`
and the Cloudflare template sets `ssr.resolve.conditions`. Those builds would have had
`node:diagnostics_channel` injected into a bundle workerd cannot load.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0189LWkpCsFqEwM5EFoT11TJ
@chargome

chargome commented Sep 3, 2026

Copy link
Copy Markdown
Member Author

bugbot run

@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.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 45154a7. Configure here.

@chargome
chargome marked this pull request as ready for review September 3, 2026 11:20
@chargome
chargome requested a review from a team as a code owner September 3, 2026 11:20
@chargome
chargome requested review from andreiborza, isaacs, mydea and s1gr1d and removed request for a team September 3, 2026 11:20
@chargome
chargome merged commit 80a776c into develop Sep 3, 2026
49 checks passed
@chargome
chargome deleted the remix-orchestrion-support branch September 3, 2026 11:48
chargome added a commit that referenced this pull request Sep 3, 2026
- `sentryRemixVitePlugin` moves from the main `@sentry/remix` entry to a
dedicated `@sentry/remix/vite` subpath, matching `@sentry/sveltekit` and
`@sentry/react-router`.
- It was exported from `index.server.ts`, the package's CJS `main`, so
anything the plugin imports lands in the module graph of every Remix
server process. Splitting the entry keeps build-time-only dependencies
off the runtime path.
- It now returns an array so further plugins can be added without
another breaking change — #23988 stacks on this to auto-wire the
orchestrion transform.

Refs #23986

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.

Auto-wire orchestrion build-time instrumentation in @sentry/remix

2 participants