Class: Airbrake::Rails::Excon Private

Inherits:
Object
  • Object
show all
Defined in:
lib/airbrake/rails/excon_subscriber.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.

Since:

  • v9.2.0

Instance Method Summary collapse

Instance Method Details

#call(*args) ⇒ Object

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:

  • v9.2.0



10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/airbrake/rails/excon_subscriber.rb', line 10

def call(*args)
  return unless Airbrake::Config.instance.performance_stats

  routes = Airbrake::Rack::RequestStore[:routes]
  return if !routes || routes.none?

  event = Airbrake::Rails::Event.new(*args)

  routes.each do |_route_path, params|
    params[:groups][:http] ||= 0
    params[:groups][:http] += event.duration
  end
end