Skip to content

Commit 6b08b9a

Browse files
chore(sample-rn): Remove duplicate init options from code (#4532)
1 parent b947d7f commit 6b08b9a

File tree

4 files changed

+4
-42
lines changed

4 files changed

+4
-42
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,10 @@ - (BOOL)concurrentRootEnabled
7373
return nullptr;
7474
}
7575

76-
- (BOOL) shouldStartSentry {
77-
NSArray<NSString*>* arguments = [[NSProcessInfo processInfo] arguments];
78-
return ![arguments containsObject:@"--sentry-disable-native-start"];
76+
- (BOOL)shouldStartSentry
77+
{
78+
NSArray<NSString *> *arguments = [[NSProcessInfo processInfo] arguments];
79+
return ![arguments containsObject:@"--sentry-disable-native-start"];
7980
}
8081

8182
@end

samples/react-native/sentry.options.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
"attachScreenshot": true,
1212
"attachViewHierarchy": true,
1313
"enableCaptureFailedRequests": true,
14-
"_release": "[email protected]+1",
15-
"_dist": 1,
1614
"profilesSampleRate": 1.0,
1715
"replaysSessionSampleRate": 1.0,
1816
"replaysOnErrorSampleRate": 1.0,

samples/react-native/src/App.tsx

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import Animated, {
1717
// Import the Sentry React Native SDK
1818
import * as Sentry from '@sentry/react-native';
1919

20-
import { SENTRY_INTERNAL_DSN } from './dsn';
2120
import ErrorsScreen from './Screens/ErrorsScreen';
2221
import PerformanceScreen from './Screens/PerformanceScreen';
2322
import TrackerScreen from './Screens/TrackerScreen';
@@ -55,10 +54,6 @@ const reactNavigationIntegration = Sentry.reactNavigationIntegration({
5554
});
5655

5756
Sentry.init({
58-
// Replace the example DSN below with your own DSN:
59-
dsn: SENTRY_INTERNAL_DSN,
60-
debug: true,
61-
environment: 'dev',
6257
beforeSend: (event: ErrorEvent) => {
6358
logWithoutTracing('Event beforeSend:', event.event_id);
6459
return event;
@@ -74,7 +69,6 @@ Sentry.init({
7469
didCallNativeInit,
7570
);
7671
},
77-
enableUserInteractionTracing: true,
7872
integrations(integrations) {
7973
integrations.push(
8074
reactNavigationIntegration,
@@ -110,30 +104,7 @@ Sentry.init({
110104
);
111105
return integrations.filter(i => i.name !== 'Dedupe');
112106
},
113-
enableAutoSessionTracking: true,
114-
// For testing, session close when 5 seconds (instead of the default 30) in the background.
115-
sessionTrackingIntervalMillis: 30000,
116-
// This will capture ALL TRACES and likely use up all your quota
117-
enableTracing: true,
118-
tracesSampleRate: 1.0,
119107
tracePropagationTargets: ['localhost', /^\//, /^https:\/\//, /^http:\/\//],
120-
attachStacktrace: true,
121-
// Attach screenshots to events.
122-
attachScreenshot: true,
123-
// Attach view hierarchy to events.
124-
attachViewHierarchy: true,
125-
// Enables capture failed requests in JS and native.
126-
enableCaptureFailedRequests: true,
127-
// Sets the `release` and `dist` on Sentry events. Make sure this matches EXACTLY with the values on your sourcemaps
128-
// otherwise they will not work.
129-
// release: '[email protected]+1',
130-
// dist: `1`,
131-
profilesSampleRate: 1.0,
132-
replaysSessionSampleRate: 1.0,
133-
replaysOnErrorSampleRate: 1.0,
134-
spotlight: true,
135-
// This should be disabled when manually initializing the native SDK
136-
// Note that options from JS are not passed to the native SDKs when initialized manually
137108
// autoInitializeNativeSdk: true,
138109
});
139110

samples/react-native/src/dsn.ts

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)