2021-06-07 10:45:46 +00:00
|
|
|
import * as Sentry from '@sentry/nextjs';
|
2022-01-07 11:58:05 +00:00
|
|
|
import {
|
|
|
|
getSentryDSN,
|
|
|
|
getSentryENV,
|
|
|
|
getSentryRelease,
|
2022-01-09 08:21:47 +00:00
|
|
|
getIsSentryEnabled,
|
2022-01-07 12:22:37 +00:00
|
|
|
} from 'constants/sentry';
|
2021-06-07 10:45:46 +00:00
|
|
|
|
2023-01-14 16:11:35 +00:00
|
|
|
import { getSentryUserID } from 'utils/user';
|
|
|
|
|
2022-01-07 11:58:05 +00:00
|
|
|
const SENTRY_DSN = getSentryDSN();
|
|
|
|
const SENTRY_ENV = getSentryENV();
|
|
|
|
const SENTRY_RELEASE = getSentryRelease();
|
2022-01-09 08:21:47 +00:00
|
|
|
const IS_ENABLED = getIsSentryEnabled();
|
2021-06-07 10:45:46 +00:00
|
|
|
|
|
|
|
Sentry.init({
|
|
|
|
dsn: SENTRY_DSN,
|
2022-01-09 08:21:47 +00:00
|
|
|
enabled: IS_ENABLED,
|
2021-06-15 04:46:10 +00:00
|
|
|
environment: SENTRY_ENV,
|
2022-01-07 11:58:05 +00:00
|
|
|
release: SENTRY_RELEASE,
|
2021-06-15 05:57:10 +00:00
|
|
|
autoSessionTracking: false,
|
2021-06-07 10:45:46 +00:00
|
|
|
});
|
2023-01-14 16:11:35 +00:00
|
|
|
|
|
|
|
const main = async () => {
|
|
|
|
Sentry.setUser({ id: await getSentryUserID() });
|
|
|
|
};
|
|
|
|
|
|
|
|
main();
|