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.
admin-panel/src/libs/sentry/initSentry.ts

21 lines
539 B
TypeScript

import * as Sentry from '@sentry/react';
import { Integrations } from '@sentry/tracing';
const initSentry = () => {
if (process.env.REACT_APP_SENTRY_ENABLED !== 'true') {
return;
}
Sentry.init({
dsn: process.env.REACT_APP_SENTRY_DSN,
integrations: [new Integrations.BrowserTracing()],
tracesSampleRate: 0.3,
release:
'zdam-egzamin-zawodowy-admin-panel@' +
(process.env.REACT_APP_VERSION ?? 'development'),
environment: process.env.NODE_ENV ?? 'development',
});
};
export default initSentry;