Skip to content

Commit

Permalink
fix: disable sentry
Browse files Browse the repository at this point in the history
  • Loading branch information
TetrisIQ committed Apr 1, 2024
1 parent bef154a commit ffa98cc
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 30 deletions.
22 changes: 11 additions & 11 deletions src/hooks.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ import { sequence } from '@sveltejs/kit/hooks';
import { handleErrorWithSentry, sentryHandle } from '@sentry/sveltekit';
import * as Sentry from '@sentry/sveltekit';

console.log('LOAD SERVER SENTRY');
Sentry.init({
dsn: 'https://[email protected]/1',
tracesSampleRate: 1.0,
enabled: true,
environment: import.meta.env.DEV ? 'DEV Server' : 'PROD Server'
});
// console.log('LOAD SERVER SENTRY');
// Sentry.init({
// dsn: 'https://[email protected]/1',
// tracesSampleRate: 1.0,
// enabled: true,
// environment: import.meta.env.DEV ? 'DEV Server' : 'PROD Server'
// });

// If you have custom handlers, make sure to place them after `sentryHandle()` in the `sequence` function.
export const handle = sequence(sentryHandle());
// // If you have custom handlers, make sure to place them after `sentryHandle()` in the `sequence` function.
// export const handle = sequence(sentryHandle());

// If you have a custom error handler, pass it to `handleErrorWithSentry`
export const handleError = handleErrorWithSentry();
// // If you have a custom error handler, pass it to `handleErrorWithSentry`
// export const handleError = handleErrorWithSentry();
38 changes: 19 additions & 19 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
import { sentrySvelteKit } from '@sentry/sveltekit';
// import { sentrySvelteKit } from '@sentry/sveltekit';
import type { SentrySvelteKitPluginOptions } from '@sentry/sveltekit/types/vite/sentryVitePlugins';
import { sveltekit } from '@sveltejs/kit/vite';
import { defineConfig } from 'vite';
import type { Plugin } from 'vite';

export default defineConfig({
plugins: [
import.meta.url.includes('private')
? sentrySvelteKit({
sourceMapsUploadOptions: {
org: 'poddle',
project: 'poker',
url: 'https://glitchtip.poddle.network/'
}
})
: pass(),
// import.meta.url.includes('private')
// ? sentrySvelteKit({
// sourceMapsUploadOptions: {
// org: 'poddle',
// project: 'poker',
// url: 'https://glitchtip.poddle.network/'
// }
// })
// : pass(),
sveltekit()
],
server: {
Expand All @@ -23,12 +23,12 @@ export default defineConfig({
}
});

function pass(options?: SentrySvelteKitPluginOptions): Promise<Plugin[]> {
return new Promise((resolveOuter) => {
resolveOuter(
new Promise((resolveInner) => {
setTimeout(resolveInner, 1000);
})
);
});
}
// function pass(options?: SentrySvelteKitPluginOptions): Promise<Plugin[]> {
// return new Promise((resolveOuter) => {
// resolveOuter(
// new Promise((resolveInner) => {
// setTimeout(resolveInner, 1000);
// })
// );
// });
// }

0 comments on commit ffa98cc

Please sign in to comment.