Skip to content

Commit

Permalink
fix(sentry): ignore HeadlessChrome
Browse files Browse the repository at this point in the history
  • Loading branch information
coderbyheart committed Jan 15, 2024
1 parent 80c79e9 commit fc605e9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/sentry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ if (enableSentry) {
dsn: import.meta.env.PUBLIC_SENTRY_DSN,
integrations: [new BrowserTracing()],
tracesSampleRate: 0.05,
beforeSend: (event) => {
if (event.contexts?.device?.name?.includes('HeadlessChrome') ?? false) return null
return event
}
})
Sentry.setContext('app', {
version: import.meta.env.PUBLIC_VERSION,
Expand Down

0 comments on commit fc605e9

Please sign in to comment.