17 lines
292 B
TypeScript
17 lines
292 B
TypeScript
import { env } from '@konobangu/env';
|
|
import { init } from '@sentry/nextjs';
|
|
|
|
const opts = {
|
|
dsn: env.NEXT_PUBLIC_SENTRY_DSN,
|
|
};
|
|
|
|
export const initializeSentry = () => {
|
|
if (env.NEXT_RUNTIME === 'nodejs') {
|
|
init(opts);
|
|
}
|
|
|
|
if (env.NEXT_RUNTIME === 'edge') {
|
|
init(opts);
|
|
}
|
|
};
|