TP-61032 | Add Sentry environment in init (#10275)
This commit is contained in:
committed by
GitHub
parent
36c65dd1d2
commit
cd911a30d7
7
App.tsx
7
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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
5
App/common/constants/SentryConstants.ts
Normal file
5
App/common/constants/SentryConstants.ts
Normal 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",
|
||||
};
|
||||
Reference in New Issue
Block a user