Class: Airbrake::Rails::ActionControllerRouteSubscriber
- Inherits:
-
Object
- Object
- Airbrake::Rails::ActionControllerRouteSubscriber
- Defined in:
- lib/airbrake/rails/action_controller_route_subscriber.rb
Overview
ActionControllerRouteSubscriber sends route stat information, including performance data.
Instance Method Summary collapse
Instance Method Details
#call(*args) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/airbrake/rails/action_controller_route_subscriber.rb', line 13 def call(*args) return unless Airbrake::Config.instance.performance_stats # We don't track routeless events. return unless (routes = Airbrake::Rack::RequestStore[:routes]) event = Airbrake::Rails::Event.new(*args) route = Airbrake::Rails::App.recognize_route( Airbrake::Rack::RequestStore[:request], ) return unless route routes[route.path] = { method: event.method, response_type: event.response_type, groups: {}, } end |