Skip to content

Commit 96d7706

Browse files
committed
improvement(newArch): Time To Initial Display / Time To Full Display implemented via Fabric components
1 parent 57bb0e2 commit 96d7706

5 files changed

Lines changed: 9 additions & 6 deletions

File tree

samples/react-native/android/app/src/main/java/io/sentry/reactnative/sample/MainApplication.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class MainApplication :
5454
SentryAndroid.init(this) { options ->
5555
// Only options set here will apply to the Android SDK
5656
// Options from JS are not passed to the Android SDK when initialized manually
57-
options.dsn = "https://1df17bd4e543fdb31351dee1768bb679@o447951.ingest.sentry.io/5428561"
57+
options.dsn = "https://b61d95875971558bec7d1730e24dfe85@o4509786567475200.ingest.de.sentry.io/4509830878724176"
5858
options.isDebug = true
5959

6060
options.beforeSend =

samples/react-native/ios/sentryreactnativesample/AppDelegate.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ - (void)initializeSentry
2828
[SentrySDK startWithConfigureOptions:^(SentryOptions *options) {
2929
// Only options set here will apply to the iOS SDK
3030
// Options from JS are not passed to the iOS SDK when initialized manually
31-
options.dsn = @"https://1df17bd4e543fdb31351dee1768bb679@o447951.ingest.sentry.io/5428561";
31+
options.dsn = @"https://b61d95875971558bec7d1730e24dfe85@o4509786567475200.ingest.de.sentry.io/4509830878724176";
3232
options.debug = YES; // Enabled debug when first installing is always helpful
3333

3434
options.beforeSend = ^SentryEvent *(SentryEvent *event)

samples/react-native/src/App.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ const isMobileOs = Platform.OS === 'android' || Platform.OS === 'ios';
5252

5353
const reactNavigationIntegration = Sentry.reactNavigationIntegration({
5454
routeChangeTimeoutMs: 500, // How long it will wait for the route change to complete. Default is 1000ms
55-
enableTimeToInitialDisplay: isMobileOs,
55+
//enableTimeToInitialDisplay: isMobileOs,
5656
ignoreEmptyBackNavigationTransactions: false,
57-
enableTimeToInitialDisplayForPreloadedRoutes: true,
57+
//enableTimeToInitialDisplayForPreloadedRoutes: true,
5858
useDispatchedActionData: true,
5959
});
6060

samples/react-native/src/Screens/WebviewScreen.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
import * as React from 'react';
2+
import * as Sentry from '@sentry/react-native';
23
import { StyleSheet, View } from 'react-native';
34
import { Text } from 'react-native-gesture-handler';
4-
// import { WebView } from 'react-native-webview';
5+
import { isTurboModuleEnabled } from '@sentry/react-native/dist/js/utils/environment';
56

67
const WebviewScreen = () => {
8+
console.log('ALWX IS TURBO MODULES ENABLED: ' + isTurboModuleEnabled());
79
return (
810
// <WebView
911
// source={{ uri: 'https://sentry.io' }}
1012
// style={styles.webview}
1113
// />
1214
<View style={styles.webview}>
15+
<Sentry.TimeToInitialDisplay record={true} />
1316
<Text>
1417
WebView is disabled due to incompatibilities with the React Native
1518
version 0.79.2

samples/react-native/src/dsn.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as Sentry from '@sentry/react-native';
22

33
export const SENTRY_INTERNAL_DSN =
4-
'https://1df17bd4e543fdb31351dee1768bb679@o447951.ingest.sentry.io/5428561';
4+
'https://b61d95875971558bec7d1730e24dfe85@o4509786567475200.ingest.de.sentry.io/4509830878724176';
55

66
export const getCurrentDsn = () => {
77
return Sentry.getCurrentHub().getClient()?.getOptions().dsn;

0 commit comments

Comments
 (0)