Class: HeimdallApm::AgentContext

Inherits:
Object
  • Object
show all
Defined in:
lib/heimdall_apm/agent_context.rb

Overview

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.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#configObject



26
27
28
# File 'lib/heimdall_apm/agent_context.rb', line 26

def config
  @config ||= ::HeimdallApm::Config.new
end

Instance Method Details

#interactive?Boolean

Returns:

  • (Boolean)


38
39
40
# File 'lib/heimdall_apm/agent_context.rb', line 38

def interactive?
  defined?(::Rails::Console) && $stdout.isatty && $stdin.isatty
end

#recorderObject



34
35
36
# File 'lib/heimdall_apm/agent_context.rb', line 34

def recorder
  @recorder ||= ::HeimdallApm::Recorder.new
end

#started!Object



14
15
16
# File 'lib/heimdall_apm/agent_context.rb', line 14

def started!
  @started = true
end

#started?Boolean

Returns:

  • (Boolean)


22
23
24
# File 'lib/heimdall_apm/agent_context.rb', line 22

def started?
  @started
end

#stopped!Object



18
19
20
# File 'lib/heimdall_apm/agent_context.rb', line 18

def stopped!
  @started = false
end

#vaultObject



30
31
32
# File 'lib/heimdall_apm/agent_context.rb', line 30

def vault
  @vault ||= ::HeimdallApm::Vault.new(self)
end