Module: Common::Client::Concerns::Monitoring

Instance Method Summary collapse

Instance Method Details

#with_monitoring(trace_location = 1) ⇒ Object



9
10
11
12
13
14
15
16
17
# File 'lib/common/client/concerns/monitoring.rb', line 9

def with_monitoring(trace_location = 1)
  caller = caller_locations(trace_location, 1)[0].label
  yield
rescue => e
  increment_failure(caller, e)
  raise e
ensure
  increment_total(caller)
end