Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Reduce Sentry DSN noise

Manav Rathi9289bbd0d022
diff --git a/apps/auth/sentry.client.config.ts b/apps/auth/sentry.client.config.ts
index 058162a5ad..cb64d06b7f 100644
--- a/apps/auth/sentry.client.config.ts
+++ b/apps/auth/sentry.client.config.ts
@@ -1,6 +1,3 @@
import { setupSentry } from '@ente/shared/sentry/config/sentry.config.base';
-const DEFAULT_SENTRY_DSN =
- 'https://[email protected]/13';
-
-setupSentry(DEFAULT_SENTRY_DSN);
+setupSentry('https://[email protected]/13');
diff --git a/apps/photos/sentry.client.config.ts b/apps/photos/sentry.client.config.ts
index 2dc983f533..cfbb354ef4 100644
--- a/apps/photos/sentry.client.config.ts
+++ b/apps/photos/sentry.client.config.ts
@@ -1,5 +1,3 @@
import { setupSentry } from '@ente/shared/sentry/config/sentry.config.base';
-const DEFAULT_SENTRY_DSN =
- 'https://[email protected]/2';
-setupSentry(DEFAULT_SENTRY_DSN);
+setupSentry('https://[email protected]/2');
diff --git a/packages/shared/apps/env.ts b/packages/shared/apps/env.ts
index 8a8bc29430..578415328f 100644
--- a/packages/shared/apps/env.ts
+++ b/packages/shared/apps/env.ts
@@ -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;
diff --git a/packages/shared/sentry/config/sentry.config.base.ts b/packages/shared/sentry/config/sentry.config.base.ts
index de8200d79e..2885c60f98 100644
--- a/packages/shared/sentry/config/sentry.config.base.ts
+++ b/packages/shared/sentry/config/sentry.config.base.ts
@@ -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,