diff options
Diffstat (limited to 'app/assets/javascripts/sentry/index.js')
-rw-r--r-- | app/assets/javascripts/sentry/index.js | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/app/assets/javascripts/sentry/index.js b/app/assets/javascripts/sentry/index.js new file mode 100644 index 00000000000..06e4e0aa507 --- /dev/null +++ b/app/assets/javascripts/sentry/index.js @@ -0,0 +1,23 @@ +import SentryConfig from './sentry_config'; + +const index = function index() { + SentryConfig.init({ + dsn: gon.sentry_dsn, + 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, + }, + }); + + return SentryConfig; +}; + +index(); + +export default index; |