Class: Contrast::Agent::Reporting::AgentEffectiveConfig

Inherits:
ReportingEvent show all
Defined in:
lib/contrast/agent/reporting/reporting_events/agent_effective_config.rb

Overview

AgentStartup Event which sends the agent data to TeamServer on the startup of a server or process, used to create a new Server entity there.

Instance Attribute Summary

Attributes inherited from ReportingEvent

#event_endpoint, #event_method

Instance Method Summary collapse

Methods inherited from ReportingEvent

#attach_headers

Methods inherited from ReportableHash

#event_json, #valid?, #validate

Methods included from Components::Logger::InstanceMethods

#cef_logger, #logger

Constructor Details

#initialize(diagnostics) ⇒ AgentEffectiveConfig

Returns a new instance of AgentEffectiveConfig.

Parameters:

  • diagnostics (Contrast::Agent::DiagnosticsConfig::Diagnostics)

    current diagnostics



14
15
16
17
18
19
20
# File 'lib/contrast/agent/reporting/reporting_events/agent_effective_config.rb', line 14

def initialize diagnostics
  @event_method = :PUT
  @event_endpoint = Contrast::Agent::Reporting::Endpoints.effective_config
  @event_type = :effective_config
  @diagnostics = diagnostics
  super()
end

Instance Method Details

#file_nameObject



22
23
24
# File 'lib/contrast/agent/reporting/reporting_events/agent_effective_config.rb', line 22

def file_name
  'agent-effective-config'
end

#to_controlled_hashObject



26
27
28
# File 'lib/contrast/agent/reporting/reporting_events/agent_effective_config.rb', line 26

def to_controlled_hash
  @diagnostics.to_controlled_hash
end