module Oboe::Inst::RestClientRequest

Public Class Methods

included(klass) click to toggle source
# File lib/oboe/inst/rest-client.rb, line 7
def self.included(klass)
  ::Oboe::Util.method_alias(klass, :execute, ::RestClient::Request)
end

Public Instance Methods

execute_with_oboe(& block) click to toggle source

execute_with_oboe

The wrapper method for RestClient::Request.execute

# File lib/oboe/inst/rest-client.rb, line 16
def execute_with_oboe & block
  kvs = {}
  kvs['Backtrace'] = Oboe::API.backtrace if Oboe::Config[:rest_client][:collect_backtraces]
  Oboe::API.log_entry("rest-client", kvs)

  # The core rest-client call
  execute_without_oboe(&block)
rescue => e
  Oboe::API.log_exception('rest-client', e)
  raise e
ensure
  Oboe::API.log_exit("rest-client")
end