
Sentry React Router Framework Sdk
Wire complete Sentry observability into a React Router v7 framework app across client and server entry points before production traffic.
Install
npx skills add https://github.com/getsentry/sentry-for-ai --skill sentry-react-router-framework-sdkWhat is this skill?
- Opinionated wizard: Detect phase scans the repo before recommending @sentry/react-router changes
- Full-stack coverage for framework mode entry.client.tsx and entry.server.tsx
- Tracing, profiling, session replay, logs, and user feedback configuration paths
- Documents reactRouterTracingIntegration, sentryOnError, and createSentryHandleRequest
- Explicit beta SDK note with redirect to sentry-react-sdk for non-framework React Router modes
Adoption & trust: 633 installs on skills.sh; 197 GitHub stars; 3/3 security scanners passed (skills.sh audits).
Recommended Skills
Azure Kubernetesmicrosoft/azure-skills
Github Actions Docsxixu-me/skills
Deploy To Vercelvercel-labs/agent-skills
Vercel Cli With Tokensvercel-labs/agent-skills
Turborepovercel/turborepo
Docker Expertsickn33/antigravity-awesome-skills
Journey fit
Common Questions / FAQ
Is Sentry React Router Framework Sdk safe to install?
skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.
SKILL.md
READMESKILL.md - Sentry React Router Framework Sdk
> [All Skills](../../SKILL_TREE.md) > [SDK Setup](../sentry-sdk-setup/SKILL.md) > React Router Framework SDK # Sentry React Router Framework SDK Opinionated wizard that scans your React Router Framework project and guides you through complete Sentry setup across client and server entry points. ## Invoke This Skill When - User asks to "add Sentry to React Router Framework" or "set up Sentry in React Router v7 framework mode" - User wants to install or configure `@sentry/react-router` - User uses React Router framework entry files (`entry.client.tsx`, `entry.server.tsx`) and wants tracing/error capture - User asks about `reactRouterTracingIntegration`, `sentryOnError`, `createSentryHandleRequest`, or React Router wizard setup > **Important:** This SDK is currently beta. > For React Router non-framework/data/declarative mode (v5/v6/v7), use `sentry-react-sdk` with `@sentry/react` integrations instead. --- ## Phase 1: Detect Run these commands to understand the project before making any recommendations: ```bash # Detect React Router Framework indicators and versions cat package.json | grep -E '"react-router"|"@react-router/"|"react-router-dev"|"react-router-serve"' # Detect Sentry package choice cat package.json | grep -E '"@sentry/react-router"|"@sentry/react"|"@sentry/profiling-node"' # Check entry point visibility and server instrumentation files ls entry.client.tsx entry.server.tsx instrument.server.mjs react-router.config.ts vite.config.ts 2>/dev/null # Check if React Router files are still hidden (framework mode helper command available) cat package.json | grep -E '"reveal"|react-router' # Detect runtime startup scripts and import strategy cat package.json | grep -E '"dev"|"start"|NODE_OPTIONS|--import' # Detect optional logging/profile-related dependencies cat package.json | grep -E '"pino"|"winston"|"@sentry/profiling-node"' # Detect companion backend directories ls ../backend ../server ../api 2>/dev/null cat ../go.mod ../requirements.txt ../Gemfile ../pom.xml 2>/dev/null | head -3 ``` **What to determine:** | Question | Impact | |----------|--------| | `@sentry/react-router` already installed? | Skip install and move to feature setup | | Framework entry files exposed? | Need `npx react-router reveal` before manual config | | Using `@sentry/react` instead? | This is likely non-framework routing; redirect to `sentry-react-sdk` | | `react-router.config.ts` + Vite config present? | Source map upload and build-end hook setup path | | `NODE_OPTIONS --import` available? | Preferred server instrumentation startup path | | `@sentry/profiling-node` desired/available? | Enable server profiling integration | | Backend directory found? | Trigger Phase 4 cross-link suggestion | --- ## Phase 2: Recommend Present a concrete recommendation based on what you found. Do not ask open-ended questions — lead with a proposal: **Recommended (core coverage):** - ✅ **Error Monitoring** — always; captures client and server errors with framework hooks - ✅ **Tracing** — recommended baseline in framework apps with client/server request flow - ✅ **Session Replay** — recommended for user-facing applications **Optional (enhanced observability):** - ⚡ **Profiling** — server-side profiling with `@sentry/profiling-node` - ⚡ **Logs** — structured `Sentry.logger.*` ingestion and correlation - ⚡ **User Feedback** — in-app feedback widget/reporting flows **Recommendation logic:** | Feature | Recommend when... | |---------|------------------| | Error Monitoring | **Always** — non-negotiable baseline | | Tracing | **Us