Class: WaterDrop::Instrumentation::Monitor
- Inherits:
-
Dry::Monitor::Notifications
- Object
- Dry::Monitor::Notifications
- WaterDrop::Instrumentation::Monitor
- Defined in:
- lib/waterdrop/instrumentation/monitor.rb
Overview
Note:
This class acts as a singleton because we are only permitted to have single monitor per running process (just as logger)
Monitor is used to hookup external monitoring services to monitor how WaterDrop works Since it is a pub-sub based on dry-monitor, you can use as many subscribers/loggers at the same time, which means that you might have for example file logging and NewRelic at the same time
Instance Method Summary collapse
-
#initialize ⇒ WaterDrop::Instrumentation::Monitor
constructor
Monitor instance for system instrumentation.
Constructor Details
#initialize ⇒ WaterDrop::Instrumentation::Monitor
Returns monitor instance for system instrumentation.
37 38 39 40 |
# File 'lib/waterdrop/instrumentation/monitor.rb', line 37 def initialize super(:waterdrop) EVENTS.each(&method(:register_event)) end |