lib/remote_notifications/backport.rb
# Instrument the given block by measuring the time taken to execute it
# and publish it. Notice that events get sent even if an error occurs
# in the passed-in block
Instrument the given block by measuring the time taken to execute it
and publish it. Notice that events get sent even if an error occurs
in the passed-in block
Instrument the given block by measuring the time taken to execute it and publish it . Notice that events get sent even if an error occurs in the passed - in block
def instrument(name, payload={})
        @notifier.start(name, @id, payload)
        begin
          yield
        rescue Exception => e
          payload[:exception] = [e.class.name, e.message]
          raise e
        ensure
          @notifier.finish(name, @id, payload)
        end
      end
def instrument ( name , payload = { } ) @notifier . start ( name , @id , payload ) begin yield rescue Exception => e payload [ :exception ] = [ e . class . name , e . message ] raise e ensure @notifier . finish ( name , @id , payload ) end end
Instrument the given block by measuring the time taken to execute it
and publish it.
Instrument the given block by measuring the time taken to execute it and publish it .
name
<not_specific>
payload
<not_specific>