CLASSROOMIO-T-24: Add sentry

This commit is contained in:
rotimi-best
2021-10-09 22:14:46 +03:00
parent ea3ce7dd69
commit 32ee665cb4
4 changed files with 6902 additions and 158 deletions
+21
View File
@@ -1,4 +1,25 @@
import * as sapper from '@sapper/app';
import * as Sentry from '@sentry/browser';
import { Integrations } from '@sentry/tracing';
import { CaptureConsole } from '@sentry/integrations';
import config from './config';
console.log(`isProd`, config.isProd);
Sentry.init({
dsn: 'https://c966f7e8cb1d4306be20b26bb4f0cc96@o476906.ingest.sentry.io/5999999',
integrations: [
new Integrations.BrowserTracing(),
new CaptureConsole({
levels: ['error'],
}),
],
environment: config.isProd ? 'production' : 'development',
// Set tracesSampleRate to 1.0 to capture 100%
// of transactions for performance monitoring.
// We recommend adjusting this value in production
tracesSampleRate: 1.0,
});
sapper.start({
target: document.querySelector('#sapper'),