Install the "sentry-react-native-sdk" agent skill from https://github.com/getsentry/sentry-for-ai/tree/main/skills-legacy/sentry-react-native-sdk into .claude/skills/sentry-react-native-sdk/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "sentry-react-native-sdk", then confirm the skill loads.
Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
Type this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
skills CLI
$ npx skills add getsentry/sentry-for-ai --skill sentry-react-native-sdk -a codex
Project install goes to .agents/skills/; add -g for ~/.codex/skills/.
Install the "sentry-react-native-sdk" agent skill from https://github.com/getsentry/sentry-for-ai/tree/main/skills-legacy/sentry-react-native-sdk into .agents/skills/sentry-react-native-sdk/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "sentry-react-native-sdk", then confirm the skill loads.
Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
skills CLI
$ npx skills add getsentry/sentry-for-ai --skill sentry-react-native-sdk -a cursor
Project install goes to .agents/skills/; add -g for ~/.cursor/skills/.
Install the "sentry-react-native-sdk" agent skill from https://github.com/getsentry/sentry-for-ai/tree/main/skills-legacy/sentry-react-native-sdk into .cursor/skills/sentry-react-native-sdk/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "sentry-react-native-sdk", then confirm the skill loads.
Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
skills CLI
$ npx skills add getsentry/sentry-for-ai --skill sentry-react-native-sdk -a gemini-cli
Project install goes to .agents/skills/; add -g for ~/.gemini/skills/.
Install the "sentry-react-native-sdk" agent skill from https://github.com/getsentry/sentry-for-ai/tree/main/skills-legacy/sentry-react-native-sdk into .gemini/skills/sentry-react-native-sdk/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "sentry-react-native-sdk", then confirm the skill loads.
Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
Installs for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
skills CLI
$ npx skills add getsentry/sentry-for-ai --skill sentry-react-native-sdk -a github-copilot
Project install goes to .agents/skills/; add -g for ~/.copilot/skills/.
Install the "sentry-react-native-sdk" agent skill from https://github.com/getsentry/sentry-for-ai/tree/main/skills-legacy/sentry-react-native-sdk into .github/skills/sentry-react-native-sdk/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "sentry-react-native-sdk", then confirm the skill loads.
GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
skills CLI
$ npx skills add getsentry/sentry-for-ai --skill sentry-react-native-sdk -a opencode
OpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
Install the "sentry-react-native-sdk" agent skill from https://github.com/getsentry/sentry-for-ai/tree/main/skills-legacy/sentry-react-native-sdk into .opencode/skills/sentry-react-native-sdk/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "sentry-react-native-sdk", then confirm the skill loads.
OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
Facts
Skill name
sentry-react-native-sdk
GitHub stars
268
Token cost
~10k tokens
SKILL.md length
3,089 words
Files
8 (incl. references)
Skills in repo
32
Repo updated
First seen
Licence
Apache-2.0
At a glance
Full Sentry SDK setup for React Native and Expo. An agent skill from getsentry/sentry-for-ai.
Works in 4 steps: Detect → Recommend → Guide → …
Asked to add Sentry to React Native
SKILL.md covers Invoke This Skill When, Phase 1: Detect, Phase 2: Recommend and Phase 3: Guide, plus 1 more section
Calls npx, eas and expo; reaches sentry.io; needs SENTRY_AUTH_TOKEN
What it does
Sentry React Native SDK is an agent skill from getsentry/sentry-for-ai, published by the product's own GitHub organization. Full Sentry SDK setup for React Native and Expo. Use when asked to "add Sentry to React Native", "install @sentry/react-native", "setup Sentry in Expo", or configure error monitoring, tracing, profiling, session replay, or logging for React Native applications. Supports Expo managed, Expo bare, and vanilla React Native.
Its SKILL.md is about 10k tokens, which your agent loads only when the skill is triggered. The skill folder holds 8 other files, including reference files (for example `references/error-monitoring.md`, `references/expo-config-plugin.md` and `references/logging.md`).
It sits in Mobile, covering Cross-platform mobile apps. It works with Sentry, React Native and Expo. The repository describes itself as: Teach your AI coding assistant how to use Sentry - setup, debugging, alerts, and more. The licence is Apache-2.0.
When your agent uses it
Asked to add Sentry to React Native
Install @sentry/react-native
Setup Sentry in Expo
Configure error monitoring
Example prompts
“add Sentry to React Native”
“install @sentry/react-native”
“setup Sentry in Expo”
“/sentry-react-native-sdk”
Requirements
Python 3
Node.js
A credential in SENTRY_AUTH_TOKEN
Workflow steps
4 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit d8fd106. It shows what the files ask for, not the result of running them.
Tool permissions
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Runs code
Shell commands in SKILL.md call:
npx
eas
expo
sh
python3
npm
From the folder's file list and the shell code blocks in SKILL.md.
Network
Hosts in commands or code, which the agent is likely to contact:
sentry.io
Also links to:
docs.sentry.io
docs.expo.dev
From URLs in SKILL.md, links to its own repository left out.
Credentials
Names these keys or tokens, usually read from environment variables:
SENTRY_AUTH_TOKEN
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Context cost
Sentry React Native SDK loads about 10k tokens when it runs, and up to ~51k if it reads all its reference files. Until then it costs about 86 tokens; SKILL.md has 3,089 words of instructions outside code blocks.
Always· name and description, kept in context so the agent knows when to use it
~86
When it runs· the whole SKILL.md, loaded when a task matches
~10k
With references· SKILL.md plus every file in references/, read only if the agent opens them
~51k
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
Safety
Auto-check: notes
The automated check noted patterns worth knowing about, such as sudo or a known installer.
nvironment — it does not share the same `.env` as your app.
NoteMentions a .env fileSKILL.md:868
The script loads env from `@expo/env`, `.env`, or `.env.sentry-build-plugin` — without overwriting EAS secrets already
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
Download SKILL.mdSave it as .claude/skills/sentry-react-native-sdk/SKILL.md (or your agent's skills folder). This skill also uses 7 other files; get the full folder from GitHub.
name
sentry-react-native-sdk
description
Full Sentry SDK setup for React Native and Expo. Use when asked to "add Sentry to React Native", "install @sentry/react-native", "setup Sentry in Expo", or configure error monitoring, tracing, profiling, session replay, or logging for React Native applications. Supports Expo managed, Expo bare, and vanilla React Native.
Opinionated wizard that scans your React Native or Expo project and guides you through complete Sentry setup — error monitoring, tracing, profiling, session replay, logging, and more.
Invoke This Skill When
User asks to "add Sentry to React Native" or "set up Sentry" in an RN or Expo app
User wants error monitoring, tracing, profiling, session replay, or logging in React Native
User mentions @sentry/react-native, mobile error tracking, or Sentry for Expo
User wants to monitor native crashes, ANRs, or app hangs on iOS/Android
Note: SDK versions and APIs below reflect current Sentry docs at time of writing (@sentry/react-native ≥6.0.0, minimum recommended ≥8.0.0).
Always verify against docs.sentry.io/platforms/react-native/ before implementing.
Phase 1: Detect
Run these commands to understand the project before making any recommendations:
bash
# Detect project type and existing Sentry
cat package.json | grep -E '"(react-native|expo|@expo|@sentry/react-native|sentry-expo)"'
# Distinguish Expo managed vs bare vs vanilla RN
ls app.json app.config.js app.config.ts 2>/dev/null
cat app.json 2>/dev/null | python3 -c "import sys,json; d=json.load(sys.stdin); print('Expo managed' if 'expo' in d else 'Bare/Vanilla')" 2>/dev/null
# Check Expo SDK version (important: Expo SDK 50+ required for @sentry/react-native)
cat package.json | grep '"expo"'
# Detect navigation library
grep -E '"(@react-navigation/native|react-native-navigation)"' package.json
# Detect state management (Redux → breadcrumb integration available)
grep -E '"(redux|@reduxjs/toolkit|zustand|mobx)"' package.json
# Check for existing Sentry initialization
grep -r "Sentry.init" src/ app/ App.tsx App.js _layout.tsx 2>/dev/null | head -5
# Detect Hermes (affects source map handling)
cat android/app/build.gradle 2>/dev/null | grep -i hermes
cat ios/Podfile 2>/dev/null | grep -i hermes
# Detect Expo Router
ls app/_layout.tsx app/_layout.js 2>/dev/null
# Detect backend for cross-link
ls backend/ server/ api/ 2>/dev/null
find . -maxdepth 3 \( -name "go.mod" -o -name "requirements.txt" -o -name "Gemfile" -o -name "package.json" \) 2>/dev/null | grep -v node_modules | head -10
What to determine:
Question
Impact
expo in package.json?
Expo path (config plugin + getSentryExpoConfig) vs bare/vanilla RN path
Expo SDK ≥50?
@sentry/react-native directly; older = sentry-expo (legacy, do not use)
app.json has "expo" key?
Managed Expo — wizard is simplest; config plugin handles all native config
app/_layout.tsx present?
Expo Router project — init goes in _layout.tsx
@sentry/react-native already in package.json?
Skip install, jump to feature config
@react-navigation/native present?
Recommend reactNavigationIntegration for screen tracking
react-native-navigation present?
Recommend reactNativeNavigationIntegration (Wix)
Backend directory detected?
Trigger Phase 4 cross-link
Phase 2: Recommend
Present a concrete recommendation based on what you found. Don't ask open-ended questions — lead with a proposal:
Recommended (core coverage — always set up these):
✅ Tracing — mobile performance is critical; auto-instruments navigation, app start, network requests
✅ Session Replay — mobile replay captures screenshots and touch events for debugging user issues
Optional (enhanced observability):
⚡ Profiling — CPU profiling on iOS (JS profiling cross-platform); low overhead in production
⚡ Logging — structured logs via Sentry.logger.*; links to traces for full context
⚡ User Feedback — collect user-submitted bug reports directly from your app
Recommendation logic:
Feature
Recommend when...
Error Monitoring
Always — non-negotiable baseline for any mobile app
Tracing
Always for mobile — app start, navigation, and network latency matter
Session Replay
User-facing production app; debug user-reported issues visually
Profiling
Performance-sensitive screens, startup time concerns, or production perf investigations
Logging
App uses structured logging, or you want log-to-trace correlation in Sentry
User Feedback
Beta or customer-facing app where you want user-submitted bug reports
Propose: "For your [Expo managed / bare RN] app, I recommend setting up Error Monitoring + Tracing + Session Replay. Want me to also add Profiling and Logging?"
Path A: Wizard CLI (Recommended for all project types)
You need to run this yourself — the wizard opens a browser for login and requires interactive input that the agent can't handle. Copy-paste into your terminal:
npx @sentry/wizard@latest -i reactNative
It handles login, org/project selection, SDK installation, native config, source map upload, and Sentry.init(). Here's what it creates/modifies:
File
Action
Purpose
package.json
Installs @sentry/react-native
Core SDK
metro.config.js
Adds @sentry/react-native/metro serializer
Source map generation
app.json
Adds @sentry/react-native/expo plugin (Expo only)
Config plugin for native builds
App.tsx / _layout.tsx
Adds Sentry.init() and Sentry.wrap()
SDK initialization
ios/sentry.properties
Stores org/project/token
iOS source map + dSYM upload
android/sentry.properties
Stores org/project/token
Android source map upload
android/app/build.gradle
Adds Sentry Gradle plugin
Android source maps + proguard
ios/[AppName].xcodeproj
Wraps "Bundle RN" build phase + adds dSYM upload
iOS symbol upload
.env.local
SENTRY_AUTH_TOKEN
Auth token (add to .gitignore)
Once it finishes, come back and skip to Verification.
If the user skips the wizard, proceed with Path B or C (Manual Setup) below based on their project type.
npx expo customize metro.config.js
# Then replace contents with the above
Metro config options:
Option
Type
Default
Purpose
autoWrapExpoRouterErrorBoundary
boolean
false
Automatically wrap export { ErrorBoundary } from 'expo-router' with Sentry at build time (SDK ≥8.17.0). Captures errors that hit per-route ErrorBoundaries without manual wrapping
annotateReactComponents
boolean
false
Inject component names for better error context
includeWebReplay
boolean
true
Include web replay bundle (set false for native-only apps)
includeWebFeedback
boolean
true
Include web feedback bundle (set false for native-only apps)
Note: Expo Router automatically handles navigation tracking. The Sentry.NavigationContainer wrapper is not needed for Expo Router projects — navigation spans are captured automatically.
Expo Router ErrorBoundary Setup (SDK ≥8.16.0)
Expo Router's per-route ErrorBoundary swallows render errors by default — Sentry won't see them unless you explicitly capture them. Two options:
Auto-wrap (recommended, SDK ≥8.17.0) — Enable autoWrapExpoRouterErrorBoundary: true in metro.config.js (shown above). The Babel plugin rewrites export { ErrorBoundary } from 'expo-router' automatically in all route files.
Manual wrap — Wrap the boundary yourself in each route file:
typescript
// app/_layout.tsx (or any route file)
import { ErrorBoundary as ExpoErrorBoundary } from 'expo-router';
import * as Sentry from '@sentry/react-native';
export const ErrorBoundary = Sentry.wrapExpoRouterErrorBoundary(ExpoErrorBoundary);
Both methods capture errors that hit the boundary with route context (route.name, route.path, route.params), tag the active navigation span as errored, and emit a breadcrumb. Concrete paths/params respect sendDefaultPii.
For standard Expo (App.tsx):
typescript
import { isRunningInExpoGo } from "expo";
import * as Sentry from "@sentry/react-native";
Sentry.init({
dsn: process.env.EXPO_PUBLIC_SENTRY_DSN ?? "YOUR_SENTRY_DSN",
sendDefaultPii: true,
tracesSampleRate: 1.0,
profilesSampleRate: 1.0,
replaysOnErrorSampleRate: 1.0,
replaysSessionSampleRate: 0.1,
enableLogs: true,
integrations: [
Sentry.mobileReplayIntegration(),
],
enableNativeFramesTracking: !isRunningInExpoGo(),
environment: __DEV__ ? "development" : "production",
});
function App() {
return (
<Sentry.NavigationContainer>
{/* your navigation here */}
</Sentry.NavigationContainer>
);
}
export default Sentry.wrap(App);
Path C: Manual — Bare React Native (0.69+)
Step 1 — Install
bash
npm install @sentry/react-native --save
cd ios && pod install
Step 2 — metro.config.js
javascript
const { getDefaultConfig } = require("@react-native/metro-config");
const { withSentryConfig } = require("@sentry/react-native/metro");
const config = getDefaultConfig(__dirname);
module.exports = withSentryConfig(config, {
// Set to false to exclude @sentry-internal/replay from the native bundle (web only).
// includeWebReplay: true,
// Set to false to exclude @sentry-internal/feedback from the native bundle (web only).
// includeWebFeedback: true,
// Auto-wrap Expo Router ErrorBoundary exports at build time (SDK ≥8.17.0, Expo Router only)
// autoWrapExpoRouterErrorBoundary: true,
});
Step 3 — iOS: Modify Xcode build phase
Open ios/[AppName].xcodeproj in Xcode. Find the "Bundle React Native code and images" build phase and replace the script content with:
If your app does significant async work after the root component mounts (e.g., fetching config, waiting for auth), call Sentry.appLoaded() once that work is complete. This signals the true end of app startup to Sentry and produces more accurate app start duration measurements.
typescript
// Call after async initialization is complete, e.g., in a useEffect or after a loading screen:
useEffect(() => {
fetchConfig().then(() => {
Sentry.appLoaded(); // marks the end of the app startup phase
});
}, []);
If you don't call Sentry.appLoaded(), the SDK estimates the app start end automatically.
Navigation Setup — React Navigation (v5+)
Recommended: Use Sentry.NavigationContainer wrapper (SDK ≥8.13.0)
Drop-in replacement for NavigationContainer that automatically wires up navigation tracking:
typescript
import * as Sentry from "@sentry/react-native";
// Replace NavigationContainer with Sentry.NavigationContainer
<Sentry.NavigationContainer>
<Stack.Navigator>
{/* your screens */}
</Stack.Navigator>
</Sentry.NavigationContainer>
That's it! The wrapper automatically:
Creates the reactNavigationIntegration
Registers the navigation container ref
Captures breadcrumbs for navigation events (SDK ≥8.13.0)
Tracks Time to Initial Display (TTID) per screen
Alternative: Manual setup (for SDK <8.13.0 or custom config)
typescript
import { reactNavigationIntegration } from "@sentry/react-native";
import { NavigationContainer, createNavigationContainerRef } from "@react-navigation/native";
const navigationIntegration = reactNavigationIntegration({
enableTimeToInitialDisplay: true, // track TTID per screen
routeChangeTimeoutMs: 1_000, // max wait for route change to settle
ignoreEmptyBackNavigationTransactions: true,
});
// Add to Sentry.init integrations array
Sentry.init({
integrations: [navigationIntegration],
// ...
});
// In your component:
const navigationRef = createNavigationContainerRef();
<NavigationContainer
ref={navigationRef}
onReady={() => {
navigationIntegration.registerNavigationContainer(navigationRef);
}}
>
Navigation Setup — Wix React Native Navigation
typescript
import * as Sentry from "@sentry/react-native";
import { Navigation } from "react-native-navigation";
Sentry.init({
integrations: [Sentry.reactNativeNavigationIntegration({ navigation: Navigation })],
// ...
});
Wrap Your Root Component
Always wrap your root component — this enables React error boundaries and ensures crashes at the component tree level are captured:
typescript
export default Sentry.wrap(App);
For Each Agreed Feature
Walk through features one at a time. Load the reference file for each, follow its steps, then verify before moving on:
Feature
Reference
Load when...
Error Monitoring
${SKILL_ROOT}/references/error-monitoring.md
Always (baseline)
Tracing & Performance
${SKILL_ROOT}/references/tracing.md
Always for mobile (app start, navigation, network)
Profiling
${SKILL_ROOT}/references/profiling.md
Performance-sensitive production apps
Session Replay
${SKILL_ROOT}/references/session-replay.md
User-facing apps
Logging
${SKILL_ROOT}/references/logging.md
Structured logging / log-to-trace correlation
User Feedback
${SKILL_ROOT}/references/user-feedback.md
Collecting user-submitted reports
Expo Config Plugin
${SKILL_ROOT}/references/expo-config-plugin.md
Configuring the @sentry/react-native/expo plugin
For each feature: Read ${SKILL_ROOT}/references/<feature>.md, follow steps exactly, verify it works.
Configuration Reference
Core Sentry.init() Options
Option
Type
Default
Purpose
dsn
string
—
Required. Project DSN; SDK disabled if empty. Env: SENTRY_DSN
Which API URLs receive distributed tracing headers
profilesSampleRate
number
0
Profiling sample rate (applied to traced transactions)
Native / Mobile Options
Option
Type
Default
Purpose
enableNative
boolean
true
Set false for JS-only (no native SDK)
enableNativeCrashHandling
boolean
true
Capture native hard crashes (iOS/Android)
enableNativeFramesTracking
boolean
—
Slow/frozen frames tracking. Disable in Expo Go
enableWatchdogTerminationTracking
boolean
true
OOM kill detection (iOS)
enableAppHangTracking
boolean
true
App hang detection (iOS, tvOS, macOS)
appHangTimeoutInterval
number
2
Seconds before classifying as app hang (iOS)
enableAutoPerformanceTracing
boolean
true
Auto performance instrumentation
enableNdkScopeSync
boolean
true
Java→NDK scope sync (Android)
attachThreads
boolean
false
Auto-attach all threads on crash (Android)
attachAllThreads
boolean
false
Attach full stack traces for all threads to every captured event (iOS only, requires Cocoa SDK ≥9.9.0)
autoInitializeNativeSdk
boolean
true
Set false for manual native init
onReady
function
—
Callback after native SDKs initialize
enableTurboModuleTracking
boolean
false
Experimental. Install native TurboModule perf logger for crash attribution and per-module spans. RN 0.75+ New Architecture only; no-op on Old Architecture (SDK ≥8.17.0)
Session & Release Health Options
Option
Type
Default
Purpose
autoSessionTracking
boolean
true
Session tracking (crash-free users/sessions)
sessionTrackingIntervalMillis
number
30000
ms of background before session ends
Replay Options
Option
Type
Default
Purpose
replaysSessionSampleRate
number
0
Fraction of all sessions recorded
replaysOnErrorSampleRate
number
0
Fraction of error sessions recorded
Logging Options (SDK ≥7.0.0)
Option
Type
Purpose
enableLogs
boolean
Enable Sentry.logger.* API
enableAutoConsoleLogs
boolean
Auto-capture console.* calls when enableLogs: true. Set false to use only manual Sentry.logger.* (SDK ≥8.14.0, default: true)
beforeSendLog
function
Filter/modify logs before sending
logsOrigin
'native' | 'js' | 'all'
Filter log source (SDK ≥7.7.0)
Hook Options
Option
Type
Purpose
beforeSend
(event, hint) => event | null
Modify/drop JS error events. ⚠️ Does NOT apply to native crashes
beforeSendTransaction
(event) => event | null
Modify/drop transaction events
beforeBreadcrumb
(breadcrumb, hint) => breadcrumb | null
Process breadcrumbs before storage
onNativeLog
(log: { level, component, message }) => void
Intercept native SDK log messages and forward to JS console. Only fires when debug: true
Show full SKILL.md (1,272 more words)Show less
Environment Variables
Variable
Purpose
Notes
SENTRY_DSN
Data Source Name
Falls back from dsn option
SENTRY_AUTH_TOKEN
Upload source maps and dSYMs
Never commit — use CI secrets
SENTRY_ORG
Organization slug
Used by wizard and build plugins
SENTRY_PROJECT
Project slug
Used by wizard and build plugins
SENTRY_RELEASE
Release identifier
Falls back from release option
SENTRY_DIST
Distribution identifier
Falls back from dist option
SENTRY_ENVIRONMENT
Environment name
Falls back from environment option
SENTRY_DISABLE_AUTO_UPLOAD
Skip source map upload
Set true during local builds
EXPO_PUBLIC_SENTRY_DSN
Expo public env var for DSN
Safe to embed in client bundle
SENTRY_EAS_BUILD_CAPTURE_SUCCESS
EAS build hook: capture successful builds
Set true in EAS secrets
SENTRY_EAS_BUILD_TAGS
EAS build hook: additional tags JSON
e.g., {"team":"mobile"}
Default Integrations (Auto-Enabled)
These integrations are enabled automatically — no config needed:
Integration
What it does
ReactNativeErrorHandlers
Catches unhandled JS exceptions and promise rejections
Release
Attaches release/dist to all events
Breadcrumbs
Records console logs, HTTP requests, user gestures as breadcrumbs
HttpClient
Adds HTTP request/response breadcrumbs
DeviceContext
Attaches device/OS/battery info to events
AppContext
Attaches app version, bundle ID, and memory info
CultureContext
Attaches locale and timezone
Screenshot
Captures screenshot on error (when attachScreenshot: true)
Links JS errors to their native crash counterparts
TurboModuleContext
Tracks TurboModule calls in crash-time context; attributes native crashes to the high-level RN module + method (e.g., RNSentry.captureEnvelope)
Opt-In Integrations
Integration
How to enable
mobileReplayIntegration()
Add to integrations array
reactNavigationIntegration()
Add to integrations array
reactNativeNavigationIntegration()
Add to integrations array (Wix only)
feedbackIntegration()
Add to integrations array (user feedback widget; supports enableShakeToReport for native shake detection)
deeplinkIntegration()
Add to integrations array (auto-captures deep link URLs as breadcrumbs; opt-in)
turboModuleContextIntegration()
Default — tracks RNSentry TurboModule automatically. Optionally configure with { modules: [...] } to track custom TurboModules
Tracking Custom TurboModules
The TurboModuleContext integration is enabled by default and automatically tracks the built-in RNSentry TurboModule. To track your own custom TurboModules, configure the integration explicitly:
typescript
import * as Sentry from "@sentry/react-native";
import { NativeModules } from "react-native";
Sentry.init({
dsn: "YOUR_DSN",
integrations: [
Sentry.turboModuleContextIntegration({
modules: [
{
name: "MyCustomModule",
module: NativeModules.MyCustomModule,
// Optional: skip specific methods to avoid tracking overhead
skipMethods: ["addListener", "removeListeners"],
},
],
}),
],
});
When a native crash occurs inside a tracked TurboModule method call, the crash report will include contexts.turbo_module with the module name and method, making it easier to identify the exact RN API call that triggered the crash.
Rage Tap Detection (TouchEventBoundary)
TouchEventBoundary (wraps your app root) includes built-in rage tap detection. When a user taps the same element 3+ times within 1 second, a ui.multiClick breadcrumb is emitted and shown on the replay timeline. Configure via props:
tsx
<Sentry.TouchEventBoundary
enableRageTapDetection={true} // default: true — set false to disable
rageTapThreshold={3} // taps required to trigger (default: 3)
rageTapTimeWindow={1000} // detection window in ms (default: 1000)
>
<App />
</Sentry.TouchEventBoundary>
Production Settings
Lower sample rates and harden config before shipping to production:
typescript
Sentry.init({
dsn: process.env.EXPO_PUBLIC_SENTRY_DSN,
environment: __DEV__ ? "development" : "production",
// Trace 10–20% of transactions in high-traffic production
tracesSampleRate: __DEV__ ? 1.0 : 0.1,
// Profile 100% of traced transactions (profiling is always a subset of tracing)
profilesSampleRate: 1.0,
// Replay all error sessions, sample 5% of normal sessions
replaysOnErrorSampleRate: 1.0,
replaysSessionSampleRate: __DEV__ ? 1.0 : 0.05,
// Set release and dist for accurate source map lookup
release: "my-app@" + Application.nativeApplicationVersion,
dist: String(Application.nativeBuildVersion),
// Disable debug logging in production
debug: __DEV__,
});
Source Maps & Debug Symbols
Source maps and debug symbols are what transform minified stack traces into readable ones. When set up correctly, Sentry shows you the exact line of your source code that threw. The generic auth-token and CI setup lives in sentry-source-maps; the React Native-specific upload mechanics are below.
How Uploads Work
Platform
What's uploaded
When
iOS (JS)
Source maps (.map files)
During Xcode build
iOS (Native)
dSYM bundles
During Xcode archive / Xcode Cloud
Android (JS)
Source maps + Hermes .hbc.map
During Gradle build
Android (Native)
Proguard mapping + NDK .so files
During Gradle build
Expo: Automatic Upload
The @sentry/react-native/expo config plugin automatically sets up upload hooks for native builds. Source maps are uploaded during eas build and expo run:ios/android (release).
Monitor your Expo Application Services (EAS) builds in Sentry. The SDK ships three binary hooks — sentry-eas-build-on-complete, sentry-eas-build-on-error, and sentry-eas-build-on-success — that capture build events as Sentry errors or messages.
Use eas-build-on-complete to capture both failures and (optionally) successes in one hook. Alternatively use eas-build-on-error or eas-build-on-success separately if you want independent control.
Step 2 — Set SENTRY_DSN in your EAS secrets
bash
eas secret:create --name SENTRY_DSN --value "https://...@sentry.io/..."
The hook reads SENTRY_DSN from the build environment — it does not share the same .env as your app.
Optional environment variables:
Variable
Purpose
SENTRY_EAS_BUILD_CAPTURE_SUCCESS
Set true to also capture successful builds (default: errors only)
SENTRY_EAS_BUILD_TAGS
JSON object of additional tags, e.g., {"team":"mobile","channel":"production"}
SENTRY_EAS_BUILD_ERROR_MESSAGE
Custom error message for failed builds
SENTRY_EAS_BUILD_SUCCESS_MESSAGE
Custom message for successful builds
How it works: The hook script is an EAS npm lifecycle hook. EAS calls package.json scripts matching eas-build-on-* at the end of the build process. The script loads env from @expo/env, .env, or .env.sentry-build-plugin — without overwriting EAS secrets already in the environment.
Verification
After setup, test that Sentry is receiving events:
typescript
// Quick test — throws and Sentry.wrap(App) catches it
<Button
title="Test Sentry Error"
onPress={() => {
throw new Error("My first Sentry error!");
}}
/>
// Or capture manually
<Button
title="Test Sentry Message"
onPress={() => {
Sentry.captureMessage("Sentry test message", "info");
}}
/>
Check the Sentry dashboard:
Issues → your test error should appear within seconds
Traces → look for a "main" transaction with child spans
Replays → session recording visible after app interaction (native build only — not Expo Go)
Logs → structured log entries if enableLogs: true
⚠️ Expo Go limitation: Native crashes, session replay, slow/frozen frames, TTID, and TTFD only work in native builds (eas build or expo run). Expo Go runs in a JS-only mode. Set enableNativeFramesTracking: !isRunningInExpoGo() to avoid warnings.
If nothing appears:
Set debug: true — SDK logs to Metro console
Verify DSN is correct and the Sentry project exists
Ensure Sentry.wrap(App) is applied to the root component
For native crashes, build a release build (crashes in debug mode may not forward)
Phase 4: Cross-Link
After completing React Native setup, check for a backend or web frontend missing Sentry coverage:
bash
# Adjacent backend directories
ls ../backend ../server ../api 2>/dev/null
cat ../go.mod 2>/dev/null | head -3
cat ../requirements.txt ../pyproject.toml 2>/dev/null | head -3
cat ../Gemfile 2>/dev/null | head -3
ls ../backend/package.json ../server/package.json 2>/dev/null
# Web frontend in same or sibling repo
ls ../web ../frontend ../dashboard 2>/dev/null
cat ../web/package.json ../frontend/package.json 2>/dev/null | grep -E '"react"|"svelte"|"next"'
# Check for OpenTelemetry (for distributed tracing interop)
grep -r "opentelemetry" ../backend/go.mod ../server/requirements.txt 2>/dev/null
If a backend or web frontend exists without Sentry, suggest the matching skill:
Sentry React Native SDK next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
Sentry React Native SDK compared with similar skills
Skill
Stars
Used in
Tokens
Auto-check
Licence
Repo updated
Sentry React Native SDK this skillgetsentry/sentry-for-ai
Install ONLY the react-native-bundle-discovery package and wire it into a React Native project so a bundle report is generated when the BUNDLEANALYZER env var is set.
A prioritized rule set for React Native and Expo apps covering list performance, animation, navigation, UI patterns, state, rendering, monorepos and configuration.
Use the Appllama MCP (mcp.appllama.io) well — research real top-grossing mobile apps, their screens, flows, and UI elements, then build from what you learn.
Run the pre-release end-to-end sweep of every user-facing surface — the 33 samples under samples/ (booted from their packaged artifacts and driven in a real browser via chrome-devtools MCP), the…
Full Sentry SDK setup for React Native and Expo. An agent skill from getsentry/sentry-for-ai. Sentry React Native SDK is an agent skill from getsentry/sentry-for-ai, published by the product's own GitHub organization. Full Sentry SDK setup for React Native and Expo.
When should I use Sentry React Native SDK?
Sentry React Native SDK fits situations like: asked to add Sentry to React Native; install @sentry/react-native; setup Sentry in Expo; configure error monitoring.
How do I install Sentry React Native SDK in Claude Code?
Run `npx skills add getsentry/sentry-for-ai --skill sentry-react-native-sdk -a claude-code`. Or copy the skill folder (skills-legacy/sentry-react-native-sdk in getsentry/sentry-for-ai) into .claude/skills/sentry-react-native-sdk in your project. Claude Code loads it when a task matches its description.
How do I install Sentry React Native SDK in Codex?
Run `npx skills add getsentry/sentry-for-ai --skill sentry-react-native-sdk -a codex`. Or copy the skill folder (skills-legacy/sentry-react-native-sdk in getsentry/sentry-for-ai) into .agents/skills/sentry-react-native-sdk in your project. Codex loads it when a task matches its description.
Can I use Sentry React Native SDK in Cursor, Gemini CLI or GitHub Copilot?
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add getsentry/sentry-for-ai --skill sentry-react-native-sdk -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/sentry-react-native-sdk, .gemini/skills/sentry-react-native-sdk, .github/skills/sentry-react-native-sdk and .opencode/skills/sentry-react-native-sdk in your project.
What does Sentry React Native SDK need to run?
Going by SKILL.md and its folder, Sentry React Native SDK needs the command-line tools its instructions call (npx, eas, expo, sh, python3 and npm) and credentials named SENTRY_AUTH_TOKEN. Our summary lists: Python 3; Node.js; A credential in SENTRY_AUTH_TOKEN.
Does Sentry React Native SDK access the network?
SKILL.md names 3 domains. In commands or code: sentry.io; the agent is likely to contact it when it follows the instructions. As links in the text: docs.sentry.io and docs.expo.dev. This is read from the text; nothing was executed.
Is Sentry React Native SDK safe to install?
Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.
What licence does Sentry React Native SDK use?
Sentry React Native SDK is published under the Apache-2.0 licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.
How many tokens does Sentry React Native SDK use?
About 10k tokens (SKILL.md is roughly 40k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 41k tokens, read only when the agent opens those files.
What are the alternatives to Sentry React Native SDK?
Skills that share tags, products or a category with Sentry React Native SDK: Setup React Native Bundle Discovery (retyui/react-native-bundle-discovery, 152 stars), React Native Best Practices (vercel-labs/openreview, 1.7k stars), Appllama App Design Skill (Appllama/appllama-skills, 2.4k stars) and Appllama Usage (Appllama/appllama-skills, 2.4k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
Who maintains Sentry React Native SDK?
getsentry (a GitHub organization, an official publisher) maintains it in getsentry/sentry-for-ai, which has 268 GitHub stars. The repository holds 32 skills in this directory. The repository was last updated on October 7, 2026.
Source: getsentry/sentry-for-ai on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.