Skip to content

Commit

Permalink
Filter out non-error or fatal level events from sentry
Browse files Browse the repository at this point in the history
  • Loading branch information
toddkao committed Jan 13, 2025
1 parent 7709f59 commit d4159e5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/widget/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ init({
networkDetailAllowUrls: [/^https:\/\/go\.skip\.build\//],
networkRequestHeaders: ["X-Custom-Header"],
networkResponseHeaders: ["X-Custom-Header"],
beforeErrorSampling(event) {
if (!event?.level || ["error", "fatal"].includes(event.level)) {
return false;
}
return true;
},
}),
],
// Session Replay
Expand Down

0 comments on commit d4159e5

Please sign in to comment.