fix: sentry logging

This commit is contained in:
Reinaldy Rafli 2021-07-15 17:36:13 +07:00
parent d61bce3b98
commit f7c49c37f6
2 changed files with 3 additions and 1 deletions

View File

@ -1,4 +1,5 @@
export default { export default {
API_ENDPOINT: import.meta.env.VITE_API_ENDPOINT, API_ENDPOINT: import.meta.env.VITE_API_ENDPOINT,
SENTRY_DSN: import.meta.env.VITE_SENTRY_DSN, SENTRY_DSN: import.meta.env.VITE_SENTRY_DSN,
NODE_ENV: import.meta.env.VITE_NODE_ENV,
}; };

View File

@ -2,7 +2,8 @@ import * as Sentry from '@sentry/browser';
import env from './env'; import env from './env';
Sentry.init({ Sentry.init({
dsn: String(env.SENTRY_DSN), dsn: String(env.SENTRY_DSN) || '',
enabled: String(env.NODE_ENV) === 'production',
tracesSampleRate: 0.5, tracesSampleRate: 0.5,
}); });