Skip to content

Commit 616db8c

Browse files
committed
Remove metric from the Expo app
1 parent e1ea4a8 commit 616db8c

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

samples/expo/app/(tabs)/index.tsx

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,31 +4,11 @@ import * as Sentry from '@sentry/react-native';
44

55
import { Text, View } from '@/components/Themed';
66
import { setScopeProperties } from '@/utils/setScopeProperties';
7-
import { timestampInSeconds } from '@sentry/utils';
87
import React from 'react';
98

109
const isRunningInExpoGo = Constants.appOwnership === 'expo'
1110

1211
export default function TabOneScreen() {
13-
const [componentMountStartTimestamp] = React.useState<number>(() => {
14-
return timestampInSeconds();
15-
});
16-
17-
React.useEffect(() => {
18-
if (componentMountStartTimestamp) {
19-
// Distributions help you get the most insights from your data by allowing you to obtain aggregations such as p90, min, max, and avg.
20-
Sentry.metrics.distribution(
21-
'tab_one_mount_time',
22-
timestampInSeconds() - componentMountStartTimestamp,
23-
{
24-
unit: "seconds",
25-
},
26-
);
27-
}
28-
// We only want this to run once.
29-
// eslint-disable-next-line react-hooks/exhaustive-deps
30-
}, []);
31-
3212
return (
3313
<View style={styles.container}>
3414
<Sentry.TimeToInitialDisplay record />
@@ -42,7 +22,6 @@ export default function TabOneScreen() {
4222
<Button
4323
title="Capture exception"
4424
onPress={() => {
45-
Sentry.metrics.increment('tab_one.capture_exception_button_press', 1);
4625
Sentry.captureException(new Error('Captured exception'));
4726
}}
4827
/>

0 commit comments

Comments
 (0)