Class: Airbrake::Rails::Railties::ActionControllerTie Private

Inherits:
Object
  • Object
show all
Defined in:
lib/airbrake/rails/railties/action_controller_tie.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Ties Airbrake APM (routes) and HTTP clients with Rails.

Since:

  • v13.0.1

Instance Method Summary collapse

Constructor Details

#initializeActionControllerTie

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of ActionControllerTie.

Since:

  • v13.0.1



16
17
18
19
20
21
# File 'lib/airbrake/rails/railties/action_controller_tie.rb', line 16

def initialize
  @route_subscriber = Airbrake::Rails::ActionControllerRouteSubscriber.new
  @notify_subscriber = Airbrake::Rails::ActionControllerNotifySubscriber.new
  @performance_breakdown_subscriber =
    Airbrake::Rails::ActionControllerPerformanceBreakdownSubscriber.new
end

Instance Method Details

#callObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Since:

  • v13.0.1



23
24
25
26
27
28
29
30
31
32
# File 'lib/airbrake/rails/railties/action_controller_tie.rb', line 23

def call
  ActiveSupport.on_load(:action_controller, run_once: true, yield: self) do
    # Patches ActionController with methods that allow us to retrieve
    # interesting request data. Appends that information to notices.
    ::ActionController::Base.include(Airbrake::Rails::ActionController)

    tie_routes_apm
    tie_http_integrations
  end
end