Class: WaterDrop::Instrumentation::ClassNotifications

Inherits:
Karafka::Core::Monitoring::Notifications
  • Object
show all
Defined in:
lib/waterdrop/instrumentation/class_notifications.rb

Overview

Class-level notifications for WaterDrop global instrumentation This only supports events that occur at the class/module level, not per-producer instance

Constant Summary collapse

EVENTS =

List of events that are available at the class level via WaterDrop.instrumentation These are lifecycle events for producer creation and configuration and connection pool lifecycle events

%w[
  producer.created
  producer.configured

  connection_pool.created
  connection_pool.setup
  connection_pool.shutdown
  connection_pool.reload
  connection_pool.reloaded
].freeze

Instance Method Summary collapse

Constructor Details

#initializeWaterDrop::Instrumentation::ClassNotifications

Returns class-level notification instance.



23
24
25
26
# File 'lib/waterdrop/instrumentation/class_notifications.rb', line 23

def initialize
  super
  EVENTS.each { |event| register_event(event) }
end