Module: Rack::Insight::Instrumentation::Probe::ProbeRunner
Instance Method Summary
collapse
Methods included from Logging
logger, verbose, verbosity
Methods included from Backstage
#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/rack/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']
return yield
end
instrument = Thread.current['rack-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
|