We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9abb766 commit cd768e8Copy full SHA for cd768e8
packages/workshop-app/instrument.js
@@ -1,3 +1,4 @@
1
+import path from 'node:path'
2
import { nodeProfilingIntegration } from '@sentry/profiling-node'
3
import * as Sentry from '@sentry/react-router'
4
@@ -20,6 +21,15 @@ Sentry.init({
20
21
}
22
return process.env.NODE_ENV === 'production' ? 1 : 0
23
},
24
+ beforeSend(event) {
25
+ const isPlaygroundError = event.exception?.values?.some(value =>
26
+ value.stacktrace?.frames?.some(frame => frame.filename?.includes(`${path.sep}playground${path.sep}`))
27
+ )
28
+ if (isPlaygroundError) {
29
+ return null
30
+ }
31
+ return event
32
+ },
33
beforeSendTransaction(event) {
34
if (event.request?.headers?.['x-healthcheck'] === 'true') {
35
return null
0 commit comments