Claude Market
Menu
SkillsMCPPluginsSubmit MCPSkillPluginMCPMCP, plugin, or skillAdvertise
Claude Market
SkillsMCPPluginsSubmit MCPSkillPluginMCPMCP, plugin, or skillAdvertise

Featured

Deploy OpenClaw in 60 seconds — 20% off logoDeploy OpenClaw in 60 seconds — 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger →
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger →
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free →
Your own AI agent, running 24/7 with QwikClaw logoYour own AI agent, running 24/7 with QwikClaw

QwikClaw sets up and runs an always-on OpenClaw agent for you. One click, no config files, no server setup.

Deploy now →
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free →
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it — secured from day one.

Get it set up for you →
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free →
Reach 47,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here →
Deploy OpenClaw in 60 seconds — 20% off logoDeploy OpenClaw in 60 seconds — 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger →
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger →
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free →
Your own AI agent, running 24/7 with QwikClaw logoYour own AI agent, running 24/7 with QwikClaw

QwikClaw sets up and runs an always-on OpenClaw agent for you. One click, no config files, no server setup.

Deploy now →
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free →
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it — secured from day one.

Get it set up for you →
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free →
Reach 47,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here →
Deploy OpenClaw in 60 seconds — 20% off logoDeploy OpenClaw in 60 seconds — 20% off
Launch on Hostinger →
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed
Launch on Hostinger →
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off
Try Firecrawl free →
Your own AI agent, running 24/7 with QwikClaw logoYour own AI agent, running 24/7 with QwikClaw
Deploy now →
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.
Start building free →
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams
Get it set up for you →
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit
Try DataForSEO free →
Reach 47,000+ AI builders
Advertise here →
Skills/getsentry/sentry-for-ai/sentry-react-native-sdk
sentry-react-native-sdk logo

sentry-react-native-sdk

getsentry/sentry-for-ai
3K installs207 stars
Run it on Hostinger →up to 70% off + an extra 10% with code ZACAARON10Free API →

Installation

npx skills add https://github.com/getsentry/sentry-for-ai --skill sentry-react-native-sdk

Summary

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.

SKILL.md

All Skills > SDK Setup > React Native SDK

Sentry React Native SDK

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:

# 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:

QuestionImpact
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):

  • ✅ Error Monitoring — captures JS exceptions, native crashes (iOS + Android), ANRs, and app hangs
  • ✅ 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:

FeatureRecommend when...
Error MonitoringAlways — non-negotiable baseline for any mobile app
TracingAlways for mobile — app start, navigation, and network latency matter
Session ReplayUser-facing production app; debug user-reported issues visually
ProfilingPerformance-sensitive screens, startup time concerns, or production perf investigations
LoggingApp uses structured logging, or you want log-to-trace correlation in Sentry
User FeedbackBeta 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?"

---

Phase 3: Guide

Determine Your Setup Path

Project typeRecommended setupComplexity
Expo managed (SDK 50+)Wizard CLI or manual with config pluginLow — wizard does everything
Expo bare (SDK 50+)Wizard CLI recommendedMedium — handles iOS/Android config
Vanilla React Native (0.69+)Wizard CLI recommendedMedium — handles Xcode + Gradle
Expo SDK <50Use sentry-expo (legacy)See legacy docs

---

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.

---

Path B: Manual — Expo Managed (SDK 50+)

Step 1 — Install

npx expo install @sentry/react-native

Step 2 — metro.config.js

const { getSentryExpoConfig } = require("@sentry/react-native/metro");
const config = getSentryExpoConfig(__dirname);
module.exports = config;

If metro.config.js doesn't exist yet:

npx expo customize metro.config.js
# Then replace contents with the above

Step 3 — app.json — Add Expo config plugin

{
  "expo": {
    "plugins": [
      [
        "@sentry/react-native/expo",
        {
          "url": "https://sentry.io/",
          "project": "YOUR_PROJECT_SLUG",
          "organization": "YOUR_ORG_SLUG",
          "disableAutoUpload": false
        }
      ]
    ]
  }
}

