Module: ScoutApm::Instruments::HTTPInstrumentationPrepend
- Defined in:
- lib/scout_apm/instruments/http.rb
Instance Method Summary collapse
Instance Method Details
#request(verb, uri, opts = {}) ⇒ Object
54 55 56 57 58 |
# File 'lib/scout_apm/instruments/http.rb', line 54 def request(verb, uri, opts = {}) self.class.instrument("HTTP", verb, :ignore_children => true, :desc => request_scout_description(verb, uri)) do super(verb, uri, opts) end end |
#request_scout_description(verb, uri) ⇒ Object
60 61 62 63 64 65 |
# File 'lib/scout_apm/instruments/http.rb', line 60 def request_scout_description(verb, uri) max_length = ScoutApm::Agent.instance.context.config.value('instrument_http_url_length') (String(uri).split('?').first)[0..(max_length - 1)] rescue "" end |