Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/ci/trace/metrics.rb')
-rw-r--r--lib/gitlab/ci/trace/metrics.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/gitlab/ci/trace/metrics.rb b/lib/gitlab/ci/trace/metrics.rb
index 174a5f184ff..f3ded3cda4a 100644
--- a/lib/gitlab/ci/trace/metrics.rb
+++ b/lib/gitlab/ci/trace/metrics.rb
@@ -21,7 +21,7 @@ module Gitlab
:corrupted # malformed trace found after comparing CRC32 and size
].freeze
- TRACE_ERROR_TYPES = [
+ TRACE_ERROR_REASONS = [
:chunks_invalid_size, # used to be :corrupted
:chunks_invalid_checksum, # used to be :invalid
:archive_invalid_checksum # malformed trace found into object store after comparing MD5
@@ -39,12 +39,12 @@ module Gitlab
self.class.trace_bytes.increment({}, size.to_i)
end
- def increment_error_counter(type: :unknown)
- unless TRACE_ERROR_TYPES.include?(type)
- raise ArgumentError, "unknown error type: #{type}"
+ def increment_error_counter(error_reason: :unknown)
+ unless TRACE_ERROR_REASONS.include?(error_reason)
+ raise ArgumentError, "unknown error reason: #{error_reason}"
end
- self.class.trace_errors_counter.increment(type: type)
+ self.class.trace_errors_counter.increment(error_reason: error_reason)
end
def observe_migration_duration(seconds)