Skip to content

Commit

Permalink
web: Capture fewer replays
Browse files Browse the repository at this point in the history
  • Loading branch information
schneefux committed Dec 22, 2024
1 parent 3e9778d commit 20b8323
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions web/renderer/sentry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ export function initSentry(dsn: string, app: App<Element>, router?: Router) {
'Unable to preload CSS',
],
allowUrls: [/https?:\/\/brawltime\.ninja/],
replaysSessionSampleRate: 0.0005,
replaysOnErrorSampleRate: 0.01,
replaysSessionSampleRate: 0.0001,
replaysOnErrorSampleRate: 0.002,
tracePropagationTargets: ['localhost', /^https?:\/\/brawltime\.ninja/],
tracesSampleRate: 0.01,
profilesSampleRate: 0.25, // relative to tracesSampleRate
Expand All @@ -73,6 +73,12 @@ export function initSentry(dsn: string, app: App<Element>, router?: Router) {
}
}

// ignore error if user agent contains "Google-Read-Aloud"
// because this browser does not seem to support service workers
if (navigator.userAgent.includes('Google-Read-Aloud')) {
return null
}

return event
},
})
Expand Down

0 comments on commit 20b8323

Please sign in to comment.