Class: Airbrake::Rails::Railties::ActiveRecordTie Private

Inherits:
Object
  • Object
show all
Defined in:
lib/airbrake/rails/railties/active_record_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 (queries) with Rails.

Since:

  • v13.0.1

Instance Method Summary collapse

Constructor Details

#initializeActiveRecordTie

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 ActiveRecordTie.

Since:

  • v13.0.1



14
15
16
# File 'lib/airbrake/rails/railties/active_record_tie.rb', line 14

def initialize
  @active_record_subscriber = Airbrake::Rails::ActiveRecordSubscriber.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



18
19
20
21
22
23
# File 'lib/airbrake/rails/railties/active_record_tie.rb', line 18

def call
  ActiveSupport.on_load(:active_record, run_once: true, yield: self) do
    tie_activerecord_callback_fix
    tie_activerecord_apm
  end
end