Note: Set SENTRY_AUTH_TOKEN as an environment variable for native builds — never commit it to version control.

Plugin options:

OptionTypeDefaultPurpose
urlstring"https://sentry.io/"Sentry instance URL
projectstring—Project slug
organizationstring—Organization slug
disableAutoUploadbooleanfalseSkip source map + dSYM upload during local builds (SDK ≥8.13.0)

Step 4 — Initialize Sentry

For Expo Router (app/_layout.tsx):

import { Stack } from "expo-router";
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,

  // Tracing
  tracesSampleRate: 1.0, // lower to 0.1–0.2 in production

  // Profiling
  profilesSampleRate: 1.0,

  // Session Replay
  replaysOnErrorSampleRate: 1.0,
  replaysSessionSampleRate: 0.1,

  // Logging (SDK ≥7.0.0)
  enableLogs: true,

  // Session Replay
  integrations: [
    Sentry.mobileReplayIntegration(),
  ],

  enableNativeFramesTracking: !isRunningInExpoGo(), // slow/frozen frames

  environment: __DEV__ ? "development" : "production",
});

function RootLayout() {
  return <Stack />;
}

export default Sentry.wrap(RootLayout);

Note: Expo Router automatically handles navigation tracking. The Sentry.NavigationContainer wrapper is not needed for Expo Router projects — navigation spans are captured automatically.

For standard Expo (App.tsx):

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

npm install @sentry/react-native --save
cd ios && pod install

Step 2 — metro.config.js

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,
});

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:

# RN 0.81.1+
set -e
WITH_ENVIRONMENT="../node_modules/react-native/scripts/xcode/with-environment.sh"
SENTRY_XCODE="../node_modules/@sentry/react-native/scripts/sentry-xcode.sh"
/bin/sh -c "$WITH_ENVIRONMENT $SENTRY_XCODE"

Step 4 — iOS: Add "Upload Debug Symbols to Sentry" build phase

Add a new Run Script build phase in Xcode (after the bundle phase):

/bin/sh ../node_modules/@sentry/react-native/scripts/sentry-xcode-debug-files.sh

Step 5 — iOS: ios/sentry.properties

defaults.url=https://sentry.io/
defaults.org=YOUR_ORG_SLUG
defaults.project=YOUR_PROJECT_SLUG
auth.token=YOUR_ORG_AUTH_TOKEN

Step 6 — Android: android/app/build.gradle

Add before the android {} block:

apply from: "../../node_modules/@sentry/react-native/sentry.gradle.kts"

Note: SDK ≥8.13.0 uses sentry.gradle.kts (Kotlin DSL). For older SDKs, use sentry.gradle (Groovy). Both are backward-compatible.

Step 7 — Android: android/sentry.properties

defaults.url=https://sentry.io/
defaults.org=YOUR_ORG_SLUG
defaults.project=YOUR_PROJECT_SLUG
auth.token=YOUR_ORG_AUTH_TOKEN

Step 8 — Initialize Sentry (App.tsx or entry point)

import * as Sentry from "@sentry/react-native";

Sentry.init({
  dsn: "YOUR_SENTRY_DSN",
  sendDefaultPii: true,
  tracesSampleRate: 1.0,
  profilesSampleRate: 1.0,
  replaysOnErrorSampleRate: 1.0,
  replaysSessionSampleRate: 0.1,
  enableLogs: true,
  integrations: [
    Sentry.mobileReplayIntegration(),
  ],
  enableNativeFramesTracking: true,
  environment: __DEV__ ? "development" : "production",
});

function App() {
  return (
    <Sentry.NavigationContainer>
      {/* your navigation here */}
    </Sentry.NavigationContainer>
  );
}

export default Sentry.wrap(App);

---

Quick Reference: Full-Featured Sentry.init()

This is the recommended starting configuration with all features enabled:

import * as Sentry from "@sentry/react-native";

