sentry-react-sdk

Integrate the Sentry React SDK for error monitoring, tracing, and session replay.

20|3|Updated Jan 8, 2026
One-click install
npx skills add https://github.com/getsentry/sentry-agent-skills --skill sentry-react-sdk
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sentry-react-sdk
Source: https://github.com/getsentry/sentry-agent-skills/tree/main/skills/sentry-react-sdk
Command: npx skills add https://github.com/getsentry/sentry-agent-skills --skill sentry-react-sdk

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

The Sentry React SDK integration guide provides a comprehensive, battle-tested approach to instrumenting React apps for error monitoring, tracing, session replay, and logging.

Core Features & Use Cases

It covers automatic error capture across React rendering paths, React 19+ compatibility with reactErrorHandler(), router integrations for React Router v5/v6/v7 and TanStack Router, Redux integration, source maps, session replay, and optional logging and profiling. It demonstrates end-to-end observability workflows across common front-end architectures and real-world scenarios such as onboarding, checkout flows, and complex SPA navigations.

Quick Start

Install @sentry/react and initialize Sentry in your app with a minimal configuration to start collecting errors and traces.

Frequently Asked Questions about sentry-react-sdk

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I integrate Sentry for error monitoring and tracing in a React app?

To integrate Sentry for error monitoring in a React app, install @sentry/react and initialize it with a minimal configuration to start collecting errors and traces automatically across rendering paths.

Does the Sentry React SDK support React Router v7 and TanStack Router for tracing?

Yes, the Sentry React SDK supports router integrations for React Router v5, v6, and v7, as well as TanStack Router, enabling end-to-end tracing and observability for SPA navigations.

Can I use Sentry session replay and Redux for state-aware debugging in React?

Yes, you can configure Sentry session replay and optionally integrate Redux for state-aware debugging, capturing front-end application state alongside error and performance data.

What is the best way to configure source maps with Sentry in a Vite or Webpack React build?

Configuring source maps with Sentry in a Vite, Create React App, or Webpack build involves uploading generated map files to un-minify stack traces and pinpoint exact error locations in your React code.

How do I capture rendering errors in React 19+ using Sentry?

To capture rendering errors in React 19+, the Sentry React SDK provides the reactErrorHandler method, ensuring automatic error capture across complex React rendering paths.

How do I verify that Sentry data appears correctly after initializing the React SDK?

You can verify that Sentry data appears correctly by following the enforced validation steps in the integration guide, which demonstrate how to trigger test errors and confirm their arrival in the Sentry dashboard.