Class: Contrast::Agent::Reporting::ReportingEvent Abstract

Inherits:
ReportableHash show all
Defined in:
lib/contrast/agent/reporting/reporting_events/reporting_event.rb

Overview

This class is abstract.

This is the new ReportingEvent class which will include all the needed and mutual information for the new reporting system.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from ReportableHash

#event_json, #to_controlled_hash, #valid?, #validate

Methods included from Components::Logger::InstanceMethods

#cef_logger, #logger

Constructor Details

#initializeReportingEvent

Returns a new instance of ReportingEvent.



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

def initialize
  @event_method ||= :POST # rubocop:disable Lint/DisjunctiveAssignmentInConstructor
  super()
end

Instance Attribute Details

#event_endpointString (readonly)

Returns the endpoint, with host, to which this event should be sent.

Returns:

  • (String)

    the endpoint, with host, to which this event should be sent



18
19
20
# File 'lib/contrast/agent/reporting/reporting_events/reporting_event.rb', line 18

def event_endpoint
  @event_endpoint
end

#event_methodObject (readonly)

Returns the value of attribute event_method.



20
21
22
# File 'lib/contrast/agent/reporting/reporting_events/reporting_event.rb', line 20

def event_method
  @event_method
end

Instance Method Details

#attach_headers(_request) ⇒ Object

Some reports require specific additional headers to be used. To that end, we’ll attach them here, letting each handle their own.

Parameters:

  • _request (Net::HTTPRequest)


31
# File 'lib/contrast/agent/reporting/reporting_events/reporting_event.rb', line 31

def attach_headers _request; end