Skip to content

Commit 9aac60b

Browse files
authored
fix: add Sentry RewriteFrames integration (#4210)
1 parent d4c0b97 commit 9aac60b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

app/src/lib/analytics/sentry.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
1-
import { startSpan, setUser, type Span, init } from '@sentry/sveltekit';
1+
import * as Sentry from '@sentry/sveltekit';
2+
import { type Span } from '@sentry/sveltekit';
23
import type { User } from '$lib/stores/user';
34
import { dev } from '$app/environment';
45
import { PUBLIC_SENTRY_ENVIRONMENT } from '$env/static/public';
56

7+
const { startSpan, setUser, init, rewriteFramesIntegration } = Sentry;
8+
69
export function initSentry() {
710
init({
811
enabled: !dev,
912
dsn: 'https://a35bbd6688a3a8f76e4956c6871f414a@o4504644069687296.ingest.sentry.io/4505976067129344',
1013
environment: PUBLIC_SENTRY_ENVIRONMENT,
1114
tracesSampleRate: 0.1,
12-
tracePropagationTargets: ['localhost', /gitbutler\.com/i]
15+
tracePropagationTargets: ['localhost', /gitbutler\.com/i],
16+
integrations: [rewriteFramesIntegration()]
1317
});
1418
}
1519

0 commit comments

Comments
 (0)