Skip to content

Commit fc605e9

Browse files
committed
fix(sentry): ignore HeadlessChrome
1 parent 80c79e9 commit fc605e9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/sentry.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ if (enableSentry) {
99
dsn: import.meta.env.PUBLIC_SENTRY_DSN,
1010
integrations: [new BrowserTracing()],
1111
tracesSampleRate: 0.05,
12+
beforeSend: (event) => {
13+
if (event.contexts?.device?.name?.includes('HeadlessChrome') ?? false) return null
14+
return event
15+
}
1216
})
1317
Sentry.setContext('app', {
1418
version: import.meta.env.PUBLIC_VERSION,

0 commit comments

Comments
 (0)