Exception: Tenax::InstrumentationError

Inherits:
Error
  • Object
show all
Defined in:
lib/tenax/errors.rb

Overview

Raised when a user-supplied instrumentation sink itself raises an exception while emitting an event. Wraps the original error as #cause.

The Runner catches and re-raises sink errors through this class so that broken instrumentation never masquerades as an operational failure of the wrapped block.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(event_name:, original:) ⇒ InstrumentationError

Returns a new instance of InstrumentationError.



112
113
114
115
# File 'lib/tenax/errors.rb', line 112

def initialize(event_name:, original:)
  @event_name = event_name
  super("instrumentation sink raised while emitting #{event_name.inspect}: #{original.class}: #{original.message}")
end

Instance Attribute Details

#event_name ⇒ Object (readonly)

Returns the value of attribute event_name.



110
111
112
# File 'lib/tenax/errors.rb', line 110

def event_name
  @event_name
end