Sha256: ca533ecc24dc68f827106f8ba80d48516d2848f49391bbf1a6f5adab88a82b53
Contents?: true
Size: 859 Bytes
Versions: 10
Compression:
Stored size: 859 Bytes
Contents
# frozen_string_literal: true require 'airbrake/rails/event' require 'airbrake/rails/app' module Airbrake module Rails # ActionControllerRouteSubscriber sends route stat information, including # performance data. # # @since v8.0.0 class ActionControllerRouteSubscriber 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 end end end
Version data entries
10 entries across 10 versions & 1 rubygems