feat(react-router)!: Remove server OTel instrumentation#22551
Open
chargome wants to merge 2 commits into
Open
Conversation
Remove the server-side OTel instrumentation now that the instrumentation API is the default and the minimum React Router version is 7.15. Deletes the `InstrumentationBase` `createRequestHandler` proxy and the OTel data-loader span-creation path (plus its Node-version gate). The `http.route: '*'` cleanup in `processEvent`/`processSegmentSpan` stays (simplified) - the bogus wildcard comes from the `@sentry/node` HTTP root span, not our proxy, and routes without a loader/action still need it stripped. Ref #22290 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Member
Author
|
bugbot 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 6633ca7. Configure here.
…-18 e2e app Local e2e verification showed the `http.route: '*'` placeholder no longer occurs after the OTel proxy removal - the underlying HTTP instrumentation resolves the real route (e.g. `/performance/ssr`). Remove the now-dead `processEvent`/ `processSegmentSpan` cleanup and repurpose the e2e assertion to guard that a real `http.route` is set on loader-less routes. Delete the `react-router-7-framework-node-20-18` e2e app: it existed only to test the removed OTel data-loader path on old Node, and pinned react-router 7.13 (below the 7.15 floor). Its remaining coverage is a subset of `react-router-7-framework`. Ref #22290 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Member
Author
|
buglitzer 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 8f98a8b. Configure here.
chargome
marked this pull request as ready for review
July 23, 2026 13:42
chargome
requested review from
mydea and
nicohrubec
and removed request for
a team
July 23, 2026 13:42
Member
Author
|
Didn't add a migration entry here as is does not add much value to the existing one. I have one more follow up where I clarify the new setup in the migration file. |
nicohrubec
approved these changes
Jul 23, 2026
| }, | ||
|
|
||
| transform(code, id) { | ||
| // TODO: This only captures the server build for production SSR builds. Dev mode |
Member
There was a problem hiding this comment.
do you have an issue for this?
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.
Removes the server-side OTel instrumentation from
@sentry/react-router, now that the instrumentation API is the default and the minimum React Router version is 7.15.Deletes the
InstrumentationBaseproxy that patchedcreateRequestHandler, the OTel data-loader span-creation path with its Node-version gate, and the related flags/wiring.Local e2e verification showed the bogus
http.route: '*'placeholder no longer occurs once the proxy is gone — the underlying HTTP instrumentation resolves the real route. TheprocessEvent/processSegmentSpancleanup that stripped'*'is therefore dead code and is removed; an e2e assertion on a loader-less route (/performance/ssr) guards that a realhttp.routeis still set.Also deletes the
react-router-7-framework-node-20-18e2e app: it existed only to exercise the removed OTel data-loader path on old Node and pinned react-router 7.13 (below the 7.15 floor). Its remaining coverage is a subset ofreact-router-7-framework.ServerBuild capture continues via the Vite plugin (SSR build). Dev-mode HMR capture is a known gap (see TODO) to be handled separately.
Fixes #22531
Ref #22290