This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
2021-11-07 10:11:51 +00:00
|
|
|
import * as Sentry from '@sentry/react-native';
|
|
|
|
import Config from 'react-native-config';
|
|
|
|
|
|
|
|
export const routingInstrumentation = new Sentry.ReactNavigationInstrumentation();
|
|
|
|
|
|
|
|
const initSentry = () => {
|
|
|
|
if (!Config.SENTRY_DSN) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
Sentry.init({
|
|
|
|
dsn: Config.SENTRY_DSN,
|
|
|
|
environment: __DEV__ ? 'development' : 'production',
|
|
|
|
integrations: [
|
|
|
|
new Sentry.ReactNativeTracing({
|
|
|
|
tracingOrigins: [Config.RAW_API_URL],
|
|
|
|
routingInstrumentation,
|
|
|
|
}),
|
|
|
|
],
|
2021-11-07 10:22:09 +00:00
|
|
|
tracesSampleRate: 0.3,
|
2021-11-10 07:22:33 +00:00
|
|
|
release: __DEV__
|
|
|
|
? 'com.dawidwysokinski.zdamegzaminzawodowy@development'
|
|
|
|
: undefined,
|
2021-11-07 10:11:51 +00:00
|
|
|
});
|
|
|
|
};
|
|
|
|
|
|
|
|
export default initSentry;
|