Module: FeatherAi::Instrumentation

Defined in:
lib/feather_ai/instrumentation.rb

Overview

Instrumentation hooks for ActiveSupport::Notifications.

Class Method Summary collapse

Class Method Details

.instrument(event_name, payload = {}) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/feather_ai/instrumentation.rb', line 6

def self.instrument(event_name, payload = {}, &)
  if defined?(ActiveSupport::Notifications)
    ActiveSupport::Notifications.instrument(event_name, payload, &)
  else
    yield
  end
end