Class: Gitlab::Ci::Trace::Metrics
Constant Summary
collapse
- OPERATIONS =
[:mutated].freeze
Class Method Summary
collapse
Instance Method Summary
collapse
clear_memoization, strong_memoize, strong_memoized?
Class Method Details
.trace_operations ⇒ Object
19
20
21
22
23
24
25
26
|
# File 'lib/gitlab/ci/trace/metrics.rb', line 19
def self.trace_operations
strong_memoize(:trace_operations) do
name = :gitlab_ci_trace_operations_total
= 'Total amount of different operations on a build trace'
Gitlab::Metrics.counter(name, )
end
end
|
Instance Method Details
#increment_trace_operation(operation: :unknown) ⇒ Object
11
12
13
14
15
16
17
|
# File 'lib/gitlab/ci/trace/metrics.rb', line 11
def increment_trace_operation(operation: :unknown)
unless OPERATIONS.include?(operation)
raise ArgumentError, 'unknown trace operation'
end
self.class.trace_operations.increment(operation: operation)
end
|