Skip to content

Commit

Permalink
Remove metric from the RN app
Browse files Browse the repository at this point in the history
  • Loading branch information
antonis committed Nov 15, 2024
1 parent e21831e commit e600300
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 23 deletions.
20 changes: 0 additions & 20 deletions samples/react-native/src/Screens/ErrorsScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import { UserFeedbackModal } from '../components/UserFeedbackModal';
import { FallbackRender } from '@sentry/react';
import NativeSampleModule from '../../tm/NativeSampleModule';
import NativePlatformSampleModule from '../../tm/NativePlatformSampleModule';
import { timestampInSeconds } from '@sentry/utils';

const { AssetsModule, CppModule, CrashModule } = NativeModules;

Expand All @@ -28,25 +27,6 @@ interface Props {
}

const ErrorsScreen = (_props: Props) => {
const [componentMountStartTimestamp] = React.useState<number>(() => {
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(
'home_mount_time',
timestampInSeconds() - componentMountStartTimestamp,
{
unit: 'seconds',
},
);
}
// We only want this to run once.
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);

// Show bad code inside error boundary to trigger it.
const [showBadCode, setShowBadCode] = React.useState(false);
const [isFeedbackVisible, setFeedbackVisible] = React.useState(false);
Expand Down
3 changes: 0 additions & 3 deletions samples/react-native/src/Screens/TrackerScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,6 @@ const TrackerScreen = () => {
};

const onRefreshButtonPress = () => {
Sentry.metrics.increment('tracker_screen.refresh_button_press', 1, {
tags: { graph: 'none', public_data: true },
});
loadData();
};

Expand Down

0 comments on commit e600300

Please sign in to comment.