gitlab-org--gitlab-foss/app/assets/javascripts/sentry/index.js

27 lines
557 B
JavaScript
Raw Normal View History

import '../webpack';
import SentryConfig from './sentry_config';
2017-04-14 20:09:16 +00:00
const index = function index() {
SentryConfig.init({
dsn: gon.sentry_dsn,
2017-04-14 20:09:16 +00:00
currentUserId: gon.current_user_id,
whitelistUrls:
process.env.NODE_ENV === 'production'
? [gon.gitlab_url]
: [gon.gitlab_url, 'webpack-internal://'],
environment: gon.sentry_environment,
release: gon.revision,
tags: {
revision: gon.revision,
feature_category: gon.feature_category,
},
2017-04-14 20:09:16 +00:00
});
return SentryConfig;
2017-04-14 20:09:16 +00:00
};
index();
export default index;