Class: Karafka::Instrumentation::ProctitleListener

Inherits:
Object
  • Object
show all
Defined in:
lib/karafka/instrumentation/proctitle_listener.rb

Overview

Listener that sets a proc title with a nice descriptive value

Instance Method Summary collapse

Instance Method Details

#on_app_initializing(_event) ⇒ Object

Updates proc title to an initializing one

Parameters:

  • _event (Dry::Events::Event)

    event details including payload



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

def on_app_initializing(_event)
  setproctitle('initializing')
end

#on_app_running(_event) ⇒ Object

Updates proc title to a running one

Parameters:

  • _event (Dry::Events::Event)

    event details including payload



15
16
17
# File 'lib/karafka/instrumentation/proctitle_listener.rb', line 15

def on_app_running(_event)
  setproctitle('running')
end

#on_app_stopping(_event) ⇒ Object

Updates proc title to a stopping one

Parameters:

  • _event (Dry::Events::Event)

    event details including payload



21
22
23
# File 'lib/karafka/instrumentation/proctitle_listener.rb', line 21

def on_app_stopping(_event)
  setproctitle('stopping')
end