react-native-sentry-android

0.1.6 • Public • Published

react-native-sentry-android

Installation

Download and link with npm install --save react-native-sentry-android && rnpm link, and add your Sentry DSN to your AndroidManifest.xml with:

<meta-data android:name="com.getsentry.raven.android.DSN"
           android:value="https://publicKey:secretKey@host:port/1?options" />

Usage

import sentry from 'react-native-sentry-android'
 
// ...
 
try {
  somethingThatMightThrow()
} catch (e) {
  sentry.capture({
    message: e.toString(),
    level: 'fatal',
    stack: e.stack,
    class: 'MyComponent',
  }).then(function() {
    // apologise to the user for the failure
  })
}

Dependents (0)

Package Sidebar

Install

npm i react-native-sentry-android

Weekly Downloads

22

Version

0.1.6

License

BSD-3-Clause

Last publish

Collaborators

  • antino