diff options
author | Jeroen Nijhof <jeroen@jeroennijhof.nl> | 2016-01-18 17:15:10 +0100 |
---|---|---|
committer | Jeroen Nijhof <jeroen@jeroennijhof.nl> | 2016-01-18 17:15:10 +0100 |
commit | 85e0fce9eee4f20c6c627209828f7351ab0aedae (patch) | |
tree | be370c396b49d7be4d96ccaf48d4bca2592e4ab7 /config/initializers/sentry.rb | |
parent | f603f3b30bcd4303f07f87a0c6fa60697b2775fd (diff) | |
download | gitlab-ce-85e0fce9eee4f20c6c627209828f7351ab0aedae.tar.gz |
Add sentry integration
Diffstat (limited to 'config/initializers/sentry.rb')
-rw-r--r-- | config/initializers/sentry.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/config/initializers/sentry.rb b/config/initializers/sentry.rb new file mode 100644 index 00000000000..3ef46291981 --- /dev/null +++ b/config/initializers/sentry.rb @@ -0,0 +1,17 @@ +# Be sure to restart your server when you modify this file. + +require 'gitlab/current_settings' +include Gitlab::CurrentSettings + +# allow it to fail: it may do so when create_from_defaults is executed before migrations are actually done +begin + sentry_enabled = current_application_settings.sentry_enabled +rescue + sentry_enabled = false +end + +if sentry_enabled + Raven.configure do |config| + config.dsn = current_application_settings.sentry_dsn + end +end |