module ScoutApm::Instruments::NetHttpInstrumentationPrepend
Public Instance Methods
Source
# File lib/scout_apm/instruments/net_http.rb, line 62 def request(request, *args, &block) self.class.instrument("HTTP", "request", :ignore_children => true, :desc => request_scout_description(request)) do super(request, *args, &block) end end
Calls superclass method
Source
# File lib/scout_apm/instruments/net_http.rb, line 68 def request_scout_description(req) path = req.path path = path.path if path.respond_to?(:path) # Protect against a nil address value if @address.nil? return "No Address Found" end max_length = ScoutApm::Agent.instance.context.config.value('instrument_http_url_length') (@address + path.split('?').first)[0..(max_length - 1)] rescue "" end