Class: Rage::Telemetry::SpanResult
- Inherits:
-
Struct
- Object
- Struct
- Rage::Telemetry::SpanResult
- Defined in:
- lib/rage/telemetry/telemetry.rb
Overview
Contains the result of a span execution.
Instance Attribute Summary collapse
-
#exception ⇒ Exception?
readonly
The exception raised during the span execution, if any.
Instance Method Summary collapse
-
#error? ⇒ Boolean
Returns
trueif the span resulted in an error. -
#success? ⇒ Boolean
Returns
trueif the span executed successfully.
Instance Attribute Details
#exception ⇒ Exception? (readonly)
Returns The exception raised during the span execution, if any.
127 128 129 130 131 132 133 134 135 136 137 |
# File 'lib/rage/telemetry/telemetry.rb', line 127 SpanResult = Struct.new(:exception) do # Returns `true` if the span resulted in an error. def error? !!exception end # Returns `true` if the span executed successfully. def success? !error? end end |
Instance Method Details
#error? ⇒ Boolean
Returns true if the span resulted in an error.
129 130 131 |
# File 'lib/rage/telemetry/telemetry.rb', line 129 def error? !!exception end |
#success? ⇒ Boolean
Returns true if the span executed successfully.
134 135 136 |
# File 'lib/rage/telemetry/telemetry.rb', line 134 def success? !error? end |