summaryrefslogtreecommitdiff
path: root/app/models
diff options
context:
space:
mode:
authorRoger Meier <r.meier@siemens.com>2019-04-07 21:21:52 +0200
committerRoger Meier <r.meier@siemens.com>2019-04-30 18:10:57 +0200
commitaebb2f70257882dd530b820f3cfdd67621d2a3fd (patch)
treeffc70dec184fbd478ad0898368ec58ad5398ef16 /app/models
parent2432a540cff461c5d9c0346dd4021229078d674d (diff)
downloadgitlab-ce-aebb2f70257882dd530b820f3cfdd67621d2a3fd.tar.gz
feat: allow Sentry configuration to be passed on gitlab.yml
Diffstat (limited to 'app/models')
-rw-r--r--app/models/application_setting_implementation.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/app/models/application_setting_implementation.rb b/app/models/application_setting_implementation.rb
index b413ffddb9d..557215ff4dc 100644
--- a/app/models/application_setting_implementation.rb
+++ b/app/models/application_setting_implementation.rb
@@ -183,6 +183,22 @@ module ApplicationSettingImplementation
clientside_sentry_dsn.strip! if clientside_sentry_dsn.present?
end
+ def sentry_enabled
+ Gitlab.config.sentry.enabled || read_attribute(:sentry_enabled)
+ end
+
+ def sentry_dsn
+ Gitlab.config.sentry.dsn || read_attribute(:sentry_dsn)
+ end
+
+ def clientside_sentry_enabled
+ Gitlab.config.sentry.enabled || read_attribute(:clientside_sentry_enabled)
+ end
+
+ def clientside_sentry_dsn
+ Gitlab.config.sentry.dsn || read_attribute(:clientside_sentry_dsn)
+ end
+
def performance_bar_allowed_group
Group.find_by_id(performance_bar_allowed_group_id)
end