class NewRelic::Agent::Instrumentation::ActionDispatchSubscriber
Constants
- METHOD_NAME_MAPPING
- PATTERN
- UNKNOWN
Public Instance Methods
Source
# File lib/new_relic/agent/instrumentation/action_dispatch_subscriber.rb, line 19 def finish(name, id, payload) return unless state.is_execution_traced? finish_segment(id, payload) rescue => e log_notification_error(e, name, 'finish') end
Source
# File lib/new_relic/agent/instrumentation/action_dispatch_subscriber.rb, line 32 def finish_segment(id, payload) if segment = pop_segment(id) if exception = exception_object(payload) segment.notice_error(exception) end segment.finish end end
Source
# File lib/new_relic/agent/instrumentation/action_dispatch_subscriber.rb, line 58 def method_from_name(name) METHOD_NAME_MAPPING[name] end
Source
# File lib/new_relic/agent/instrumentation/action_dispatch_subscriber.rb, line 41 def metric_name(name, payload) middleware = payload[:middleware] method = method_from_name(name) "Ruby/ActionDispatch/#{middleware}/#{method}" end
Source
# File lib/new_relic/agent/instrumentation/action_dispatch_subscriber.rb, line 11 def start(name, id, payload) return unless state.is_execution_traced? start_segment(name, id, payload) rescue => e log_notification_error(e, name, 'start') end
Source
# File lib/new_relic/agent/instrumentation/action_dispatch_subscriber.rb, line 27 def start_segment(name, id, payload) segment = Tracer.start_segment(name: metric_name(name, payload)) push_segment(id, segment) end