Skip to content
This repository has been archived by the owner on Jan 23, 2018. It is now read-only.

io-digital/react-native-sentry-android

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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
  })
}

About

Report crashes from JavaScript with Sentry for Android

Resources

License

Stars

Watchers

Forks

Packages

No packages published