Sentry.init({
  dsn: "YOUR_SENTRY_DSN",
  sendDefaultPii: true,

  // Tracing — lower to 0.1–0.2 in high-traffic production
  tracesSampleRate: 1.0,

  // Profiling — runs on a subset of traced transactions
  profilesSampleRate: 1.0,

  // Session Replay — always capture on error, sample 10% of all sessions
  replaysOnErrorSampleRate: 1.0,
  replaysSessionSampleRate: 0.1,

  // Logging — enable Sentry.logger.* API
  enableLogs: true,

  // Integrations — mobile replay is opt-in
  integrations: [
    Sentry.mobileReplayIntegration({
      maskAllText: true,   // masks text by default for privacy
      maskAllImages: true,
    }),
  ],

  // Native frames tracking (disable in Expo Go)
  enableNativeFramesTracking: true,

  // Environment
  environment: __DEV__ ? "development" : "production",

  // Release — set from CI or build system
  // release: "my-app@1.0.0+1",
  // dist: "1",
});

// REQUIRED: Wrap root component to capture React render errors
export default Sentry.wrap(App);

App Start Accuracy — Sentry.appLoaded() (SDK ≥8.x)

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.

// 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:

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)

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

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:

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:

FeatureReferenceLoad when...
Error Monitoring${SKILL_ROOT}/references/error-monitoring.mdAlways (baseline)
Tracing & Performance${SKILL_ROOT}/references/tracing.mdAlways for mobile (app start, navigation, network)
Profiling${SKILL_ROOT}/references/profiling.mdPerformance-sensitive production apps
Session Replay${SKILL_ROOT}/references/session-replay.mdUser-facing apps
Logging${SKILL_ROOT}/references/logging.mdStructured logging / log-to-trace correlation
User Feedback${SKILL_ROOT}/references/user-feedback.mdCollecting user-submitted reports

For each feature: Read ${SKILL_ROOT}/references/<feature>.md, follow steps exactly, verify it works.

---

Configuration Reference

Core Sentry.init() Options

OptionTypeDefaultPurpose
dsnstring—Required. Project DSN; SDK disabled if empty. Env: SENTRY_DSN
environmentstring—e.g., "production", "staging". Env: SENTRY_ENVIRONMENT
releasestring—App version, e.g., "my-app@1.0.0+42". Env: SENTRY_RELEASE
diststring—Build number / variant identifier (max 64 chars). Env: SENTRY_DIST
sendDefaultPiibooleanfalseInclude PII: IP address, cookies, user data
sampleRatenumber1.0Error event sampling (0.0–1.0)
maxBreadcrumbsnumber100Max breadcrumbs per event
attachStacktracebooleantrueAuto-attach stack traces to messages
attachScreenshotbooleanfalseCapture screenshot on error (SDK ≥4.11.0)
screenshotobject—Fine-grained screenshot masking; only effective when attachScreenshot: true. See Screenshot Masking Options below
attachViewHierarchybooleanfalseAttach JSON view hierarchy as attachment
debugbooleanfalseVerbose SDK output. Never use in production
enabledbooleantrueDisable SDK entirely (e.g., for testing)
ignoreErrors`string[] \RegExp[]`—Drop errors matching these patterns
ignoreTransactions`string[] \RegExp[]`—Drop transactions matching these patterns
maxCacheItemsnumber30Max offline-cached envelopes
defaultIntegrationsbooleantrueSet false to disable all default integrations
integrations`array \function`—Add or filter integrations
Screenshot Masking Options

Passed as the screenshot key inside Sentry.init() when attachScreenshot: true:

Sentry.init({
  attachScreenshot: true,
  screenshot: {
    maskAllText: true,       // default: true — mask all text nodes
    maskAllImages: true,     // default: true — mask all images
    maskedViewClasses: ['com.mapbox.maps.MapView'],    // always mask these native view classes
    unmaskedViewClasses: ['com.example.SafeView'],     // always show these native view classes
  },
});
Sub-optionTypeDefaultPurpose
maskAllTextbooleantrueMask all text nodes in the screenshot
maskAllImagesbooleantrueMask all images in the screenshot
maskedViewClassesstring[][]Native view class names to always mask (Android/iOS)
unmaskedViewClassesstring[][]Native view class names to always show (Android/iOS)

