Files
gitlabhq/config/initializers/sentry.rb
T
Robert SpeicherandRobert Speicher 645f775081 Merge branch 'sentry-integration' into 'master'
Add sentry integration

Sentry is an event logging platform primarily focused on capturing and
aggregating exceptions. With this MR it will be possible to log and
track exceptions from GitLab to Sentry.

https://gitlab.com/gitlab-com/operations/issues/39

See merge request !2485
2016-01-20 14:01:23 -05:00

20 lines
507 B
Ruby

# Be sure to restart your server when you modify this file.
require 'gitlab/current_settings'
include Gitlab::CurrentSettings
if Rails.env.production?
# 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
end