ente/sentryConfigUtil.js

12 lines
305 B
JavaScript
Raw Normal View History

2022-09-23 10:52:47 +00:00
const ENV_DEVELOPMENT = 'development';
module.exports.getIsSentryEnabled = () => {
2022-09-23 11:45:44 +00:00
if (process.env.NEXT_PUBLIC_SENTRY_ENV === ENV_DEVELOPMENT) {
return false;
2022-10-18 04:04:26 +00:00
} else if (process.env.NEXT_PUBLIC_DISABLE_SENTRY === 'true') {
2022-09-23 11:45:44 +00:00
return false;
2022-01-07 12:47:24 +00:00
} else {
2022-09-23 11:45:44 +00:00
return true;
2022-01-07 12:47:24 +00:00
}
};