summaryrefslogtreecommitdiff
path: root/src/client/init.ts
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2021-01-08 21:43:56 +0900
committersyuilo <syuilotan@yahoo.co.jp>2021-01-08 21:43:56 +0900
commitb3a198cae64b422706d3fc7d1049bb2cb0b79f29 (patch)
treef978b029021ff2482ec9738a6e2fdbed737f6160 /src/client/init.ts
parentNoteDetailed で一部 Renote した人の情報になっているのを修... (diff)
downloadsharkey-b3a198cae64b422706d3fc7d1049bb2cb0b79f29.tar.gz
sharkey-b3a198cae64b422706d3fc7d1049bb2cb0b79f29.tar.bz2
sharkey-b3a198cae64b422706d3fc7d1049bb2cb0b79f29.zip
Sentry integration
Diffstat (limited to 'src/client/init.ts')
-rw-r--r--src/client/init.ts16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/client/init.ts b/src/client/init.ts
index 7c3df68c34..f39f50eea6 100644
--- a/src/client/init.ts
+++ b/src/client/init.ts
@@ -36,13 +36,15 @@ if (localStorage.getItem('vuex') != null) {
location.reload();
}
+import * as Sentry from '@sentry/browser';
+import { Integrations } from '@sentry/tracing';
import { createApp, watch } from 'vue';
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
import widgets from '@/widgets';
import directives from '@/directives';
import components from '@/components';
-import { version, ui, lang } from '@/config';
+import { version, ui, lang, host } from '@/config';
import { router } from '@/router';
import { applyTheme } from '@/scripts/theme';
import { isDeviceDarkmode } from '@/scripts/is-device-darkmode';
@@ -88,6 +90,18 @@ if (_DEV_) {
});
}
+if (defaultStore.state.reportError && !_DEV_) {
+ Sentry.init({
+ dsn: 'https://fd273254a07a4b61857607a9ea05d629@o501808.ingest.sentry.io/5583438',
+ tracesSampleRate: 1.0,
+ });
+
+ Sentry.setTag('misskey_version', version);
+ Sentry.setTag('ui', ui);
+ Sentry.setTag('lang', lang);
+ Sentry.setTag('host', host);
+}
+
// タッチデバイスでCSSの:hoverを機能させる
document.addEventListener('touchend', () => {}, { passive: true });