Class: Contrast::Agent::Reporting::ReportingEvent Abstract
- Inherits:
-
ReportableHash
- Object
- ReportableHash
- Contrast::Agent::Reporting::ReportingEvent
- Defined in:
- lib/contrast/agent/reporting/reporting_events/reporting_event.rb
Overview
This is the new ReportingEvent class which will include all the needed and mutual information for the new reporting system.
Direct Known Subclasses
AgentEffectiveConfig, ApplicationDefendActivity, ApplicationReportingEvent, FindingEventStack, ServerReportingEvent
Instance Attribute Summary collapse
-
#event_endpoint ⇒ String
readonly
The endpoint, with host, to which this event should be sent.
-
#event_method ⇒ Object
readonly
Returns the value of attribute event_method.
Instance Method Summary collapse
-
#attach_headers(_request) ⇒ Object
Some reports require specific additional headers to be used.
-
#initialize ⇒ ReportingEvent
constructor
A new instance of ReportingEvent.
Methods inherited from ReportableHash
#event_json, #to_controlled_hash, #valid?, #validate
Methods included from Components::Logger::InstanceMethods
Constructor Details
#initialize ⇒ ReportingEvent
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_endpoint ⇒ String (readonly)
Returns 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_method ⇒ Object (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.
31 |
# File 'lib/contrast/agent/reporting/reporting_events/reporting_event.rb', line 31 def attach_headers _request; end |