Class: Sqreen::Ecosystem::Messaging::Bunny

Inherits:
Object
  • Object
show all
Includes:
Loggable, Sqreen::Ecosystem::ModuleApi::Instrumentation, Sqreen::Ecosystem::ModuleApi::MessageProducer
Defined in:
lib/sqreen/ecosystem/messaging/bunny.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
26
27
# File 'lib/sqreen/ecosystem/messaging/bunny.rb', line 20

def setup
  advice_send = wrap_for_interest(ModuleApi::Tracing::ProducerData, &method(:after_send_advice))
  advice_receive = wrap_for_interest(ModuleApi::Tracing::ConsumerData, &method(:after_receive_advice))
  advice_receive_consumer = wrap_for_interest(ModuleApi::Tracing::ConsumerData, &method(:after_receive_advice_consumer))
  instrument 'Bunny::Queue#publish', after: advice_send
  instrument 'Bunny::Queue#pop',     after: advice_receive
  instrument 'Bunny::Consumer#call', after: advice_receive_consumer
end