# React Native crash reporting and monitoring

Crashes, errors, slow screens and sessions from your React Native app, sampled by the business flow each screen belongs to.

Sentry's React Native SDK does the capturing: native crashes, JavaScript errors, sessions and screen transactions. `@flowhawk/react-native` points it at Flowhawk and samples each screen at its flow's rate, set in Flowhawk without an app release.

## What you get

- Crashes and JavaScript errors in [Issues](https://flowhawk.dev/docs/signals#issues), with native crashes symbolicated from the debug files you upload.
- App starts, slow and frozen frames per screen, and each session's screens, taps, requests and crashes on [Sessions](https://flowhawk.dev/docs/signals#sessions).
- Requests from the app linked to the backend traces they started.
- Screens tied to your [business flows](https://flowhawk.dev/docs/flows), so "checkout" means the same in the app and on the server.

## Set it up

### 1. Install

```
npm install @sentry/react-native @flowhawk/react-native     # @sentry/react-native 6 or later
```

### 2. Start it when the app loads

Create a **Web pages** key in **Settings > API keys**. It ships inside the app, so it can only send data.

```
import * as Sentry from "@sentry/react-native";
import { Flowhawk } from "@flowhawk/react-native";

Flowhawk.init(Sentry, {
  apiUrl: "https://api.flowhawk.dev",
  key: "<web pages key>",
  project: "1",
  service: "shop-app",
  release: "shop-app@1.6.0",
  sentry: { integrations: [Sentry.reactNavigationIntegration()] },
});
```

Screens that a flow's step names are sampled at that flow's rate with no code. Elsewhere, `Flowhawk.setFlow("checkout", "pay")` tags what follows until `Flowhawk.clearFlow()`.

### 3. Upload debug files for native crashes

Sentry's `sentry-cli` uploads them, pointed at Flowhawk with `SENTRY_URL=https://api.flowhawk.dev` and a **CI uploads** key as `SENTRY_AUTH_TOKEN`. **Settings > Debug files** lists what arrived.

## Check it arrived

Open the app and move through a few screens, then open **Sessions** in the app. If nothing shows, [Help and troubleshooting](https://flowhawk.dev/docs/help) says why data can be refused and how to see it.

## Common questions

### What about Flutter, iOS and Android?

Use Sentry's SDK for the platform with a Web pages key in its DSN: `https://<key>@api.flowhawk.dev/1`. Crashes, app starts, frozen frames, sessions and replays arrive the same way ([Sentry SDKs](https://flowhawk.dev/integrations/sentry-sdk)).

### Do I need a Sentry account?

No. Sentry's SDK is open source and sends to Flowhawk only.

## Related

[**JavaScript error monitoring and session replay**See the errors, slow pages and sessions of your web app's real users, each linked to the backend trace it caused.](https://flowhawk.dev/integrations/javascript-error-monitoring) [**Use your Sentry SDK with Flowhawk**Keep the Sentry SDK you already run and point its DSN at Flowhawk. Errors, transactions, replays and profiles arrive without a code change.](https://flowhawk.dev/integrations/sentry-sdk) [**LLM observability**See what your app's model calls cost, how slow they are and which business flow they serve, from the OpenTelemetry data you may already send.](https://flowhawk.dev/integrations/llm-observability)

[Try it free for 14 days](https://app.flowhawk.dev/signup?trial=1) [Read the getting started guide](https://flowhawk.dev/docs/getting-started)

---

URL: https://flowhawk.dev/integrations/react-native-monitoring
