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

Commit

Permalink
fix: move to beforeSend
Browse files Browse the repository at this point in the history
  • Loading branch information
sircharlo committed Jun 23, 2024
1 parent 4aab07a commit 1abd7be
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion src/boot/sentry.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,28 @@
import * as Sentry from '@sentry/vue';
// import path from 'path';
import path from 'path';
import { boot } from 'quasar/wrappers';

import packageInfo from '../../package.json';

export default boot(({ app, router }) => {
Sentry.init({
app,
beforeSend: function (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) {
frame.filename = frame.filename
? path.basename(frame.filename)
: frame.filename;
});
}
return event;
},
dsn: 'https://0f2ab1c7ddfb118d25704c85957b8188@o1401005.ingest.us.sentry.io/4507449197920256',
integrations: [
// Sentry.rewriteFramesIntegration({
Expand Down

0 comments on commit 1abd7be

Please sign in to comment.