React Native crash reporting and monitoring
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, 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.
- Requests from the app linked to the backend traces they started.
- Screens tied to your business 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 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).
Do I need a Sentry account?
No. Sentry's SDK is open source and sends to Flowhawk only.