Skip to content

Commit

Permalink
chore: [IOPLT-753] Update Sentry SDK to latest version (#6429)
Browse files Browse the repository at this point in the history
## Short description
This PR bumps sentry sdk to the latest version.

## List of changes proposed in this pull request
- Bumps Sentry major

## How to test
Nothing expected to change for tracking and crash analytics

---------

Co-authored-by: LazyAfternoons <[email protected]>
Co-authored-by: Alessandro <[email protected]>
Co-authored-by: Andrea <[email protected]>
  • Loading branch information
4 people authored Dec 9, 2024
1 parent 26d92d0 commit d26118f
Show file tree
Hide file tree
Showing 6 changed files with 146 additions and 190 deletions.
10 changes: 5 additions & 5 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -630,19 +630,19 @@ PODS:
- RCT-Folly (= 2021.07.22.00)
- React-Core
- React-RCTImage
- RNSentry (5.32.0):
- RNSentry (6.4.0):
- hermes-engine
- RCT-Folly (= 2021.07.22.00)
- React-Core
- React-hermes
- Sentry/HybridSDK (= 8.36.0)
- Sentry/HybridSDK (= 8.41.0)
- RNShare (10.2.1):
- React-Core
- RNStoreReview (0.4.3):
- React-Core
- RNSVG (15.1.0):
- React-Core
- Sentry/HybridSDK (8.36.0)
- Sentry/HybridSDK (8.41.0)
- SocketRocket (0.6.1)
- SwiftCBOR (0.4.7)
- VisionCamera (4.3.1):
Expand Down Expand Up @@ -1130,11 +1130,11 @@ SPEC CHECKSUMS:
RNReactNativeHapticFeedback: 6d24decfa94e037c2ecc312407d2a057b7933f10
RNReanimated: c2027c397233801d4aceb7375e000ac87ec2e67d
RNScreens: 2fc874a2605e88dedf43204a79fad1d2da4abfbe
RNSentry: 3e667c2c6ea5d35ea292c7f262c6b44e43842cc1
RNSentry: 22de4208fe67593ee2fccca1c7bb23d1a247add3
RNShare: 0fad69ae2d71de9d1f7b9a43acf876886a6cb99c
RNStoreReview: 31dbfd0dac2eea9675f0b84f1dd3261c2110c337
RNSVG: 50cf2c7018e57cf5d3522d98d0a3a4dd6bf9d093
Sentry: f8374b5415bc38dfb5645941b3ae31230fbeae57
Sentry: 54d0fe6c0df448497c8ed4cce66ccf7027e1823e
SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17
SwiftCBOR: 465775bed0e8bac7bfb8160bcf7b95d7f75971e4
VisionCamera: 58d2120e6e23c155b25f4702b7912dc2b1e5e8c2
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
"@react-navigation/native-stack": "^6.11.0",
"@react-navigation/stack": "6.3.20",
"@redux-saga/testing-utils": "^1.1.3",
"@sentry/react-native": "^5.32.0",
"@sentry/react-native": "^6.4.0",
"@shopify/flash-list": "~1.7.0",
"@shopify/react-native-skia": "^1.5.10",
"@textlint/markdown-to-ast": "^14.0.4",
Expand Down
17 changes: 10 additions & 7 deletions ts/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,17 @@ import { sentryDsn } from "./config";
import { isDevEnv } from "./utils/environment";
import { StatusMessages } from "./components/StatusMessages";

export const routingInstrumentation = Sentry.reactNavigationIntegration({
export type ReactNavigationInstrumentation = ReturnType<
typeof Sentry.reactNavigationIntegration
>;

export const navigationIntegration = Sentry.reactNavigationIntegration({
enableTimeToInitialDisplay: true
});

const removeUserFromEvent = (event: ErrorEvent | TransactionEvent) => {
const removeUserFromEvent = <T extends ErrorEvent | TransactionEvent>(
event: T
): T => {
// console.log(JSON.stringify(event));
// Modify or drop the event here
if (event.user) {
Expand All @@ -42,10 +48,7 @@ Sentry.init({
beforeSendTransaction(event) {
return removeUserFromEvent(event);
},
integrations: integrations => [
...integrations,
Sentry.reactNativeTracingIntegration({ routingInstrumentation })
],
integrations: integrations => [...integrations, navigationIntegration],
enabled: !isDevEnv,
// https://sentry.zendesk.com/hc/en-us/articles/23337524872987-Why-is-the-the-message-in-my-error-being-truncated
maxValueLength: 3000,
Expand Down Expand Up @@ -73,7 +76,7 @@ const App = (): JSX.Element => (
<LightModalProvider>
<StatusMessages>
<RootContainer
routingInstumentation={routingInstrumentation}
routingInstumentation={navigationIntegration}
/>
</StatusMessages>
</LightModalProvider>
Expand Down
2 changes: 1 addition & 1 deletion ts/RootContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import {
Platform,
StatusBar
} from "react-native";
import { ReactNavigationInstrumentation } from "@sentry/react-native";
import SplashScreen from "react-native-splash-screen";
import { connect } from "react-redux";
import configurePushNotifications from "./features/pushNotifications/utils/configurePushNotification";
Expand All @@ -29,6 +28,7 @@ import {
} from "./store/reducers/persistedPreferences";
import { GlobalState } from "./store/reducers/types";
import customVariables from "./theme/variables";
import { ReactNavigationInstrumentation } from "./App";

type Props = ReturnType<typeof mapStateToProps> &
typeof mapDispatchToProps & {
Expand Down
2 changes: 1 addition & 1 deletion ts/navigation/AppStackNavigator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import {
} from "@react-navigation/native";
import React, { useRef } from "react";
import { View } from "react-native";
import { ReactNavigationInstrumentation } from "@sentry/react-native";
import { useStoredExperimentalDesign } from "../common/context/DSExperimentalContext";
import LoadingSpinnerOverlay from "../components/LoadingSpinnerOverlay";
import { cgnLinkingOptions } from "../features/bonus/cgn/navigation/navigator";
Expand All @@ -32,6 +31,7 @@ import {
} from "../utils/navigation";
import { SERVICES_ROUTES } from "../features/services/common/navigation/routes";
import { useItwLinkingOptions } from "../features/itwallet/navigation/useItwLinkingOptions";
import { ReactNavigationInstrumentation } from "../App";
import AuthenticatedStackNavigator from "./AuthenticatedStackNavigator";
import NavigationService, {
navigationRef,
Expand Down
Loading

0 comments on commit d26118f

Please sign in to comment.