From 616db8cc82ed105e65e5d0bd0d96412dd8415db3 Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Fri, 15 Nov 2024 11:25:06 +0200 Subject: [PATCH 1/3] Remove metric from the Expo app --- samples/expo/app/(tabs)/index.tsx | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/samples/expo/app/(tabs)/index.tsx b/samples/expo/app/(tabs)/index.tsx index 3c5cdfd65f..b7150393b5 100644 --- a/samples/expo/app/(tabs)/index.tsx +++ b/samples/expo/app/(tabs)/index.tsx @@ -4,31 +4,11 @@ import * as Sentry from '@sentry/react-native'; import { Text, View } from '@/components/Themed'; import { setScopeProperties } from '@/utils/setScopeProperties'; -import { timestampInSeconds } from '@sentry/utils'; import React from 'react'; const isRunningInExpoGo = Constants.appOwnership === 'expo' export default function TabOneScreen() { - const [componentMountStartTimestamp] = React.useState(() => { - return timestampInSeconds(); - }); - - React.useEffect(() => { - if (componentMountStartTimestamp) { - // Distributions help you get the most insights from your data by allowing you to obtain aggregations such as p90, min, max, and avg. - Sentry.metrics.distribution( - 'tab_one_mount_time', - timestampInSeconds() - componentMountStartTimestamp, - { - unit: "seconds", - }, - ); - } - // We only want this to run once. - // eslint-disable-next-line react-hooks/exhaustive-deps - }, []); - return ( @@ -42,7 +22,6 @@ export default function TabOneScreen() {