class TingYun::Instrumentation::Rails::ActionControllerSubscriber
Public Instance Methods
finish(name, id, payload)
click to toggle source
# File lib/ting_yun/instrumentation/support/action_controller_subscriber.rb, line 26 def finish(name, id, payload) #THREAD_LOCAL_ACCESS event = pop_event(id) event.payload.merge!(payload) state = TingYun::Agent::TransactionState.tl_get stop_transaction(state) rescue => e log_notification_error(e, name, 'finish') end
start(name, id, payload)
click to toggle source
# File lib/ting_yun/instrumentation/support/action_controller_subscriber.rb, line 14 def start(name, id, payload) #THREAD_LOCAL_ACCES state = TingYun::Agent::TransactionState.tl_get request = state.current_transaction.request_attributes rescue nil event = ControllerEvent.new(name, Time.now, nil, id, payload, request) push_event(event) # if state.execution_traced? start_transaction(state, event) # end rescue => e log_notification_error(e, name, 'start') end
start_transaction(state, event)
click to toggle source
# File lib/ting_yun/instrumentation/support/action_controller_subscriber.rb, line 39 def start_transaction(state, event) params = TingYun::Instrumentation::Support::ParameterFiltering.flattened_filter_request_parameters(event.payload[:params]) TingYun::Agent::Transaction.start(state, :controller, :request => event.request, :filtered_params => params, :apdex_start_time => event.queue_start, :transaction_name => event.metric_name) end
stop_transaction(state)
click to toggle source
# File lib/ting_yun/instrumentation/support/action_controller_subscriber.rb, line 48 def stop_transaction(state) # txn = state.current_transaction TingYun::Agent::Transaction.stop(state) end