Class: Promenade::Waterdrop::StatisticsSubscriber

Inherits:
Subscriber
  • Object
show all
Defined in:
lib/promenade/waterdrop/statistics_subscriber.rb

Instance Method Summary collapse

Instance Method Details

#emitted(event) ⇒ Object



44
45
46
47
48
49
50
# File 'lib/promenade/waterdrop/statistics_subscriber.rb', line 44

def emitted(event)
  statistics = event.payload[:statistics].with_indifferent_access
  labels = get_labels(statistics)

  report_root_metrics(statistics, labels)
  report_broker_metrics(statistics[:brokers], labels)
end