Module: ScoutApm::Instruments::Typhoeus::TyphoeusHydraInstrumentation
- Defined in:
- lib/scout_apm/instruments/typhoeus.rb
Instance Method Summary collapse
Instance Method Details
#run(*args, &block) ⇒ Object
31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/scout_apm/instruments/typhoeus.rb', line 31 def run(*args, &block) layer = ScoutApm::Layer.new("HTTP", "Hydra") layer.desc = scout_desc req = ScoutApm::RequestManager.lookup req.start_layer(layer) begin super(*args, &block) ensure req.stop_layer end end |
#scout_desc ⇒ Object
45 46 47 48 49 |
# File 'lib/scout_apm/instruments/typhoeus.rb', line 45 def scout_desc "#{self.queued_requests.count} requests" rescue "" end |