Class: HeimdallApm::AgentContext
- Inherits:
-
Object
- Object
- HeimdallApm::AgentContext
- 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
- #interactive? ⇒ Boolean
- #recorder ⇒ Object
- #started! ⇒ Object
- #started? ⇒ Boolean
- #stopped! ⇒ Object
- #vault ⇒ Object
Instance Attribute Details
#config ⇒ Object
26 27 28 |
# File 'lib/heimdall_apm/agent_context.rb', line 26 def config @config ||= ::HeimdallApm::Config.new end |
Instance Method Details
#interactive? ⇒ Boolean
38 39 40 |
# File 'lib/heimdall_apm/agent_context.rb', line 38 def interactive? defined?(::Rails::Console) && $stdout.isatty && $stdin.isatty end |
#recorder ⇒ Object
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
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 |
#vault ⇒ Object
30 31 32 |
# File 'lib/heimdall_apm/agent_context.rb', line 30 def vault @vault ||= ::HeimdallApm::Vault.new(self) end |