Class: Karafka::Instrumentation::Monitor

Inherits:
Core::Monitoring::Monitor
  • Object
show all
Defined in:
lib/karafka/instrumentation/monitor.rb

Overview

Karafka instrumentation monitor that we use to publish events By default uses our internal notifications bus but can be used with ‘ActiveSupport::Notifications` as well

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(notifications_bus = ::Karafka::Instrumentation::Notifications.new, namespace = nil) ⇒ Monitor

Returns a new instance of Monitor.

Parameters:

  • notifications_bus (Object) (defaults to: ::Karafka::Instrumentation::Notifications.new)

    either our internal notifications bus or ‘ActiveSupport::Notifications`

  • namespace (String, nil) (defaults to: nil)

    namespace for events or nil if no namespace



14
15
16
17
18
19
# File 'lib/karafka/instrumentation/monitor.rb', line 14

def initialize(
  notifications_bus = ::Karafka::Instrumentation::Notifications.new,
  namespace = nil
)
  super(notifications_bus, namespace)
end

Instance Attribute Details

#notifications_busObject (readonly)

Returns the value of attribute notifications_bus.



9
10
11
# File 'lib/karafka/instrumentation/monitor.rb', line 9

def notifications_bus
  @notifications_bus
end