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

18 lines
412 B
TypeScript

import * as Sentry from '@sentry/react';
import { Integrations } from '@sentry/tracing';
const initSentry = () => {
if (process.env.REACT_APP_ENABLE_SENTRY !== 'true') {
return;
}
Sentry.init({
dsn: process.env.REACT_APP_SENTRY_DSN,
integrations: [new Integrations.BrowserTracing()],
tracesSampleRate: 0.3,
release: process.env.REACT_APP_VERSION,
});
};
export default initSentry;