diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-07 18:09:52 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-07 18:09:52 +0300 |
commit | e43077ab4742ba5083a01a1e5341db1a1b7a1701 (patch) | |
tree | c33a00fb176caff735243c484bbd594a3b08bb6e /lib/gitlab/error_tracking.rb | |
parent | 211a8c3361ccf4eb92f36edbdcf15c98fcdcc8b7 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/error_tracking.rb')
-rw-r--r-- | lib/gitlab/error_tracking.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/gitlab/error_tracking.rb b/lib/gitlab/error_tracking.rb index 6df9bfad657..d20324a613e 100644 --- a/lib/gitlab/error_tracking.rb +++ b/lib/gitlab/error_tracking.rb @@ -97,6 +97,8 @@ module Gitlab extra = extra.merge(data) if data.is_a?(Hash) end + extra = sanitize_request_parameters(extra) + if sentry && Raven.configuration.server Raven.capture_exception(exception, tags: default_tags, extra: extra) end @@ -117,6 +119,11 @@ module Gitlab end end + def sanitize_request_parameters(parameters) + filter = ActiveSupport::ParameterFilter.new(::Rails.application.config.filter_parameters) + filter.filter(parameters) + end + def sentry_dsn return unless Rails.env.production? || Rails.env.development? return unless Gitlab.config.sentry.enabled |