feat(react-router): Add React Router Instrumentation API support#1209
Open
onurtemizkan wants to merge 2 commits intomasterfrom
Open
feat(react-router): Add React Router Instrumentation API support#1209onurtemizkan wants to merge 2 commits intomasterfrom
onurtemizkan wants to merge 2 commits intomasterfrom
Conversation
b957494 to
0d52554
Compare
cb86202 to
2642813
Compare
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.
SDK PR: getsentry/sentry-javascript#18580
Adds wizard support for React Router's https://reactrouter.com/how-to/instrumentation
(unstable_instrumentations), available in React Router 7.9.5+.
When tracing is enabled, the wizard now asks if the user wants to use the Instrumentation API.
entry.client.tsxwithSentry.reactRouterTracingIntegration({ useInstrumentationAPI: true })and theunstable_instrumentationsprop on<HydratedRouter>entry.server.tsxwith a standaloneunstable_instrumentationsexport usingSentry.createSentryServerInstrumentation()@sentry/react-routerto Vite'soptimizeDeps.excludeto prevent Vite returns 504 Outdated Optimize Dep for non-existing resource vitejs/vite#13506 in dev modeAlso fixes to the original React Router wizard:
async asyncduplication when wrapping an already-asynchandleRequestinentry.server.tsxNODE_ENV=productionin the start script when--import instrumentationis used