diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-13 15:07:41 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-13 15:07:41 +0300 |
commit | 8cc5f2790908ba9bb8eecba2b78a3c5a88c77b90 (patch) | |
tree | 2d6211503a5111d43a9edce0c56b94fd1b347e1b /config | |
parent | 17b91a3c6ab73fff087e91665e9afb8046cbf045 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'config')
-rw-r--r-- | config/initializers/forbid_sidekiq_in_transactions.rb | 2 | ||||
-rw-r--r-- | config/initializers/sentry.rb | 33 |
2 files changed, 2 insertions, 33 deletions
diff --git a/config/initializers/forbid_sidekiq_in_transactions.rb b/config/initializers/forbid_sidekiq_in_transactions.rb index bb190af60b5..bd59fd4ab90 100644 --- a/config/initializers/forbid_sidekiq_in_transactions.rb +++ b/config/initializers/forbid_sidekiq_in_transactions.rb @@ -29,7 +29,7 @@ module Sidekiq MSG rescue Sidekiq::Worker::EnqueueFromTransactionError => e ::Rails.logger.error(e.message) if ::Rails.env.production? - Gitlab::Sentry.track_exception(e) + Gitlab::Sentry.track_and_raise_for_dev_exception(e) end end diff --git a/config/initializers/sentry.rb b/config/initializers/sentry.rb index 48daca3d254..cebb0edf275 100644 --- a/config/initializers/sentry.rb +++ b/config/initializers/sentry.rb @@ -2,35 +2,4 @@ require 'gitlab/current_settings' -def configure_sentry - if Gitlab::Sentry.enabled? - Raven.configure do |config| - config.dsn = Gitlab.config.sentry.dsn - config.release = Gitlab.revision - config.current_environment = Gitlab.config.sentry.environment - - # Sanitize fields based on those sanitized from Rails. - config.sanitize_fields = Rails.application.config.filter_parameters.map(&:to_s) - # Sanitize authentication headers - config.sanitize_http_headers = %w[Authorization Private-Token] - config.tags = { program: Gitlab.process_name } - # Debugging for https://gitlab.com/gitlab-org/gitlab-foss/issues/57727 - config.before_send = lambda do |event, hint| - if ActiveModel::MissingAttributeError === hint[:exception] - columns_hash = ActiveRecord::Base - .connection - .schema_cache - .instance_variable_get(:@columns_hash) - .map { |k, v| [k, v.map(&:first)] } - .to_h - - event.extra.merge!(columns_hash) - end - - event - end - end - end -end - -configure_sentry if Rails.env.production? || Rails.env.development? +Gitlab::Sentry.configure |