Class: Sqreen::Ecosystem::Messaging::Kafka

Inherits:
Object
  • Object
show all
Includes:
Loggable, Sqreen::Ecosystem::ModuleApi::Instrumentation, Sqreen::Ecosystem::ModuleApi::MessageProducer
Defined in:
lib/sqreen/ecosystem/messaging/kafka.rb

Instance Attribute Summary

Attributes included from Sqreen::Ecosystem::ModuleApi::MessageProducer

#tracing_broker

Instance Method Summary collapse

Methods included from Sqreen::Ecosystem::ModuleApi::Instrumentation

included

Instance Method Details

#setupObject



20
21
22
23
24
25
# File 'lib/sqreen/ecosystem/messaging/kafka.rb', line 20

def setup
  advice_send = wrap_for_interest(ModuleApi::Tracing::ProducerData, &method(:after_send))
  advice_receive = wrap_for_interest(ModuleApi::Tracing::ConsumerData, &method(:after_receive))
  instrument 'Kafka::Broker#produce',        after: advice_send
  instrument 'Kafka::Broker#fetch_messages', after: advice_receive
end