diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-13 12:07:41 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-13 12:07:41 +0000 |
commit | 8cc5f2790908ba9bb8eecba2b78a3c5a88c77b90 (patch) | |
tree | 2d6211503a5111d43a9edce0c56b94fd1b347e1b /app/controllers | |
parent | 17b91a3c6ab73fff087e91665e9afb8046cbf045 (diff) | |
download | gitlab-ce-8cc5f2790908ba9bb8eecba2b78a3c5a88c77b90.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/application_controller.rb | 8 | ||||
-rw-r--r-- | app/controllers/concerns/issuable_actions.rb | 10 |
2 files changed, 8 insertions, 10 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 1ed8da57927..ba986c495e2 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -23,7 +23,7 @@ class ApplicationController < ActionController::Base before_action :validate_user_service_ticket! before_action :check_password_expiration, if: :html_request? before_action :ldap_security_check - before_action :sentry_context + around_action :sentry_context before_action :default_headers before_action :add_gon_variables, if: :html_request? before_action :configure_permitted_parameters, if: :devise_controller? @@ -165,7 +165,7 @@ class ApplicationController < ActionController::Base end def log_exception(exception) - Gitlab::Sentry.track_acceptable_exception(exception) + Gitlab::Sentry.track_exception(exception) backtrace_cleaner = request.env["action_dispatch.backtrace_cleaner"] application_trace = ActionDispatch::ExceptionWrapper.new(backtrace_cleaner, exception).application_trace @@ -532,8 +532,8 @@ class ApplicationController < ActionController::Base @impersonator ||= User.find(session[:impersonator_id]) if session[:impersonator_id] end - def sentry_context - Gitlab::Sentry.context(current_user) + def sentry_context(&block) + Gitlab::Sentry.with_context(current_user, &block) end def allow_gitaly_ref_name_caching diff --git a/app/controllers/concerns/issuable_actions.rb b/app/controllers/concerns/issuable_actions.rb index 7b7cfa7a5d3..4a1b06bf01f 100644 --- a/app/controllers/concerns/issuable_actions.rb +++ b/app/controllers/concerns/issuable_actions.rb @@ -98,13 +98,11 @@ module IssuableActions error_message = "Destroy confirmation not provided for #{issuable.human_class_name}" exception = RuntimeError.new(error_message) - Gitlab::Sentry.track_acceptable_exception( + Gitlab::Sentry.track_exception( exception, - extra: { - project_path: issuable.project.full_path, - issuable_type: issuable.class.name, - issuable_id: issuable.id - } + project_path: issuable.project.full_path, + issuable_type: issuable.class.name, + issuable_id: issuable.id ) index_path = polymorphic_path([parent, issuable.class]) |