diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-18 00:09:56 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-18 00:09:56 +0300 |
commit | 9facfe5cb194005894467c06e4ea1a9800034ab4 (patch) | |
tree | 5ceaecd5f89725250bbf4119558715fa14576c4c /lib/gitlab | |
parent | 18da92341dac366b7bcfd13f2d3c443ffa315af0 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab')
-rw-r--r-- | lib/gitlab/backtrace_cleaner.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/exception_log_formatter.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/sidekiq_logging/exception_handler.rb | 2 |
3 files changed, 4 insertions, 2 deletions
diff --git a/lib/gitlab/backtrace_cleaner.rb b/lib/gitlab/backtrace_cleaner.rb index 30ec99808f7..d04f0983d12 100644 --- a/lib/gitlab/backtrace_cleaner.rb +++ b/lib/gitlab/backtrace_cleaner.rb @@ -1,5 +1,7 @@ # frozen_string_literal: true +# Remove some GitLab code from backtraces. Do not use this for logging errors in +# production environments, as the error may be thrown by our middleware. module Gitlab module BacktraceCleaner IGNORE_BACKTRACES = %w[ diff --git a/lib/gitlab/exception_log_formatter.rb b/lib/gitlab/exception_log_formatter.rb index 2da1b8915e4..6aff8f909f3 100644 --- a/lib/gitlab/exception_log_formatter.rb +++ b/lib/gitlab/exception_log_formatter.rb @@ -23,7 +23,7 @@ module Gitlab end if exception.backtrace - payload['exception.backtrace'] = Gitlab::BacktraceCleaner.clean_backtrace(exception.backtrace) + payload['exception.backtrace'] = Rails.backtrace_cleaner.clean(exception.backtrace) end end end diff --git a/lib/gitlab/sidekiq_logging/exception_handler.rb b/lib/gitlab/sidekiq_logging/exception_handler.rb index a6d6819bf8e..8ae6addc2c6 100644 --- a/lib/gitlab/sidekiq_logging/exception_handler.rb +++ b/lib/gitlab/sidekiq_logging/exception_handler.rb @@ -18,7 +18,7 @@ module Gitlab data.merge!(job_data) if job_data.present? end - data[:error_backtrace] = Gitlab::BacktraceCleaner.clean_backtrace(job_exception.backtrace) if job_exception.backtrace.present? + data[:error_backtrace] = Rails.backtrace_cleaner.clean(job_exception.backtrace) if job_exception.backtrace.present? Sidekiq.logger.warn(data) end |