Skip to content

Commit 47b2309

Browse files
billyvgryan953
andauthored
feat(replay): Use logs instead of captureMessage for mobile touch start debugging (#92502)
This PR does two things: - fix to only send on mobile replays - change to use logs instead of captureMessage, since we dont need the full event context --------- Co-authored-by: Ryan Albrecht <ryan.albrecht@sentry.io>
1 parent 65a7453 commit 47b2309

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

static/app/utils/replays/playback/hooks/useTouchEventsCheck.tsx

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,22 @@ interface Props {
99

1010
export default function useTouchEventsCheck({replay}: Props) {
1111
useEffect(() => {
12-
if (!replay?.getVideoEvents()) {
12+
if (!replay?.getVideoEvents().length) {
1313
return;
1414
}
1515
const touchEvents = replay.getRRwebTouchEvents() ?? [];
1616
const grouped = Object.groupBy(touchEvents, (t: any) => t.data.pointerId);
1717
Object.values(grouped).forEach(t => {
1818
if (t?.length !== 2) {
19-
Sentry.captureMessage(
20-
'Mobile replay has mismatching touch start and end events',
21-
{
22-
tags: {
23-
sdk_name: replay.getReplay().sdk.name,
24-
sdk_version: replay.getReplay().sdk.version,
25-
touch_event_type: typeof t,
26-
},
27-
}
28-
);
19+
const replayData = replay.getReplay();
20+
Sentry.logger.debug('Mobile replay: mismatching touch start and end events', {
21+
sdk_name: replayData.sdk.name,
22+
sdk_version: replayData.sdk.version,
23+
pointer_id: t?.[0]?.data.pointerId,
24+
number_of_events: t?.length,
25+
replay_id: replayData.id,
26+
url: window.location.href,
27+
});
2928
}
3029
});
3130
}, [replay]);

0 commit comments

Comments
 (0)