fix sentry reporting

This commit is contained in:
pa
2026-01-08 15:21:56 +09:00
committed by Natsumi
parent a1fc383dac
commit 5162f916a7
2 changed files with 4 additions and 2 deletions
+2 -1
View File
@@ -109,6 +109,7 @@ export function startRendererMemoryThresholdReport(
lastSent = now; lastSent = now;
const trail = getPiniaActionTrail(); const trail = getPiniaActionTrail();
const trailText = JSON.stringify(trail);
Sentry.withScope((scope) => { Sentry.withScope((scope) => {
scope.setLevel('warning'); scope.setLevel('warning');
scope.setTag('reason', 'high-js-heap'); scope.setTag('reason', 'high-js-heap');
@@ -118,7 +119,7 @@ export function startRendererMemoryThresholdReport(
ratio ratio
}); });
scope.setContext('pinia_actions', { scope.setContext('pinia_actions', {
trail, trailText,
count: trail.length count: trail.length
}); });
Sentry.captureMessage( Sentry.captureMessage(
+2 -1
View File
@@ -543,11 +543,12 @@ export const useVrcxStore = defineStore('Vrcx', () => {
} }
return ts.isAfter(cutoff) || ts.isSame(cutoff); return ts.isAfter(cutoff) || ts.isSame(cutoff);
}); });
const trailText = JSON.stringify(trail);
Sentry.withScope((scope) => { Sentry.withScope((scope) => {
scope.setLevel('fatal'); scope.setLevel('fatal');
scope.setTag('reason', 'crash-recovery'); scope.setTag('reason', 'crash-recovery');
scope.setContext('pinia_actions', { scope.setContext('pinia_actions', {
trail, trailText,
count: trail.length count: trail.length
}); });
Sentry.captureMessage( Sentry.captureMessage(