Skip to content

feat(remix): Warn when the Remix 3 instrumentation does not apply - #24968

Closed
chargome wants to merge 2 commits into
charlygomez/js-3773-add-source-map-upload-for-remix-3from
charlygomez/js-3774-warn-when-remix-3-instrumentation-does-not-apply
Closed

chargome wants to merge 2 commits into
charlygomez/js-3773-add-source-map-upload-for-remix-3from
charlygomez/js-3774-warn-when-remix-3-instrumentation-does-not-apply

Conversation

@chargome

@chargome chargome commented Oct 2, 2026 •

Copy link
Copy Markdown
Member

Adds a warning if our instrumentation does not grip. It's on by default, not behind debug.

Only the router module is checked: remix depends on all @remix-run/* packages, so the others look installed whether or not the app uses them.

The e2e test starts the app with --import remix/node-tsx instead of the Sentry entry and checks for the warning.

Fixes #24679

@chargome chargome self-assigned this Oct 2, 2026
@chargome
chargome added this pull request to stack #24884 October 2, 2026 08:22
@chargome

chargome commented Oct 2, 2026

Copy link
Copy Markdown
Member Author

bugbot run

@linear-code

linear-code Bot commented Oct 2, 2026

Copy link
Copy Markdown

JS-3774

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

Stale Bugbot comment from a previous run.

Comment thread packages/remix/src/v3/server/instrument.ts Outdated
Comment thread packages/remix/src/v3/server/checkInstrumentation.ts Outdated
@chargome
chargome force-pushed the charlygomez/js-3774-warn-when-remix-3-instrumentation-does-not-apply branch from 38365d9 to ddd4b67 Compare October 2, 2026 08:33
@chargome

chargome commented Oct 2, 2026

Copy link
Copy Markdown
Member Author

bugbot run

@chargome
chargome force-pushed the charlygomez/js-3774-warn-when-remix-3-instrumentation-does-not-apply branch from ddd4b67 to a838f0a Compare October 2, 2026 08:34
@chargome

chargome commented Oct 2, 2026

Copy link
Copy Markdown
Member Author

bugbot run

1 similar comment
@chargome

chargome commented Oct 2, 2026

Copy link
Copy Markdown
Member Author

bugbot run

@chargome
chargome force-pushed the charlygomez/js-3774-warn-when-remix-3-instrumentation-does-not-apply branch from a838f0a to 3a8517d Compare October 2, 2026 08:36

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

Stale Bugbot comment from a previous run.

Comment thread packages/remix/src/v3/server/checkInstrumentation.ts Outdated
chargome and others added 2 commits October 2, 2026 10:46
A module the runtime hook transformed is listed in
`__SENTRY_ORCHESTRION__.runtime`. After `init()`, once the app's import
graph has loaded, the integration checks that list for the Remix 3
server modules. An installed module that is missing is reported with
its reason: imported before the hook was registered, or a version
outside the range the transform matches. A hook that could not be
registered at all names the Node version.

The subscribers that patch a router, request listener or asset server
no longer fail silently when the call has a shape they cannot patch.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The log stands in for the listener's default handler. Sandboxed so the
SDK's console instrumentation does not report the error a second time.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@chargome
chargome force-pushed the charlygomez/js-3774-warn-when-remix-3-instrumentation-does-not-apply branch from 3a8517d to 73abd6b Compare October 2, 2026 08:46
@chargome

chargome commented Oct 2, 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 73abd6b. Configure here.

@chargome

chargome commented Oct 2, 2026

Copy link
Copy Markdown
Member Author

Closing: we ship the alpha without the startup warning. The consoleSandbox fix moves to #24943.

@chargome chargome closed this Oct 2, 2026
An error occurred while trying to automatically change base from charlygomez/js-3773-add-source-map-upload-for-remix-3 to develop October 2, 2026 11:36
chargome added a commit to getsentry/sentry-docs that referenced this pull request Oct 2, 2026
## DESCRIBE YOUR PR

Adds a setup page for the Remix 3 support that `@sentry/remix` ships
under its `/v3` subpaths: the `--import` entry that replaces
`remix/node-tsx`, the two `init()` calls, the `allowPackages` and
`define` additions to the asset server, the source map upload command,
and the warning the SDK prints when the instrumentation did not apply.
Marked alpha, API can change.

The Remix guide's "not yet supported" alert now points to it.

Do not merge before the SDK alpha is published. SDK PRs:
getsentry/sentry-javascript#24943, getsentry/sentry-javascript#24968.
Refs getsentry/sentry-javascript#24687.

## IS YOUR CHANGE URGENT?

Help us prioritize incoming PRs by letting us know when the change needs
to go live.
Select exactly one option. For deadlines, replace `YYYY-MM-DD` with the
due date. You can update this information later by editing the PR
description.

- [ ] Urgent deadline (GA date, etc.): YYYY-MM-DD
- [ ] Other deadline: YYYY-MM-DD
- [x] No deadline: Not urgent, can wait up to 1 week+

---------

Co-authored-by: Claude Fable 5.1 <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.

Warn when Remix 3 instrumentation does not apply

1 participant