Skip to content

Commit 37d3b2a

Browse files
committed
chore(app): update sentry
1 parent 6b06092 commit 37d3b2a

File tree

9 files changed

+163
-141
lines changed

9 files changed

+163
-141
lines changed

app.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ const config: ExpoConfig = {
157157
note: 'Use SENTRY_AUTH_TOKEN env to authenticate with Sentry.',
158158
project: 'foam',
159159
organization: 'luke-howsam',
160+
useNativeInit: true,
160161
},
161162
],
162163
[

bun.lock

Lines changed: 22 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@
103103
"@react-navigation/native": "^7.1.26",
104104
"@react-navigation/native-stack": "^7.9.0",
105105
"@react-navigation/stack": "^7.6.13",
106-
"@sentry/react-native": "~7.2.0",
106+
"@sentry/react-native": "^8.7.0",
107107
"@shopify/flash-list": "2.0.2",
108108
"@svgr/core": "^8.1.0",
109109
"@svgr/plugin-jsx": "^8.1.0",

src/components/Image/Image.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
/* eslint-disable no-restricted-imports */
2+
import * as Sentry from '@sentry/react-native';
23
import { Image as ExpoImage, ImageProps as ExpoImageProps } from 'expo-image';
34
import { View, ViewStyle, StyleProp } from 'react-native';
45
import { NitroImage } from 'react-native-nitro-image';
56
import { StyleSheet } from 'react-native-unistyles';
67

8+
Sentry.wrapExpoImage(ExpoImage);
9+
710
export interface ImageProps extends Omit<ExpoImageProps, 'source'> {
811
containerStyle?: ViewStyle;
912
/**

src/components/StreamPlayer/StreamPlayer.tsx

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Button } from '@app/components/Button/Button';
22
import { Icon } from '@app/components/Icon/Icon';
33
import { PressableArea } from '@app/components/PressableArea/PressableArea';
44
import { Text } from '@app/components/Text/Text';
5-
import { sentryService } from '@app/services/sentry-service';
5+
import { countMetric, sentryService } from '@app/services/sentry-service';
66
import * as Haptics from 'expo-haptics';
77
import { LinearGradient } from 'expo-linear-gradient';
88
import {
@@ -945,18 +945,10 @@ export const StreamPlayer = forwardRef<StreamPlayerRef, StreamPlayerProps>(
945945
case 'ready': {
946946
const readyAt = Date.now();
947947
setReadyTimestamp(readyAt);
948-
const streamReadyElapsedMs =
949-
readyAt - overlayStartTimeRef.current;
950-
sentryService.captureMessage('stream.ready', {
951-
level: 'info',
952-
tags: { component: 'StreamPlayer' },
953-
extra: {
954-
channel: channel ?? undefined,
955-
stream_ready_elapsed_ms: streamReadyElapsedMs,
956-
stream_ready_elapsed_seconds: Math.round(
957-
streamReadyElapsedMs / 1000,
958-
),
959-
},
948+
countMetric('stream.ready', {
949+
autoplay,
950+
component: 'StreamPlayer',
951+
defer_overlay_until_user_unmute: deferOverlayUntilUserUnmute,
960952
});
961953
setPlayerState(prev => ({
962954
...prev,
@@ -1065,7 +1057,6 @@ export const StreamPlayer = forwardRef<StreamPlayerRef, StreamPlayerProps>(
10651057
}
10661058
},
10671059
[
1068-
channel,
10691060
autoplay,
10701061
deferOverlayUntilUserUnmute,
10711062
initialMuted,

0 commit comments

Comments
 (0)