Tracing Options

OptionTypeDefaultPurpose
tracesSampleRatenumber0Transaction sample rate (0–1). Use 1.0 in dev
tracesSamplerfunction—Per-transaction sampling; overrides tracesSampleRate
tracePropagationTargets`(string \RegExp)[]`[/.*/]Which API URLs receive distributed tracing headers
profilesSampleRatenumber0Profiling sample rate (applied to traced transactions)

Native / Mobile Options

OptionTypeDefaultPurpose
enableNativebooleantrueSet false for JS-only (no native SDK)
enableNativeCrashHandlingbooleantrueCapture native hard crashes (iOS/Android)
enableNativeFramesTrackingboolean—Slow/frozen frames tracking. Disable in Expo Go
enableWatchdogTerminationTrackingbooleantrueOOM kill detection (iOS)
enableAppHangTrackingbooleantrueApp hang detection (iOS, tvOS, macOS)
appHangTimeoutIntervalnumber2Seconds before classifying as app hang (iOS)
enableAutoPerformanceTracingbooleantrueAuto performance instrumentation
enableNdkScopeSyncbooleantrueJava→NDK scope sync (Android)
attachThreadsbooleanfalseAuto-attach all threads on crash (Android)
attachAllThreadsbooleanfalseAttach full stack traces for all threads to every captured event (iOS only, requires Cocoa SDK ≥9.9.0)
autoInitializeNativeSdkbooleantrueSet false for manual native init
onReadyfunction—Callback after native SDKs initialize

Session & Release Health Options

OptionTypeDefaultPurpose
autoSessionTrackingbooleantrueSession tracking (crash-free users/sessions)
sessionTrackingIntervalMillisnumber30000ms of background before session ends

Replay Options

OptionTypeDefaultPurpose
replaysSessionSampleRatenumber0Fraction of all sessions recorded
replaysOnErrorSampleRatenumber0Fraction of error sessions recorded

Logging Options (SDK ≥7.0.0)

OptionTypePurpose
enableLogsbooleanEnable Sentry.logger.* API
beforeSendLogfunctionFilter/modify logs before sending
logsOrigin`'native' \'js' \'all'`Filter log source (SDK ≥7.7.0)

Hook Options

OptionTypePurpose
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 }) => voidIntercept native SDK log messages and forward to JS console. Only fires when debug: true

---

Environment Variables

VariablePurposeNotes
SENTRY_DSNData Source NameFalls back from dsn option
SENTRY_AUTH_TOKENUpload source maps and dSYMsNever commit — use CI secrets
SENTRY_ORGOrganization slugUsed by wizard and build plugins
SENTRY_PROJECTProject slugUsed by wizard and build plugins
SENTRY_RELEASERelease identifierFalls back from release option
SENTRY_DISTDistribution identifierFalls back from dist option
SENTRY_ENVIRONMENTEnvironment nameFalls back from environment option
SENTRY_DISABLE_AUTO_UPLOADSkip source map uploadSet true during local builds
EXPO_PUBLIC_SENTRY_DSNExpo public env var for DSNSafe to embed in client bundle
SENTRY_EAS_BUILD_CAPTURE_SUCCESSEAS build hook: capture successful buildsSet true in EAS secrets
SENTRY_EAS_BUILD_TAGSEAS build hook: additional tags JSONe.g., {"team":"mobile"}

---

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.

How Uploads Work

PlatformWhat's uploadedWhen
iOS (JS)Source maps (.map files)During Xcode build
iOS (Native)dSYM bundlesDuring Xcode archive / Xcode Cloud
Android (JS)Source maps + Hermes .hbc.mapDuring Gradle build
Android (Native)Proguard mapping + NDK .so filesDuring 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).

SENTRY_AUTH_TOKEN=sntrys_... npx expo run:ios --configuration Release

Manual Upload (bare RN)

