summaryrefslogtreecommitdiff
path: root/app/models
diff options
context:
space:
mode:
Diffstat (limited to 'app/models')
-rw-r--r--app/models/concerns/group_descendant.rb2
-rw-r--r--app/models/concerns/storage/legacy_namespace.rb2
-rw-r--r--app/models/upload.rb6
3 files changed, 4 insertions, 6 deletions
diff --git a/app/models/concerns/group_descendant.rb b/app/models/concerns/group_descendant.rb
index 05cd4265133..5a0beb1d34a 100644
--- a/app/models/concerns/group_descendant.rb
+++ b/app/models/concerns/group_descendant.rb
@@ -52,7 +52,7 @@ module GroupDescendant
}
issue_url = 'https://gitlab.com/gitlab-org/gitlab-ce/issues/40785'
- Gitlab::Sentry.track_exception(exception, issue_url: issue_url, extra: extras)
+ Gitlab::Sentry.handle_exception(exception, issue_url: issue_url, extra: extras)
end
if parent.nil? && hierarchy_top.present?
diff --git a/app/models/concerns/storage/legacy_namespace.rb b/app/models/concerns/storage/legacy_namespace.rb
index 498996f4f80..d1dd46a8d13 100644
--- a/app/models/concerns/storage/legacy_namespace.rb
+++ b/app/models/concerns/storage/legacy_namespace.rb
@@ -38,7 +38,7 @@ module Storage
write_projects_repository_config
rescue => e
# Raise if development/test environment, else just notify Sentry
- Gitlab::Sentry.track_exception(e, extra: { full_path_was: full_path_was, full_path: full_path, action: 'move_dir' })
+ Gitlab::Sentry.handle_exception(e, extra: { full_path_was: full_path_was, full_path: full_path, action: 'move_dir' })
end
true # false would cancel later callbacks but not rollback
diff --git a/app/models/upload.rb b/app/models/upload.rb
index 20860f14b83..a3cd8ff5221 100644
--- a/app/models/upload.rb
+++ b/app/models/upload.rb
@@ -70,10 +70,8 @@ class Upload < ActiveRecord::Base
# Help sysadmins find missing upload files
if persisted? && !exist
- if Gitlab::Sentry.enabled?
- Raven.capture_message("Upload file does not exist", extra: self.attributes)
- end
-
+ exception = RuntimeError.new("Uploaded file does not exist")
+ Gitlab::Sentry.report_exception(exception, extra: self.attributes)
Gitlab::Metrics.counter(:upload_file_does_not_exist_total, 'The number of times an upload record could not find its file').increment
end