|
@@ -71,21 +71,24 @@ app.component('ImagePreview', ImagePreview)
|
|
|
app.component('RightToolbar', RightToolbar)
|
|
|
app.component('Editor', Editor)
|
|
|
|
|
|
-Sentry.init({
|
|
|
- app,
|
|
|
- dsn: "https://f49d441715062cdbbaa361797e0452e7@sentry.fuxicarbon.com/4",
|
|
|
- integrations: [
|
|
|
- Sentry.browserTracingIntegration({ router }),
|
|
|
- Sentry.replayIntegration(),
|
|
|
- ],
|
|
|
- // Tracing
|
|
|
- tracesSampleRate: 1.0, // Capture 100% of the transactions
|
|
|
- // Set 'tracePropagationTargets' to control for which URLs distributed tracing should be enabled
|
|
|
- tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/],
|
|
|
- // Session Replay
|
|
|
- replaysSessionSampleRate: 0.1, // This sets the sample rate at 10%. You may want to change it to 100% while in development and then sample at a lower rate in production.
|
|
|
- replaysOnErrorSampleRate: 1.0, // I
|
|
|
-});
|
|
|
+if ( import.meta.env.VITE_APP_ENV === 'production' ) {
|
|
|
+ Sentry.init({
|
|
|
+ app,
|
|
|
+ dsn: import.meta.env.VITE_SENTRY_DSN,
|
|
|
+ integrations: [
|
|
|
+ Sentry.browserTracingIntegration({ router }),
|
|
|
+ Sentry.replayIntegration(),
|
|
|
+ ],
|
|
|
+ // Tracing
|
|
|
+ tracesSampleRate: 1.0, // Capture 100% of the transactions
|
|
|
+ // Set 'tracePropagationTargets' to control for which URLs distributed tracing should be enabled
|
|
|
+ tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/],
|
|
|
+ // Session Replay
|
|
|
+ replaysSessionSampleRate: 0.1, // This sets the sample rate at 10%. You may want to change it to 100% while in development and then sample at a lower rate in production.
|
|
|
+ replaysOnErrorSampleRate: 1.0, // I
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
|
|
|
app.use(router)
|
|
|
app.use(store)
|
|
@@ -102,8 +105,10 @@ app.use(ElementPlus, {
|
|
|
size: Cookies.get('size') || 'default'
|
|
|
})
|
|
|
app.config.errorHandler = (err, instance, info) => {
|
|
|
- console.error("Vue Error: ", err);
|
|
|
- Sentry.captureException(err);
|
|
|
+ if ( import.meta.env.VITE_APP_ENV === 'production' ) {
|
|
|
+ console.error("Vue Error: ", err);
|
|
|
+ Sentry.captureException(err);
|
|
|
+ }
|
|
|
};
|
|
|
|
|
|
app.mount('#app')
|