@@ -4,31 +4,11 @@ import * as Sentry from '@sentry/react-native';
4
4
5
5
import { Text , View } from '@/components/Themed' ;
6
6
import { setScopeProperties } from '@/utils/setScopeProperties' ;
7
- import { timestampInSeconds } from '@sentry/utils' ;
8
7
import React from 'react' ;
9
8
10
9
const isRunningInExpoGo = Constants . appOwnership === 'expo'
11
10
12
11
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
-
32
12
return (
33
13
< View style = { styles . container } >
34
14
< Sentry . TimeToInitialDisplay record />
@@ -42,7 +22,6 @@ export default function TabOneScreen() {
42
22
< Button
43
23
title = "Capture exception"
44
24
onPress = { ( ) => {
45
- Sentry . metrics . increment ( 'tab_one.capture_exception_button_press' , 1 ) ;
46
25
Sentry . captureException ( new Error ( 'Captured exception' ) ) ;
47
26
} }
48
27
/>
0 commit comments