If you need to manually upload source maps:

npx sentry-cli sourcemaps upload \
  --org YOUR_ORG \
  --project YOUR_PROJECT \
  --release "my-app@1.0.0+1" \
  ./dist

---

Default Integrations (Auto-Enabled)

These integrations are enabled automatically — no config needed:

IntegrationWhat it does
ReactNativeErrorHandlersCatches unhandled JS exceptions and promise rejections
ReleaseAttaches release/dist to all events
BreadcrumbsRecords console logs, HTTP requests, user gestures as breadcrumbs
HttpClientAdds HTTP request/response breadcrumbs
DeviceContextAttaches device/OS/battery info to events
AppContextAttaches app version, bundle ID, and memory info
CultureContextAttaches locale and timezone
ScreenshotCaptures screenshot on error (when attachScreenshot: true)
ViewHierarchyAttaches view hierarchy (when attachViewHierarchy: true)
NativeLinkedErrorsLinks JS errors to their native crash counterparts

Opt-In Integrations

IntegrationHow 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)

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:

<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>

---

Expo Config Plugin Reference

Configure the plugin in app.json or app.config.js:

{
  "expo": {
    "plugins": [
      [
        "@sentry/react-native/expo",
        {
          "url": "https://sentry.io/",
          "project": "my-project",
          "organization": "my-org",
          "note": "Set SENTRY_AUTH_TOKEN env var for native builds"
        }
      ]
    ]
  }
}

Or in app.config.js (allows env var interpolation):

export default {
  expo: {
    plugins: [
      [
        "@sentry/react-native/expo",
        {
          url: "https://sentry.io/",
          project: process.env.SENTRY_PROJECT,
          organization: process.env.SENTRY_ORG,
          disableAutoUpload: process.env.NODE_ENV === "development",
        },
      ],
    ],
  },
};

Tip: Set disableAutoUpload: true during local development to speed up builds by skipping source map and dSYM uploads. The option is available in SDK ≥8.13.0.

---

EAS Build Hooks

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.

Step 1 — Register the hook in package.json

{
  "scripts": {
    "eas-build-on-complete": "sentry-eas-build-on-complete"
  }
}

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

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:

VariablePurpose
SENTRY_EAS_BUILD_CAPTURE_SUCCESSSet true to also capture successful builds (default: errors only)
SENTRY_EAS_BUILD_TAGSJSON object of additional tags, e.g., {"team":"mobile","channel":"production"}
SENTRY_EAS_BUILD_ERROR_MESSAGECustom error message for failed builds
SENTRY_EAS_BUILD_SUCCESS_MESSAGECustom 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.

---

Production Settings

Lower sample rates and harden config before shipping to production:

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__,
});

---

Verification

After setup, test that Sentry is receiving events:

// 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:

  1. Set debug: true — SDK logs to Metro console
  2. Verify DSN is correct and the Sentry project exists
  3. Ensure Sentry.wrap(App) is applied to the root component
  4. 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:

# 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:

DetectedSuggest skill
Go backend (go.mod)sentry-go-sdk
Python backend (requirements.txt, pyproject.toml)sentry-python-sdk
Ruby backend (Gemfile)sentry-ruby-sdk
Node.js backend (Express, Fastify, etc.)@sentry/node — see docs.sentry.io/platforms/javascript/guides/express/
React / Next.js websentry-react-sdk
Svelte / SvelteKit websentry-svelte-sdk

Distributed tracing setup — if the backend skill is added, configure tracePropagationTargets in React Native to propagate trace context to your API:

Sentry.init({
  tracePropagationTargets: [
    "localhost",
    /^https:\/\/api\.yourapp\.com/,
  ],
  // ...
});

This links mobile transactions to backend traces in the Sentry waterfall view.

---

Troubleshooting

