diff options
| author | Luke "Jared" Bennett <lbennett@gitlab.com> | 2017-04-28 13:23:34 +0100 |
|---|---|---|
| committer | Luke "Jared" Bennett <lbennett@gitlab.com> | 2017-04-28 13:41:29 +0100 |
| commit | 284d4f76fee9f593cb67f3f2978ad4f49ef03c13 (patch) | |
| tree | 405f5d50f0536dd85c1694434adc453a301cc196 /lib | |
| parent | ca6cc6014eed02b2e74bc8ffe65d3c1cc2e511b4 (diff) | |
| download | gitlab-ce-284d4f76fee9f593cb67f3f2978ad4f49ef03c13.tar.gz | |
Attempted adding separate clientside_sentry settings
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/api/settings.rb | 5 | ||||
| -rw-r--r-- | lib/api/v3/settings.rb | 6 | ||||
| -rw-r--r-- | lib/gitlab/gon_helper.rb | 2 |
3 files changed, 11 insertions, 2 deletions
diff --git a/lib/api/settings.rb b/lib/api/settings.rb index d01c7f2703b..82f513c984e 100644 --- a/lib/api/settings.rb +++ b/lib/api/settings.rb @@ -58,6 +58,7 @@ module API :restricted_visibility_levels, :send_user_confirmation_email, :sentry_enabled, + :clientside_sentry_enabled, :session_expire_delay, :shared_runners_enabled, :sidekiq_throttling_enabled, @@ -138,6 +139,10 @@ module API given sentry_enabled: ->(val) { val } do requires :sentry_dsn, type: String, desc: 'Sentry Data Source Name' end + optional :clientside_sentry_enabled, type: Boolean, desc: 'Sentry can also be used for reporting and logging clientside exceptions. https://sentry.io/for/javascript/' + given clientside_sentry_enabled: ->(val) { val } do + requires :clientside_sentry_dsn, type: String, desc: 'Clientside Sentry Data Source Name' + end optional :repository_storage, type: String, desc: 'Storage paths for new projects' optional :repository_checks_enabled, type: Boolean, desc: "GitLab will periodically run 'git fsck' in all project and wiki repositories to look for silent disk corruption issues." optional :koding_enabled, type: Boolean, desc: 'Enable Koding' diff --git a/lib/api/v3/settings.rb b/lib/api/v3/settings.rb index 748d6b97d4f..67a85e13d8c 100644 --- a/lib/api/v3/settings.rb +++ b/lib/api/v3/settings.rb @@ -89,6 +89,10 @@ module API given sentry_enabled: ->(val) { val } do requires :sentry_dsn, type: String, desc: 'Sentry Data Source Name' end + optional :clientside_sentry_enabled, type: Boolean, desc: 'Sentry can also be used for reporting and logging clientside exceptions. https://sentry.io/for/javascript/' + given clientside_sentry_enabled: ->(val) { val } do + requires :clientside_sentry_dsn, type: String, desc: 'Clientside Sentry Data Source Name' + end optional :repository_storage, type: String, desc: 'Storage paths for new projects' optional :repository_checks_enabled, type: Boolean, desc: "GitLab will periodically run 'git fsck' in all project and wiki repositories to look for silent disk corruption issues." optional :koding_enabled, type: Boolean, desc: 'Enable Koding' @@ -120,7 +124,7 @@ module API :home_page_url, :after_sign_out_path, :sign_in_text, :help_page_text, :shared_runners_enabled, :max_artifacts_size, :max_pages_size, :container_registry_token_expire_delay, :metrics_enabled, :sidekiq_throttling_enabled, :recaptcha_enabled, - :akismet_enabled, :admin_notification_email, :sentry_enabled, + :akismet_enabled, :admin_notification_email, :sentry_enabled, :clientside_sentry_enabled, :repository_storage, :repository_checks_enabled, :koding_enabled, :plantuml_enabled, :version_check_enabled, :email_author_in_body, :html_emails_enabled, :housekeeping_enabled, :terminal_max_session_time diff --git a/lib/gitlab/gon_helper.rb b/lib/gitlab/gon_helper.rb index 4de504e9bf9..a8a2715e848 100644 --- a/lib/gitlab/gon_helper.rb +++ b/lib/gitlab/gon_helper.rb @@ -12,7 +12,7 @@ module Gitlab gon.user_color_scheme = Gitlab::ColorSchemes.for_user(current_user).css_class gon.katex_css_url = ActionController::Base.helpers.asset_path('katex.css') gon.katex_js_url = ActionController::Base.helpers.asset_path('katex.js') - gon.sentry_dsn = sentry_dsn_public if sentry_enabled? + gon.sentry_dsn = Gitlab.config.clientside_sentry_dsn if clientside_sentry_enabled? gon.gitlab_url = Gitlab.config.gitlab.url gon.is_production = Rails.env.production? |
