37
38
39
40
41
42
43
44
45
|
# File 'lib/newrelic_security/instrumentation-security/sinatra/instrumentation.rb', line 37
def route_eval_on_enter
NewRelic::Security::Agent.logger.debug "OnEnter : #{self.class}.#{__method__}"
ctxt = NewRelic::Security::Agent::Control::HTTPContext.get_context
ctxt.route = self.env["sinatra.route"].split.join("@") unless ctxt.nil?
rescue => exception
NewRelic::Security::Agent.logger.error "Exception in hook in #{self.class}.#{__method__}, #{exception.inspect}, #{exception.backtrace}"
ensure
yield
end
|