sentry-react-native-sdk
Audited by Runlayer on Mar 1, 2026
Tool passed security scan
Malicious tool definition detected
```typescript // index.js / app entry point import { AppRegistry } from "react-native"; import * as Sentry from "@sentry/react-native"; import App from "./src/App"; import { name as appName } from "./app.json"; Sentry.init({ dsn: "https://examplePublicKey@o0.ingest.sentry.io/0", }); AppRegistry.registerComponent(appName, () => Sentry.wrap(App)); ``` **What `Sentry.wrap` does:** | Capability | Description | |------------|-------------| | **React render error boundary** | Catches errors thrown dur
```typescript Sentry.setTag("page_locale", "de-at"); Sentry.setTag("app_version", "3.2.1"); Sentry.setTag("user_plan", "enterprise"); ``` **Tag constraints:** | Property | Constraint | |----------|-----------| | Key max length | 32 characters | | Key allowed characters | `a-zA-Z`, `0-9`, `_`, `.`, `:`, `-` | | Value max length | 200 characters | | Value forbidden | Newline ` ` characters | ### User Identity ```typescript // Set on login Sentry.setUser({ id: "42", email: "john.doe@example.com", u
Malicious tool definition detected
--- ## 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 # Chec
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 fronte
Tool passed security scan
Malicious tool definition detected
Configure the Sentry Gradle/Xcode plugin + source maps to preserve component names in production profiler data.
Tool passed security scan
Malicious tool definition detected
Configure the Sentry Xcode build phase to upload dSYMs automatically. - **Bitcode:** If your project uses bitcode (older setups), ensure dSYMs are downloaded from App Store Connect and uploaded to Sentry — these are the re-compiled symbols, not the ones from your local build. - **Cold start profiling:** To capture profiling during app cold start (before the first transaction begins), use UI Profiling with `startOnAppStart: true`. --- ## 9.
Tool passed security scan
Malicious tool definition detected
Low-memory devices may truncate it | | iOS 26: masked content visible through UI | Known Liquid Glass bug — disable Session Replay on iOS 26+ until [sentry-cocoa #6390](https://github.com/getsentry/sentry-cocoa/issues/6390) is resolved | | Error replay count differs from issue count | Expected — rate limiting, manual deletions, or network failures can cause discrepancies | | `beforeErrorSampling` not being called | Confirm `replaysOnErrorSampleRate` > 0; the callback only fires when error sampli
Malicious tool definition detected
"development" : "production", }); ``` ### Scoped attributes — single operation or code block ```typescript Sentry.withScope(async (scope) => { scope.setAttribute("order_id", "ord_789"); scope.setAttribute("payment_method", "stripe"); Sentry.logger.info("Validating cart", { cartId: cart.id }); // order_id and payment_method included in this log await processPayment(); Sentry.logger.info("Payment complete"); // order_id and payment_method included here too }); ``` --- ## Console Logging Integratio
- **Missing logs on crash:** If the app terminates before the SDK flushes its buffer, the most recent logs may not reach Sentry.
Tool passed security scan