Class: Celerbrake::Rails::Excon Private

Inherits:
Object
  • Object
show all
Defined in:
lib/celerbrake/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/celerbrake/rails/excon_subscriber.rb', line 10

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

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

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

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