Skip to content

Commit

Permalink
fix sentry typings
Browse files Browse the repository at this point in the history
  • Loading branch information
abvthecity committed Sep 12, 2024
1 parent 932de55 commit 2bfe9db
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 12 deletions.
5 changes: 1 addition & 4 deletions packages/ui/docs-bundle/sentry.client.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,7 @@ Sentry.init({
// This option is required for capturing headers and cookies.
sendDefaultPii: true,

beforeSend: (event: Sentry.Event, _: Sentry.EventHint): Sentry.Event | null => {
if ((event.type as string) === "csp" || (event as any)?.csp != null) {
return null;
}
beforeSend: (event: Sentry.ErrorEvent, _: Sentry.EventHint): Sentry.ErrorEvent | null => {
// Filter out events from privategpt
if (event.request?.url?.includes("privategpt")) {
return null;
Expand Down
5 changes: 1 addition & 4 deletions packages/ui/docs-bundle/sentry.edge.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,7 @@ Sentry.init({

spotlight: process.env.NODE_ENV === "development",

beforeSend: (event: Sentry.Event, _: Sentry.EventHint): Sentry.Event | null => {
if ((event.type as string) === "csp" || (event as any)?.csp != null) {
return null;
}
beforeSend: (event: Sentry.ErrorEvent, _: Sentry.EventHint): Sentry.ErrorEvent | null => {
// Filter out events from privategpt
if (event.request?.url?.includes("privategpt")) {
return null;
Expand Down
5 changes: 1 addition & 4 deletions packages/ui/docs-bundle/sentry.server.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,7 @@ Sentry.init({

spotlight: process.env.NODE_ENV === "development",

beforeSend: (event: Sentry.Event, _: Sentry.EventHint): Sentry.Event | null => {
if ((event.type as string) === "csp" || (event as any)?.csp != null) {
return null;
}
beforeSend: (event: Sentry.ErrorEvent, _: Sentry.EventHint): Sentry.ErrorEvent | null => {
// Filter out events from privategpt
if (event.request?.url?.includes("privategpt")) {
return null;
Expand Down

0 comments on commit 2bfe9db

Please sign in to comment.