Skip to content
This repository has been archived by the owner on Dec 27, 2024. It is now read-only.

Commit

Permalink
fix: remove beforeSend
Browse files Browse the repository at this point in the history
  • Loading branch information
sircharlo committed Jun 24, 2024
1 parent 17e6ff3 commit 5ba09c2
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions src/boot/sentry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,23 @@ function getBasenameFromFileUrl(fileUrl: string | undefined) {
export default boot(({ app, router }) => {
Sentry.init({
app,
beforeSend: function (event, hint) {
console.log('beforeSend', event, hint);
console.error(hint.originalException || hint.syntheticException);
const stacktrace =
event.exception &&
event.exception.values &&
event.exception.values.length > 0 &&
event.exception.values[0].stacktrace;
if (stacktrace && stacktrace.frames) {
stacktrace.frames.forEach(function (frame) {
console.log('before', frame.filename);
frame.filename = getBasenameFromFileUrl(frame.filename);
console.log('after', getBasenameFromFileUrl(frame.filename));
});
}
return event;
},
// beforeSend: function (event, hint) {
// console.log('beforeSend', event, hint);
// console.error(hint.originalException || hint.syntheticException);
// const stacktrace =
// event.exception &&
// event.exception.values &&
// event.exception.values.length > 0 &&
// event.exception.values[0].stacktrace;
// if (stacktrace && stacktrace.frames) {
// stacktrace.frames.forEach(function (frame) {
// console.log('before', frame.filename);
// frame.filename = getBasenameFromFileUrl(frame.filename);
// console.log('after', getBasenameFromFileUrl(frame.filename));
// });
// }
// return event;
// },
debug: true,
dsn: 'https://0f2ab1c7ddfb118d25704c85957b8188@o1401005.ingest.us.sentry.io/4507449197920256',
integrations: [
Expand Down

0 comments on commit 5ba09c2

Please sign in to comment.