TP-61032 | Add Sentry environment in init (#10275)

This commit is contained in:
Kshitij Pramod Ghongadi
2024-04-01 19:43:10 +05:30
committed by GitHub
parent 36c65dd1d2
commit cd911a30d7
2 changed files with 9 additions and 3 deletions

View File

@@ -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
}
}
}
}

View File

@@ -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",
};