Module: NewRelic::Security::Instrumentation::ActionDispatch::Routing::RouteSet::Dispatcher
- Included in:
- Prepend
- Defined in:
- lib/newrelic_security/instrumentation-security/rails/chain.rb,
lib/newrelic_security/instrumentation-security/rails/prepend.rb,
lib/newrelic_security/instrumentation-security/rails/instrumentation.rb
Defined Under Namespace
Instance Method Summary collapse
Instance Method Details
#serve_on_enter(req) ⇒ Object
68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/newrelic_security/instrumentation-security/rails/instrumentation.rb', line 68 def serve_on_enter(req) event = nil NewRelic::Security::Agent.logger.debug "OnEnter : #{self.class}.#{__method__}" ctxt = NewRelic::Security::Agent::Control::HTTPContext.get_context ctxt.route = "#{ctxt.method}@#{req.route_uri_pattern.to_s.gsub(/\(\.:format\)/, EMPTY_STRING)}" if ctxt && req.respond_to?(:route_uri_pattern) rescue => exception NewRelic::Security::Agent.logger.error "Exception in hook in #{self.class}.#{__method__}, #{exception.inspect}, #{exception.backtrace}" ensure yield return event end |
#serve_on_exit(event, retval) ⇒ Object
80 81 82 83 84 85 86 |
# File 'lib/newrelic_security/instrumentation-security/rails/instrumentation.rb', line 80 def serve_on_exit(event, retval) NewRelic::Security::Agent.logger.debug "OnExit : #{self.class}.#{__method__}" rescue => exception NewRelic::Security::Agent.logger.error "Exception in hook in #{self.class}.#{__method__}, #{exception.inspect}, #{exception.backtrace}" ensure yield end |