Class: Contrast::Agent::Telemetry::InputAnalysisEvent
- Inherits:
-
MetricEvent
- Object
- Event
- MetricEvent
- Contrast::Agent::Telemetry::InputAnalysisEvent
- Includes:
- Components::Logger::InstanceMethods
- Defined in:
- lib/contrast/agent/telemetry/input_analysis_event.rb
Overview
Event to report all gather information from the Input Analysis metrics.
Direct Known Subclasses
Constant Summary collapse
- NOT_APPLICABLE =
'n/a'
- NAME =
Override the name for any derived classes
'InputAnalysis event'
- PATH =
Override the path for any derived classes
'/protect_input_analysis'
Instance Attribute Summary collapse
-
#fields ⇒ Object
readonly
Returns the value of attribute fields.
Attributes inherited from Event
Instance Method Summary collapse
-
#empty? ⇒ Boolean
Override the empty check for any derived classes if needed.
-
#initialize(rule_id, rates) ⇒ InputAnalysisEvent
constructor
A new instance of InputAnalysisEvent.
-
#name ⇒ String
Returns the name of the event.
-
#path ⇒ String
Returns the path to report the event.
Methods included from Components::Logger::InstanceMethods
Methods inherited from MetricEvent
#sys_info, #to_controlled_hash
Methods included from Utils::OS
get_system_information, mac?, windows?
Methods included from Components::Scope::InstanceMethods
#contrast_enter_method_scopes!, #contrast_exit_method_scopes!, #with_app_scope, #with_contrast_scope, #with_deserialization_scope, #with_split_scope
Methods inherited from Event
Constructor Details
#initialize(rule_id, rates) ⇒ InputAnalysisEvent
Returns a new instance of InputAnalysisEvent.
26 27 28 29 30 31 |
# File 'lib/contrast/agent/telemetry/input_analysis_event.rb', line 26 def initialize rule_id, rates super() @fields = MetricsHash.new(Integer) (rule_id, rates) generate_fields(rates) end |
Instance Attribute Details
#fields ⇒ Object (readonly)
Returns the value of attribute fields.
17 18 19 |
# File 'lib/contrast/agent/telemetry/input_analysis_event.rb', line 17 def fields @fields end |
Instance Method Details
#empty? ⇒ Boolean
Override the empty check for any derived classes if needed.
48 49 50 |
# File 'lib/contrast/agent/telemetry/input_analysis_event.rb', line 48 def empty? super && Contrast::Utils::DuckUtils.empty_duck?(@tags) end |
#name ⇒ String
Returns the name of the event.
36 37 38 |
# File 'lib/contrast/agent/telemetry/input_analysis_event.rb', line 36 def name cs__class::NAME end |
#path ⇒ String
Returns the path to report the event.
43 44 45 |
# File 'lib/contrast/agent/telemetry/input_analysis_event.rb', line 43 def path cs__class::PATH end |