/** * Sample React Native App * https://github.com/facebook/react-native * @flow */ import React, { Component } from 'react'; import { AppRegistry, StyleSheet, Text, View, Button } from 'react-native'; import { Sentry, SentrySeverity, SentryLog } from 'react-native-sentry'; Sentry.config("Your DSN").install(); Sentry.setExtraContext({ "a_thing": 3, "some_things": {"green": "red"}, "foobar": ["a", "b", "c"], "react": true, "float": 2.43 }); Sentry.setTagsContext({ "environment": "production", "react": true }); Sentry.setUserContext({ email: "john@apple.com", userID: "12341", username: "username", extra: { "is_admin": false } }); export default class ReactNativeExample extends Component { _sendMessage() { Sentry.captureMessage("TEST message", { level: SentrySeverity.Warning }); } _throwError() { throw new Error('Sentry: Test throw error'); } _nativeCrash() { Sentry.nativeCrash(); } render() { return ( Welcome to React Native Sentry example