Home

Awesome

<p align="center"> <a href="https://sentry.io/?utm_source=github&utm_medium=logo" target="_blank"> <picture> <source srcset="https://sentry-brand.storage.googleapis.com/sentry-logo-white.png" media="(prefers-color-scheme: dark)" /> <source srcset="https://sentry-brand.storage.googleapis.com/sentry-logo-black.png" media="(prefers-color-scheme: light), (prefers-color-scheme: no-preference)" /> <img src="https://sentry-brand.storage.googleapis.com/sentry-logo-black.png" alt="Sentry" width="280"> </picture> </a> </p>

Bad software is everywhere, and we're tired of it. Sentry is on a mission to help developers write better software faster, so we can get back to enjoying technology. If you want to join us <kbd>Check out our open positions</kbd>

Sentry SDK for React Native

Build & Test npm version npm dm npm dt Discord Chat Runs with Expo

Requirements

Features

Installation and Usage

To install the package and setup your project:

npx @sentry/wizard -s -i reactNative

How to use it:

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

Sentry.init({
  dsn: "__DSN__",

  // Set tracesSampleRate to 1.0 to capture 100%
  // of transactions for performance monitoring.
  // We recommend adjusting this value in production
  tracesSampleRate: 1.0,
});

Sentry.setTag("myTag", "tag-value");
Sentry.setExtra("myExtra", "extra-value");
Sentry.addBreadcrumb({ message: "test" });

Sentry.captureMessage("Hello Sentry!");

Upgrade

If you are coming from react-native-sentry which was our SDK < 1.0 you should follow the upgrade guide and then follow the install steps.

Blog posts

Introducing Mobile Screenshots and Suspect Commits.

Tips for Optimizing React Native Application Performance - Part 2: Using Sentry SDK for Performance Monitoring.

Tips for Optimizing React Native Application Performance: Part 1.

Tracking Stability in a Bluetooth Low Energy-Based React-Native App.

Mobile Vitals - Four Metrics Every Mobile Developer Should Care About.

Performance Monitoring Support for React Native.

Resources