Skip to content

Commit e600300

Browse files
committed
Remove metric from the RN app
1 parent e21831e commit e600300

2 files changed

Lines changed: 0 additions & 23 deletions

File tree

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

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import { UserFeedbackModal } from '../components/UserFeedbackModal';
1919
import { FallbackRender } from '@sentry/react';
2020
import NativeSampleModule from '../../tm/NativeSampleModule';
2121
import NativePlatformSampleModule from '../../tm/NativePlatformSampleModule';
22-
import { timestampInSeconds } from '@sentry/utils';
2322

2423
const { AssetsModule, CppModule, CrashModule } = NativeModules;
2524

@@ -28,25 +27,6 @@ interface Props {
2827
}
2928

3029
const ErrorsScreen = (_props: Props) => {
31-
const [componentMountStartTimestamp] = React.useState<number>(() => {
32-
return timestampInSeconds();
33-
});
34-
35-
React.useEffect(() => {
36-
if (componentMountStartTimestamp) {
37-
// Distributions help you get the most insights from your data by allowing you to obtain aggregations such as p90, min, max, and avg.
38-
Sentry.metrics.distribution(
39-
'home_mount_time',
40-
timestampInSeconds() - componentMountStartTimestamp,
41-
{
42-
unit: 'seconds',
43-
},
44-
);
45-
}
46-
// We only want this to run once.
47-
// eslint-disable-next-line react-hooks/exhaustive-deps
48-
}, []);
49-
5030
// Show bad code inside error boundary to trigger it.
5131
const [showBadCode, setShowBadCode] = React.useState(false);
5232
const [isFeedbackVisible, setFeedbackVisible] = React.useState(false);

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,6 @@ const TrackerScreen = () => {
5353
};
5454

5555
const onRefreshButtonPress = () => {
56-
Sentry.metrics.increment('tracker_screen.refresh_button_press', 1, {
57-
tags: { graph: 'none', public_data: true },
58-
});
5956
loadData();
6057
};
6158

0 commit comments

Comments
 (0)