IssueSolution
Events not appearing in SentrySet debug: true, check Metro/Xcode console for SDK errors; verify DSN is correct
pod install failsRun cd ios && pod install --repo-update; check CocoaPods version
iOS build fails with Sentry scriptVerify the "Bundle React Native code and images" script was replaced (not appended to)
Android build fails after adding sentry.gradle.ktsEnsure apply from line is before the android {} block in build.gradle; use sentry.gradle for SDK <8.13.0
Android Gradle 8+ compatibility issueUse sentry-android-gradle-plugin ≥4.0.0; check sentry.gradle version in your SDK
Source maps not uploadingVerify sentry.properties has a valid auth.token; check build logs for sentry-cli output
Source maps not resolving in SentryConfirm release and dist in Sentry.init() match the uploaded bundle metadata
Hermes source maps not workingHermes emits .hbc.map — the Gradle plugin handles this automatically; verify sentry.gradle is applied
Session replay not recordingMust use a native build (not Expo Go); confirm mobileReplayIntegration() is in integrations
Replay shows blank/black screensCheck that maskAllText/maskAllImages settings match your privacy requirements
Slow/frozen frames not trackedSet enableNativeFramesTracking: true and confirm you're on a native build (not Expo Go)
TTID / TTFD not appearingRequires enableTimeToInitialDisplay: true in reactNavigationIntegration() on a native build
App crashes on startup after adding SentryLikely a native initialization error — check Xcode/Logcat logs; try enableNative: false to isolate
Expo SDK 49 or olderUse sentry-expo (legacy package); @sentry/react-native requires Expo SDK 50+
isRunningInExpoGo import errorImport from expo package: import { isRunningInExpoGo } from "expo"
Node not found during Xcode buildAdd export NODE_BINARY=$(which node) to the Xcode build phase, or symlink: ln -s $(which node) /usr/local/bin/node
Expo Go warning about native featuresUse isRunningInExpoGo() guard: enableNativeFramesTracking: !isRunningInExpoGo()
beforeSend not firing for native crashesExpected — beforeSend only intercepts JS-layer errors; native crashes bypass it
Android 15+ (16KB page size) crashUpgrade to @sentry/react-native ≥6.3.0
Too many transactions in dashboardLower tracesSampleRate to 0.1 or use tracesSampler to drop health checks
SENTRY_AUTH_TOKEN exposed in app bundleSENTRY_AUTH_TOKEN is for build-time upload only — never pass it to Sentry.init()
EAS Build: Sentry auth token missingSet SENTRY_AUTH_TOKEN as an EAS secret: eas secret:create --name SENTRY_AUTH_TOKEN

Score

0–100
69/ 100

Grade

C

Popularity21/30

2,767 installs — solid traction.

Completeness27/30

Documented: full SKILL.md body, description, one-line install. Missing: category/license metadata.

Trust15/25

Community skill with a public GitHub source repository you can review.

Freshness6/15

No update timestamp is tracked for this skill in our catalog.

Scored automatically from popularity, completeness, trust, and freshness — computed only from data in our catalog, never fabricated.

Proud of your score? Add this badge to your README.

Paste a snippet into your GitHub README. The badge updates automatically and links back to this page.

Sentry React Native Sdk skill score badge previewScore badge

Markdown

