From aebb2f70257882dd530b820f3cfdd67621d2a3fd Mon Sep 17 00:00:00 2001 From: Roger Meier Date: Sun, 7 Apr 2019 21:21:52 +0200 Subject: feat: allow Sentry configuration to be passed on gitlab.yml --- app/models/application_setting_implementation.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'app/models/application_setting_implementation.rb') 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 -- cgit v1.2.3