Module: ScoutApm::Instruments::HttpClientInstrumentationPrepend

Defined in:
lib/scout_apm/instruments/http_client.rb

Instance Method Summary collapse

Instance Method Details

#request(*args, &block) ⇒ Object



54
55
56
57
58
59
60
61
62
63
64
# File 'lib/scout_apm/instruments/http_client.rb', line 54

def request(*args, &block)
  method = args[0].to_s
  url = args[1]

  max_length = ScoutApm::Agent.instance.context.config.value('instrument_http_url_length')
  url = url && url.to_s[0..(max_length - 1)]

  self.class.instrument("HTTP", method, :desc => url) do
    super(*args, &block)
  end
end