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-06 08:18:57 +00:00
|
|
|
import * as Sentry from '@sentry/react';
|
|
|
|
import { Integrations } from '@sentry/tracing';
|
|
|
|
|
|
|
|
const initSentry = () => {
|
2021-11-07 07:50:49 +00:00
|
|
|
if (process.env.REACT_APP_SENTRY_ENABLED !== 'true') {
|
2021-11-06 08:18:57 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
Sentry.init({
|
|
|
|
dsn: process.env.REACT_APP_SENTRY_DSN,
|
|
|
|
integrations: [new Integrations.BrowserTracing()],
|
|
|
|
tracesSampleRate: 0.3,
|
2021-11-10 07:07:46 +00:00
|
|
|
release:
|
|
|
|
'zdam-egzamin-zawodowy-admin-panel@' +
|
|
|
|
(process.env.REACT_APP_VERSION ?? 'development'),
|
2021-11-06 09:37:10 +00:00
|
|
|
environment: process.env.NODE_ENV ?? 'development',
|
2021-11-06 08:18:57 +00:00
|
|
|
});
|
|
|
|
};
|
|
|
|
|
|
|
|
export default initSentry;
|