Class: Contrast::Agent::Telemetry::Exception::Event
- Defined in:
- lib/contrast/agent/telemetry/exception/event.rb
Overview
This class will hold the basic information for a Parent Telemetry Exception Event
Instance Attribute Summary collapse
-
#exceptions ⇒ Array<Contrast::Agent::Telemetry::Exception::Message>
readonly
Array of Telemetry Exceptions.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(message) ⇒ Event
constructor
Initialization of the Parent Event requires us to require the exception to be created.
-
#push(message) ⇒ Object
@raise.
- #to_controlled_hash ⇒ Object
Constructor Details
#initialize(message) ⇒ Event
Initialization of the Parent Event requires us to require the exception to be created
22 23 24 25 26 |
# File 'lib/contrast/agent/telemetry/exception/event.rb', line 22 def initialize super() validate_class(, Contrast::Agent::Telemetry::Exception::Message, 'exception_message') @exceptions = Array.new(1, ) end |
Instance Attribute Details
#exceptions ⇒ Array<Contrast::Agent::Telemetry::Exception::Message> (readonly)
Array of Telemetry Exceptions
15 16 17 |
# File 'lib/contrast/agent/telemetry/exception/event.rb', line 15 def exceptions @exceptions end |
Class Method Details
.path ⇒ Object
35 36 37 |
# File 'lib/contrast/agent/telemetry/exception/event.rb', line 35 def self.path '/error' end |
Instance Method Details
#push(message) ⇒ Object
30 31 32 33 |
# File 'lib/contrast/agent/telemetry/exception/event.rb', line 30 def push validate_class(, Contrast::Agent::Telemetry::Exception::Message, 'exception_message') @exceptions << end |
#to_controlled_hash ⇒ Object
39 40 41 |
# File 'lib/contrast/agent/telemetry/exception/event.rb', line 39 def to_controlled_hash exceptions.map(&:to_controlled_hash) end |