Skip to content

Commit

Permalink
feat: sentry profiling, replay
Browse files Browse the repository at this point in the history
  • Loading branch information
Ni55aN committed Feb 9, 2024
1 parent 740559b commit d49a111
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions plugins/sentry.client.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,23 @@ import { dsn } from '../config/sentry';
export default defineNuxtPlugin(async (nuxtApp) => {
const app = nuxtApp.vueApp;

const { BrowserTracing } = await import('@sentry/tracing');
const { BrowserTracing } = await import('@sentry/browser');
const Sentry = await import('@sentry/vue');

Sentry.init({
app,
dsn,
environment: window.location.hostname === 'localhost' ? 'localhost' : 'production',
integrations: [
new BrowserTracing({
routingInstrumentation: Sentry.vueRouterInstrumentation(nuxtApp.$router),
tracePropagationTargets: ['localhost', 'rete.js.org', /^\//],
}),
new Sentry.BrowserProfilingIntegration(),
Sentry.replayIntegration(),
],
tracesSampleRate: 1.0, /// process.env.NODE_ENV === 'production'
replaysSessionSampleRate: 0.25,
replaysOnErrorSampleRate: 1.0,
tracesSampleRate: 1.0,
});
});

0 comments on commit d49a111

Please sign in to comment.