Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/sentry/index.js')
-rw-r--r--app/assets/javascripts/sentry/index.js35
1 files changed, 2 insertions, 33 deletions
diff --git a/app/assets/javascripts/sentry/index.js b/app/assets/javascripts/sentry/index.js
index cf6a79fe939..940caea3322 100644
--- a/app/assets/javascripts/sentry/index.js
+++ b/app/assets/javascripts/sentry/index.js
@@ -1,35 +1,4 @@
import '../webpack';
+import { initSentry } from './init_sentry';
-import * as Sentry from 'sentrybrowser7';
-import SentryConfig from './sentry_config';
-
-const index = function index() {
- // Configuration for newer versions of Sentry SDK (v7)
- SentryConfig.init({
- dsn: gon.sentry_dsn,
- environment: gon.sentry_environment,
- currentUserId: gon.current_user_id,
- allowUrls:
- process.env.NODE_ENV === 'production'
- ? [gon.gitlab_url]
- : [gon.gitlab_url, 'webpack-internal://'],
- release: gon?.version,
- tags: {
- revision: gon?.revision,
- feature_category: gon?.feature_category,
- page: document?.body?.dataset?.page,
- },
- });
-};
-
-index();
-
-// The _Sentry object is globally exported so it can be used by
-// ./sentry_browser_wrapper.js
-// This hack allows us to load a single version of `@sentry/browser`
-// in the browser, see app/views/layouts/_head.html.haml to find how it is imported.
-
-// eslint-disable-next-line no-underscore-dangle
-window._Sentry = Sentry;
-
-export default index;
+initSentry();