feat(react-router): Auto-wire orchestrion build-time instrumentation - #22809
Merged
chargome merged 6 commits intoJul 31, 2026
Merged
Conversation
Member
Author
|
bugbottler run |
There was a problem hiding this comment.
✅ 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 6b044e0. Configure here.
`sentryReactRouter()` now adds the orchestrion bundler plugin (`@sentry/server-utils/orchestrion/vite`) automatically, so bundled SSR builds get `diagnostics_channel` publishers injected into instrumented server-side deps (mysql, ioredis, …) with no manual plugin setup. The plugin is gated on the production server build (`command === 'build'`): it force-bundles CJS deps via `ssr.noExternal`, which Vite's dev SSR server can't interop, and there is nothing to transform in dev. Cloudflare/workerd targets are out of scope for now — opt out there via the shared `buildTimeInstrumentation: false`. Migrate the orchestrion e2e coverage into `react-router-7-framework-instrumentation` and drop the standalone `react-router-8-orchestrion` app. Since bundled orchestrion is now the default, the app initializes Sentry inside the bundle (via `entry.server.tsx`) instead of a `--import` hook, so the channel subscribers land in the same bundle as the injected publishers. Fixes #22682 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…2-react-router-auto-wire-orchestrion-bundler-plugin # Conflicts: # dev-packages/e2e-tests/test-applications/react-router-7-framework-instrumentation/tests/performance/redis.server.test.ts # dev-packages/e2e-tests/test-applications/react-router-8-orchestrion/tests/db.test.ts
… e2e app Add `sentryReactRouter()` to the react-router-8-framework e2e app so the orchestrion build-time transform is exercised on React Router 8 (it previously only ran `reactRouter()`). Keeps ioredis on latest (5.11.1), where redis is instrumented via its native diagnostics channels; the existing redis `db.query` assertions still hold. Also shorten the orchestrion comment in the react-router vite plugin. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
chargome
marked this pull request as ready for review
July 30, 2026 12:53
chargome
requested review from
nicohrubec and
s1gr1d
and removed request for
a team
July 30, 2026 12:53
s1gr1d
approved these changes
Jul 31, 2026
nicohrubec
reviewed
Jul 31, 2026
Contributor
size-limit report 📦
|
chargome
deleted the
charlygomez/js-3182-react-router-auto-wire-orchestrion-bundler-plugin
branch
July 31, 2026 15:48
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
sentryReactRouter()now adds the orchestrion bundler plugin automatically, so bundled SSR builds getdiagnostics_channelpublishers injected with no manual plugin setup.Also merges the two RR-8 e2e tests as it makes no sense to test orchestrion in isolation here.
Postponing dev server investigation to #22857
closes #22682