sentry-react-setup

Installation
Summary

Sentry error monitoring, session replay, and tracing for React applications.

  • Install @sentry/react and initialize via instrument.js (imported first in your entry point) with DSN configuration
  • Supports error capture via React 19+ error hooks or ErrorBoundary component for earlier versions
  • Includes browser tracing, session replay, and Redux integration; router integrations available for React Router (v4–v7) and TanStack Router
  • Source map upload via @sentry/wizard enables readable stack traces in production
SKILL.md

Sentry React Setup

Install and configure Sentry in React projects.

Invoke This Skill When

  • User asks to "add Sentry to React" or "install Sentry" in a React app
  • User wants error monitoring, logging, or tracing in React
  • User mentions "@sentry/react" or React error boundaries

Important: The configuration options and code samples below are examples. Always verify against docs.sentry.io before implementing, as APIs and defaults may have changed.

Install

npm install @sentry/react --save

Configure

Related skills

More from getsentry/sentry-agent-skills

Installs
1.0K
GitHub Stars
19
First Seen
Jan 20, 2026