Class: Karafka::Processing::InlineInsights::Listener

Inherits:
Object
  • Object
show all
Defined in:
lib/karafka/processing/inline_insights/listener.rb

Overview

Listener that adds statistics to our inline tracker

Instance Method Summary collapse

Instance Method Details

#on_statistics_emitted(event) ⇒ Object

Adds statistics to the tracker

Parameters:

  • event (Karafka::Core::Monitoring::Event)

    event with statistics



10
11
12
13
14
15
# File 'lib/karafka/processing/inline_insights/listener.rb', line 10

def on_statistics_emitted(event)
  Tracker.add(
    event[:consumer_group_id],
    event[:statistics]
  )
end