Skip to content

Commit

Permalink
inline beforeSend return
Browse files Browse the repository at this point in the history
  • Loading branch information
goosewobbler committed Jul 4, 2022
1 parent 2f9aafd commit 2f1ab32
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions main/sentry/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,12 @@ export function init () {
// only use IPC from renderer process, not HTTP
ipcMode: Sentry.IPCMode.Classic,
dsn: 'https://7b09a85b26924609bef5882387e2c4dc@o1204372.ingest.sentry.io/6331069',
beforeSend: (evt: Event) => {
return {
...evt,
exception: { values: getSentryExceptions(evt) },
user: { ...evt.user, ip_address: undefined }, // remove IP address
tags: { ...evt.tags, 'frame.instance_id': store('main.instanceId') },
extra: getCrashReportFields()
}
}
beforeSend: (evt: Event) => ({
...evt,
exception: { values: getSentryExceptions(evt) },
user: { ...evt.user, ip_address: undefined }, // remove IP address
tags: { ...evt.tags, 'frame.instance_id': store('main.instanceId') },
extra: getCrashReportFields()
})
})
}

0 comments on commit 2f1ab32

Please sign in to comment.