react-native-sentry-android
v0.1.6
Published
Report crashes from JavaScript with Sentry for Android
Downloads
51
Maintainers
Readme
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
})
}