Module: Eventboss::Instrumentation::NewRelic

Defined in:
lib/eventboss/instrumentation.rb

Overview

:nodoc:

Class Method Summary collapse

Class Method Details

.install(queue_listeners) ⇒ Object



11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/eventboss/instrumentation.rb', line 11

def self.install(queue_listeners)
  Eventboss.logger.info('Loaded NewRelic instrumentation')
  queue_listeners.each_value do |listener_class|
    listener_class.include(::NewRelic::Agent::Instrumentation::ControllerInstrumentation)
    listener_class.add_transaction_tracer(:receive, category: 'OtherTransaction/EventbossJob')
  end

  Eventboss::Sender.include(::NewRelic::Agent::MethodTracer)
  Eventboss::Sender.add_method_tracer(:send_batch, 'Eventboss/sender_send_batch')

  Eventboss::Publisher.include(::NewRelic::Agent::MethodTracer)
  Eventboss::Publisher.add_method_tracer(:publish, 'Eventboss/publisher_publish')
end