class ScoutApm::Debug
Public Class Methods
Public Instance Methods
Source
# File lib/scout_apm/debug.rb, line 14 def call_periodic_hooks @periodic_hooks.each do |hook| begin hook.call rescue => e logger.info("Periodic debug hook failed to run: #{e}\n\t#{e.backtrace.join("\n\t")}") end end rescue # Something went super wrong for the inner rescue to not catch this. Just # swallow the error. The debug tool should never crash the app. end
Source
# File lib/scout_apm/debug.rb, line 10 def register_periodic_hook(&hook) @periodic_hooks << hook end
Private Instance Methods
Source
# File lib/scout_apm/debug.rb, line 33 def logger ScoutApm::Agent.instance.context.logger end