Reduce Sentry DSN noise
We don't need to customize this, so reduce all the indirection and dance around it.
This commit is contained in:
parent
e5f8b5faa8
commit
9289bbd0d0
4 changed files with 5 additions and 17 deletions
|
@ -1,6 +1,3 @@
|
|||
import { setupSentry } from '@ente/shared/sentry/config/sentry.config.base';
|
||||
|
||||
const DEFAULT_SENTRY_DSN =
|
||||
'https://e2ccc39d811640b49602323774220955@sentry.ente.io/13';
|
||||
|
||||
setupSentry(DEFAULT_SENTRY_DSN);
|
||||
setupSentry('https://e2ccc39d811640b49602323774220955@sentry.ente.io/13');
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import { setupSentry } from '@ente/shared/sentry/config/sentry.config.base';
|
||||
|
||||
const DEFAULT_SENTRY_DSN =
|
||||
'https://bd3656fc40d74d5e8f278132817963a3@sentry.ente.io/2';
|
||||
setupSentry(DEFAULT_SENTRY_DSN);
|
||||
setupSentry('https://bd3656fc40d74d5e8f278132817963a3@sentry.ente.io/2');
|
||||
|
|
|
@ -7,6 +7,4 @@ export const isDisableSentryFlagSet = () => {
|
|||
return process.env.NEXT_PUBLIC_DISABLE_SENTRY === 'true';
|
||||
};
|
||||
|
||||
export const getSentryDSN = () => process.env.NEXT_PUBLIC_SENTRY_DSN;
|
||||
|
||||
export const getSentryRelease = () => process.env.SENTRY_RELEASE;
|
||||
|
|
|
@ -4,24 +4,19 @@ import { getSentryUserID } from '@ente/shared/sentry/utils';
|
|||
import { runningInBrowser } from '@ente/shared/platform';
|
||||
import { getHasOptedOutOfCrashReports } from '@ente/shared/storage/localStorage/helpers';
|
||||
import { getIsSentryEnabled } from '@ente/shared/sentry/utils';
|
||||
import {
|
||||
getAppEnv,
|
||||
getSentryDSN,
|
||||
getSentryRelease,
|
||||
} from '@ente/shared/apps/env';
|
||||
import { getAppEnv, getSentryRelease } from '@ente/shared/apps/env';
|
||||
|
||||
export const setupSentry = async (DEFAULT_SENTRY_DSN: string) => {
|
||||
export const setupSentry = async (dsn: string) => {
|
||||
const HAS_OPTED_OUT_OF_CRASH_REPORTING =
|
||||
runningInBrowser() && getHasOptedOutOfCrashReports();
|
||||
|
||||
if (!HAS_OPTED_OUT_OF_CRASH_REPORTING) {
|
||||
const SENTRY_DSN = getSentryDSN() ?? DEFAULT_SENTRY_DSN;
|
||||
const APP_ENV = getAppEnv();
|
||||
const IS_ENABLED = getIsSentryEnabled();
|
||||
const SENTRY_RELEASE = getSentryRelease();
|
||||
|
||||
Sentry.init({
|
||||
dsn: SENTRY_DSN,
|
||||
dsn,
|
||||
enabled: IS_ENABLED,
|
||||
environment: APP_ENV,
|
||||
release: SENTRY_RELEASE,
|
||||
|
|
Loading…
Add table
Reference in a new issue