Module: Appsignal::Integrations::ExconIntegration

Defined in:
lib/appsignal/integrations/excon.rb

Class Method Summary collapse

Class Method Details

.instrument(name, data, &block) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/appsignal/integrations/excon.rb', line 6

def self.instrument(name, data, &block)
  namespace, *event = name.split(".")
  rails_name = [event, namespace].flatten.join(".")

  title =
    if rails_name == "response.excon"
      data[:host]
    else
      "#{data[:method].to_s.upcase} #{data[:scheme]}://#{data[:host]}"
    end
  Appsignal.instrument(rails_name, title, &block)
end