class HeimdallApm::AgentContext
Global context in which the agent is run. One context is assigned per agent. It contains most of the part that are going to be accessed globally by the rest of the monitoring.
Attributes
config[W]
Global configuration object
Public Instance Methods
config()
click to toggle source
# File lib/heimdall_apm/agent_context.rb, line 30 def config @config ||= ::HeimdallApm::Config.new end
ignored_uris()
click to toggle source
# File lib/heimdall_apm/agent_context.rb, line 50 def ignored_uris @ignored_uris ||= ::HeimdallApm::UriMatcher.new(config.value('ignore')) end
interactive?()
click to toggle source
# File lib/heimdall_apm/agent_context.rb, line 54 def interactive? defined?(::Rails::Console) && $stdout.isatty && $stdin.isatty end
logger()
click to toggle source
# File lib/heimdall_apm/agent_context.rb, line 34 def logger @logger ||= begin logger = Logger.new('log/heimdall_apm.log') logger.level = config['log_level'].presence || :debug logger end end
recorder()
click to toggle source
# File lib/heimdall_apm/agent_context.rb, line 46 def recorder @recorder ||= ::HeimdallApm::Recorder.new end
started!()
click to toggle source
# File lib/heimdall_apm/agent_context.rb, line 18 def started! @started = true end
started?()
click to toggle source
# File lib/heimdall_apm/agent_context.rb, line 26 def started? @started end
stopped!()
click to toggle source
# File lib/heimdall_apm/agent_context.rb, line 22 def stopped! @started = false end
vault()
click to toggle source
# File lib/heimdall_apm/agent_context.rb, line 42 def vault @vault ||= ::HeimdallApm::Vault.new(self) end