diff options
author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2019-04-30 21:27:27 +0300 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2019-04-30 21:27:27 +0300 |
commit | 29c5174274feafebc4ecb182eaece3dfb2197d22 (patch) | |
tree | e1632a18a93076b6cad8f92b1258579ff6e93e8f /app/assets/javascripts/raven | |
parent | 93a332a620f54038d78bd82ce6f1f553d92b7f46 (diff) | |
parent | aebb2f70257882dd530b820f3cfdd67621d2a3fd (diff) |
Merge branch 'feat/sentry-environment' into 'master'
feat: add option to define the Sentry Environment
See merge request gitlab-org/gitlab-ce!27091
Diffstat (limited to 'app/assets/javascripts/raven')
-rw-r--r-- | app/assets/javascripts/raven/index.js | 7 | ||||
-rw-r--r-- | app/assets/javascripts/raven/raven_config.js | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/app/assets/javascripts/raven/index.js b/app/assets/javascripts/raven/index.js index edc2293915f..4dd0175e528 100644 --- a/app/assets/javascripts/raven/index.js +++ b/app/assets/javascripts/raven/index.js @@ -4,8 +4,11 @@ const index = function index() { RavenConfig.init({ sentryDsn: gon.sentry_dsn, currentUserId: gon.current_user_id, - whitelistUrls: [gon.gitlab_url], - isProduction: process.env.NODE_ENV, + 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, diff --git a/app/assets/javascripts/raven/raven_config.js b/app/assets/javascripts/raven/raven_config.js index 338006ce2b9..b4a8c263954 100644 --- a/app/assets/javascripts/raven/raven_config.js +++ b/app/assets/javascripts/raven/raven_config.js @@ -61,7 +61,7 @@ const RavenConfig = { release: this.options.release, tags: this.options.tags, whitelistUrls: this.options.whitelistUrls, - environment: this.options.isProduction ? 'production' : 'development', + environment: this.options.environment, ignoreErrors: this.IGNORE_ERRORS, ignoreUrls: this.IGNORE_URLS, shouldSendCallback: this.shouldSendSample.bind(this), |