-
Choose an APM provider:
| Provider | Strengths | Pricing | Best for |
|---|
| Sentry Performance | Error grouping, breadcrumbs, source maps, release health | Free tier available | Most mobile apps |
| Datadog RUM | Full-stack observability, session replay, log correlation | Per session | Enterprise, full-stack teams |
| Instabug | Bug reporting, surveys, in-app feedback, session replay | Per app | User-facing feedback + monitoring |
-
Set up Sentry (recommended for Expo):
npx expo install @sentry/react-native
Use mobile_setupMonitoring to generate the monitoring module, then wrap your app:
import * as Sentry from "@sentry/react-native";
import { monitoring } from "../lib/monitoring";
export default Sentry.wrap(function RootLayout() {
return <Stack />;
});
Add the Sentry Expo plugin to app.config:
export default {
plugins: [
[
"@sentry/react-native/expo",
{
organization: "your-org",
project: "your-project",
},
],
],
};
-
Set up Sentry for Flutter:
dependencies:
sentry_flutter: ^7.0.0
Future<void> main() async {
await SentryFlutter.init(
(options) {
options.dsn = const String.fromEnvironment('SENTRY_DSN');
options.tracesSampleRate = 0.2;
},
appRunner: () => runApp(const MyApp()),
);
}
-
Add performance tracing. Measure what matters:
import * as Sentry from "@sentry/react-native";
async function loadDashboard() {
const span = Sentry.startInactiveSpan({
name: "dashboard.load",
op: "ui.load",
});
try {
const data = await fetchDashboardData();
renderDashboard(data);
span?.setStatus({ code: 1, message: "ok" });
} catch (error) {
span?.setStatus({ code: 2, message: "error" });
Sentry.captureException(error);
} finally {
span?.end();
}
}
-
Track app launch performance:
import * as Sentry from "@sentry/react-native";
const appStartSpan = Sentry.startInactiveSpan({
name: "app.start",
op: "app.start.cold",
});
export default function App() {
useEffect(() => {
appStartSpan?.end();
}, []);
return <RootNavigator />;
}
-
Set up alerting. Configure alerts for critical thresholds:
- Crash-free session rate < 99.5% - immediate alert
- Error rate > 1% - warning alert
- API p95 latency > 3s - warning alert
- New error type in release - notification
Configure in Sentry Dashboard > Alerts > Create Alert Rule.
-
Release health tracking. Tag every error with the release version:
Sentry.init({
dsn: "...",
release: `com.example.app@${appVersion}`,
dist: buildNumber,
});
This enables:
- Per-release error rate comparison
- Regression detection (new errors in latest release)
- Adoption tracking (how many users are on each version)
-
Session replay (Datadog/Instabug). Record user sessions for debugging:
import { DdRum } from "@datadog/mobile-react-native";
DdRum.addAttribute("view.name", "PaymentScreen");
Session replay captures user interactions, network requests, and errors in context. Useful for reproducing bugs reported by users.