From 073c715e3dea7140030989fc728739b42e68adae Mon Sep 17 00:00:00 2001 From: Shri Prakash Bajpai Date: Mon, 14 Oct 2024 18:06:14 +0530 Subject: [PATCH] NTP-7706 Sentry changes (#975) --- App.tsx | 7 +------ android/app/build.gradle | 4 ++-- package.json | 4 ++-- src/components/utlis/errorUtils.ts | 20 ++++++++++---------- 4 files changed, 15 insertions(+), 20 deletions(-) diff --git a/App.tsx b/App.tsx index 5f1ec834..93efc6e8 100644 --- a/App.tsx +++ b/App.tsx @@ -1,6 +1,5 @@ import AsyncStorage from '@react-native-async-storage/async-storage'; import { NavigationContainer } from '@react-navigation/native'; -import * as Sentry from '@sentry/react-native'; import React, { useEffect } from 'react'; import { AppState, @@ -38,7 +37,6 @@ import { CLICKSTREAM_EVENT_NAMES, LocalStorageKeys } from './src/common/Constant import ErrorBoundary from './src/common/ErrorBoundary'; import { getPermissionsToRequest } from './src/components/utlis/PermissionUtils'; import ScreenshotBlocker from './src/components/utlis/ScreenshotBlocker'; -import { initSentry } from './src/components/utlis/sentry'; import { setItem } from './src/components/utlis/storageHelper'; import { ENV } from './src/constants/config'; import usePolling from './src/hooks/usePolling'; @@ -51,7 +49,6 @@ import fetchUpdatedRemoteConfig from './src/services/firebaseFetchAndUpdate.serv import { StorageKeys } from './src/types/storageKeys'; import CodePushLoadingModal, { CodePushLoadingModalRef } from './CodePushModal'; -initSentry(); if (ENV !== 'prod') { // mockApiServer(); @@ -218,6 +215,4 @@ function App() { ); } -const AppWithSentry = Sentry.wrap(App); - -export default AppWithSentry; +export default App; diff --git a/android/app/build.gradle b/android/app/build.gradle index 275a8ca6..44a33a3f 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -134,8 +134,8 @@ def reactNativeArchitectures() { return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"] } -def VERSION_CODE = 201 -def VERSION_NAME = "2.14.1" +def VERSION_CODE = 202 +def VERSION_NAME = "2.14.2" android { ndkVersion rootProject.ext.ndkVersion diff --git a/package.json b/package.json index abaeedfb..2c669b83 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "AV_APP", - "version": "2.14.1", - "buildNumber": "201", + "version": "2.14.2", + "buildNumber": "202", "private": true, "scripts": { "android:dev": "yarn move:dev && react-native run-android", diff --git a/src/components/utlis/errorUtils.ts b/src/components/utlis/errorUtils.ts index 2a0d30e2..f64f42b2 100644 --- a/src/components/utlis/errorUtils.ts +++ b/src/components/utlis/errorUtils.ts @@ -6,17 +6,17 @@ export const logError = (error: Error, extraInfo = '') => { // Disable sentry in development mode return; } - Sentry.setTag('agentId', GLOBAL.AGENT_ID || 'not-logged-in'); - Sentry.captureException(error, (scope) => { - scope.setExtra('ExtraInfo', extraInfo); - return scope; - }); + // Sentry.setTag('agentId', GLOBAL.AGENT_ID || 'not-logged-in'); + // Sentry.captureException(error, (scope) => { + // scope.setExtra('ExtraInfo', extraInfo); + // return scope; + // }); }; export const sentryCaptureMessage = (errorStr: string, extraInfo = '') => { - Sentry.setTag('agentId', GLOBAL.AGENT_ID || 'not-logged-in'); - Sentry.captureMessage(errorStr, (scope) => { - scope.setExtra('ExtraInfo', extraInfo); - return scope; - }); + // Sentry.setTag('agentId', GLOBAL.AGENT_ID || 'not-logged-in'); + // Sentry.captureMessage(errorStr, (scope) => { + // scope.setExtra('ExtraInfo', extraInfo); + // return scope; + // }); };