Module: NewRelic::Security::Instrumentation::Padrino::Router

Included in:
Prepend
Defined in:
lib/newrelic_security/instrumentation-security/padrino/chain.rb,
lib/newrelic_security/instrumentation-security/padrino/prepend.rb,
lib/newrelic_security/instrumentation-security/padrino/instrumentation.rb

Defined Under Namespace

Modules: Chain, Prepend

Instance Method Summary collapse

Instance Method Details

#call_on_exit(retval) ⇒ Object



42
43
44
45
46
47
48
49
# File 'lib/newrelic_security/instrumentation-security/padrino/instrumentation.rb', line 42

def call_on_exit(retval)
  NewRelic::Security::Agent.logger.debug "OnExit :  #{self.class}.#{__method__}"
  NewRelic::Security::Agent.agent.error_reporting&.report_unhandled_or_5xx_exceptions(NewRelic::Security::Agent::Control::HTTPContext.get_current_transaction, NewRelic::Security::Agent::Control::HTTPContext.get_context, retval[0])
rescue => exception
  NewRelic::Security::Agent.logger.error "Exception in hook in #{self.class}.#{__method__}, #{exception.inspect}, #{exception.backtrace}"
ensure
  yield
end