[![Sentry React Native Sdk skill](https://www.claudemarket.ai/skills/getsentry/sentry-for-ai/sentry-react-native-sdk/badges/score.svg)](https://www.claudemarket.ai/skills/getsentry/sentry-for-ai/sentry-react-native-sdk)

HTML

<a href="https://www.claudemarket.ai/skills/getsentry/sentry-for-ai/sentry-react-native-sdk"><img src="https://www.claudemarket.ai/skills/getsentry/sentry-for-ai/sentry-react-native-sdk/badges/score.svg" alt="Sentry React Native Sdk skill"/></a>

Sentry React Native Sdk FAQ

How do I install the Sentry React Native Sdk skill?

Run “npx skills add https://github.com/getsentry/sentry-for-ai --skill sentry-react-native-sdk” in your terminal. The skill is added to your agent's skills directory and picked up automatically on the next run — no restart or extra configuration needed.

What does the Sentry React Native Sdk skill do?

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. The full SKILL.md on this page shows the exact instructions the skill gives your agent.

Is the Sentry React Native Sdk skill free?

Yes. Sentry React Native Sdk is a free, open-source skill published from getsentry/sentry-for-ai. As with any third-party skill, review the source repository before installing it into an agent with sensitive access.

Does Sentry React Native Sdk work with Claude Code and OpenClaw?

Yes. Skills use the portable SKILL.md format, so Sentry React Native Sdk works with Claude Code, OpenClaw, Codex, Hermes, and any other agent that reads SKILL.md skills.

Featured

Deploy OpenClaw in 60 seconds — 20% off logoDeploy OpenClaw in 60 seconds — 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger →
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger →
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free →
Your own AI agent, running 24/7 with QwikClaw logoYour own AI agent, running 24/7 with QwikClaw

QwikClaw sets up and runs an always-on OpenClaw agent for you. One click, no config files, no server setup.

Deploy now →
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free →
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it — secured from day one.

Get it set up for you →
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free →
Reach 47,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here →
Deploy OpenClaw in 60 seconds — 20% off logoDeploy OpenClaw in 60 seconds — 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger →
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger →
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free →
Your own AI agent, running 24/7 with QwikClaw logoYour own AI agent, running 24/7 with QwikClaw

QwikClaw sets up and runs an always-on OpenClaw agent for you. One click, no config files, no server setup.

Deploy now →
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free →
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it — secured from day one.

Get it set up for you →
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free →
Reach 47,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here →
Deploy OpenClaw in 60 seconds — 20% off logoDeploy OpenClaw in 60 seconds — 20% off
Launch on Hostinger →
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed
Launch on Hostinger →
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off
Try Firecrawl free →
Your own AI agent, running 24/7 with QwikClaw logoYour own AI agent, running 24/7 with QwikClaw
Deploy now →
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.
Start building free →
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams
Get it set up for you →
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit
Try DataForSEO free →
Reach 47,000+ AI builders
Advertise here →
View on GitHub

Recommended skills

Browse all →
vercel-react-best-practices logo

vercel-react-best-practices

vercel-labs/agent-skills

599K installsInstall
vercel-react-native-skills logo

vercel-react-native-skills

vercel-labs/agent-skills

179K installsInstall
sentry-cli logo

sentry-cli

sentry/dev

120K installsInstall
vercel-react-view-transitions logo

vercel-react-view-transitions

vercel-labs/agent-skills

90K installsInstall
find-skills logo

find-skills

vercel-labs/skills

2.8M installsInstall
frontend-design logo

frontend-design

anthropics/skills

732K installsInstall

Related guides

Hand-picked reading to help you choose, install, and use agent skills.

Guide10 Openclaw Skills Every Nextjs Developer NeedsGuideBest Openclaw Skills 2026GuideHow To Evaluate Openclaw Skill Before Installing

Skills by category

FrontendBackend & APIsTesting & QASecurityDevOps & CI/CDMCP & ToolingAutomationData & Analysis+20 more

MCP servers by category

AI & MLDeveloper ToolsVector & MemoryFiles & DocsDatabasesFinance & PaymentsBrowser & ScrapingCommunication+8 more

Marketplaces by category

developmentproductivitycommunicationdesignsecuritydatabaseworkflowcompliance+34 more

Claude Market

AI agent skills directory, marketplace, and workflow hub for OpenClaw, Hermes Agent, Claude Code, Codex, and MCP-powered operator stacks.

Independent project, not affiliated with Anthropic.

Resources

  • Browse Skills
  • Browse MCP Servers
  • Browse Plugins

More

  • Submit a Tool
  • Advertise
  • Free Tools
  • API
  • Shipping
  • Contact
  • Terms
  • Privacy

Know a company that should advertise here? Refer them and earn 10% — up to $300 per referral.

© 2026 Claude Market
Fazier badgeFeatured on Twelve ToolsFeatured on Wired BusinessRemote OpenClaw - Featured on AI Agents DirectoryListed on Turbo0Featured on Uneed