Module: Insight::Instrumentation::Probe::ProbeRunner
Instance Method Summary collapse
Methods included from Logging
Methods included from Backstage
Instance Method Details
#probe_run(object, context = "::", kind = :instance, args = [], called_at = , method_name = nil) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/insight/instrumentation/probe.rb', line 13 def probe_run(object, context = "::", kind=:instance, args=[], called_at=caller[1], method_name = nil) if Thread.current['instrumented_backstage'] #warn "probe_run while backstage: #{context}, #{kind}, ##{method_name}" unless method_name.to_sym == :add return yield end instrument = Thread.current['insight.instrument'] result = nil if instrument.nil? backstage do result = yield end else instrument.run(object, context, kind, called_at, method_name, args){ result = yield } end result end |