2021-09-04 01:27:46 +05:30
|
|
|
import '../webpack';
|
|
|
|
|
2023-03-04 22:38:38 +05:30
|
|
|
import * as Sentry from 'sentrybrowser7';
|
2019-12-26 22:10:19 +05:30
|
|
|
import SentryConfig from './sentry_config';
|
2017-08-17 22:00:37 +05:30
|
|
|
|
|
|
|
const index = function index() {
|
2023-03-04 22:38:38 +05:30
|
|
|
// Configuration for newer versions of Sentry SDK (v7)
|
2019-12-26 22:10:19 +05:30
|
|
|
SentryConfig.init({
|
|
|
|
dsn: gon.sentry_dsn,
|
2023-03-04 22:38:38 +05:30
|
|
|
environment: gon.sentry_environment,
|
2017-08-17 22:00:37 +05:30
|
|
|
currentUserId: gon.current_user_id,
|
2023-03-04 22:38:38 +05:30
|
|
|
allowUrls:
|
2019-07-31 22:56:46 +05:30
|
|
|
process.env.NODE_ENV === 'production'
|
|
|
|
? [gon.gitlab_url]
|
|
|
|
: [gon.gitlab_url, 'webpack-internal://'],
|
2017-08-17 22:00:37 +05:30
|
|
|
release: gon.revision,
|
|
|
|
tags: {
|
|
|
|
revision: gon.revision,
|
2021-09-30 23:02:18 +05:30
|
|
|
feature_category: gon.feature_category,
|
2017-08-17 22:00:37 +05:30
|
|
|
},
|
|
|
|
});
|
|
|
|
};
|
|
|
|
|
|
|
|
index();
|
|
|
|
|
2023-03-04 22:38:38 +05:30
|
|
|
// 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;
|
|
|
|
|
2017-08-17 22:00:37 +05:30
|
|
|
export default index;
|