From cd911a30d78a50412bb14aa632af063fd5757515 Mon Sep 17 00:00:00 2001 From: Kshitij Pramod Ghongadi Date: Mon, 1 Apr 2024 19:43:10 +0530 Subject: [PATCH] TP-61032 | Add Sentry environment in init (#10275) --- App.tsx | 7 ++++--- App/common/constants/SentryConstants.ts | 5 +++++ 2 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 App/common/constants/SentryConstants.ts diff --git a/App.tsx b/App.tsx index 39100fd6eb..e435f2424e 100644 --- a/App.tsx +++ b/App.tsx @@ -1,6 +1,7 @@ import * as Sentry from "@sentry/react-native"; import { Component } from "react"; import codePush from "react-native-code-push"; +import { SentryConstants } from "./App/common/constants/SentryConstants"; import { logToSentry } from "./App/common/hooks/useSentryLogging"; import { CtaData } from "./App/common/interface"; import RnApp from "./App/common/navigator/RnAppCreator"; @@ -10,7 +11,8 @@ import { } from "./App/common/utilities/CacheUtils"; Sentry.init({ - dsn: "https://3c1639ff154fcdcfe417c485e80db17f@o4506931811254272.ingest.us.sentry.io/4506931817676800", + dsn: SentryConstants.SENTRY_DSN, + environment: SentryConstants.SENTRY_ENVIRONMENT_PRODUCTION, }); export default class App extends Component<{}> { @@ -59,5 +61,4 @@ export default class App extends Component<{}> { // return error screen } } -} - +} \ No newline at end of file diff --git a/App/common/constants/SentryConstants.ts b/App/common/constants/SentryConstants.ts new file mode 100644 index 0000000000..e0316cbf9a --- /dev/null +++ b/App/common/constants/SentryConstants.ts @@ -0,0 +1,5 @@ +export const SentryConstants = { + SENTRY_DSN: "https://3c1639ff154fcdcfe417c485e80db17f@o4506931811254272.ingest.us.sentry.io/4506931817676800", + SENTRY_ENVIRONMENT_PRODUCTION: "production", + SENTRY_ENVIRONMENT_DEVELOPMENT: "development", +}; \ No newline at end of file