class NewRelic::Agent::Instrumentation::ActionViewSubscriber
Public Instance Methods
finish(name, id, payload)
click to toggle source
# File lib/new_relic/agent/instrumentation/action_view_subscriber.rb, line 25 def finish(name, id, payload) #THREAD_LOCAL_ACCESS event = pop_event(id) state = NewRelic::Agent::TransactionState.tl_get if state.is_execution_traced? && event.recordable? stack = state.traced_method_stack frame = stack.pop_frame(state, event.frame, event.metric_name, event.end) record_metrics(event, frame) end rescue => e log_notification_error(e, name, 'finish') end
record_metrics(event, frame)
click to toggle source
# File lib/new_relic/agent/instrumentation/action_view_subscriber.rb, line 39 def record_metrics(event, frame) #THREAD_LOCAL_ACCESS exclusive = event.duration - frame.children_time NewRelic::Agent.instance.stats_engine.tl_record_scoped_and_unscoped_metrics( event.metric_name, nil, event.duration, exclusive) end
start(name, id, payload)
click to toggle source
# File lib/new_relic/agent/instrumentation/action_view_subscriber.rb, line 11 def start(name, id, payload) #THREAD_LOCAL_ACCESS event = RenderEvent.new(name, Time.now, nil, id, payload) push_event(event) state = NewRelic::Agent::TransactionState.tl_get if state.is_execution_traced? && event.recordable? stack = state.traced_method_stack event.frame = stack.push_frame(state, :action_view, event.time) end rescue => e log_notification_error(e, name, 'start') end