Skip to content

Commit

Permalink
Have the ActiveMessaging instrumentation properly inject into ActiveM…
Browse files Browse the repository at this point in the history
…essaging::Processor.
  • Loading branch information
loe committed Nov 29, 2011
1 parent 4af710c commit ba13e92
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions lib/rpm_contrib/instrumentation/active_messaging.rb
@@ -1,24 +1,22 @@
# == ActiveMessaging Instrumentation == # ActiveMessaging Instrumentation
# Robert R. Meyer
# Blue-Dog-Archolite @ GitHub


DependencyDetection.defer do DependencyDetection.defer do
@name = :active_messaging @name = :active_messaging

depends_on do depends_on do
defined?(::ActiveMessaging::Processor) && !NewRelic::Control.instance['disable_active_messaging'] && defined?(::ActiveMessaging::Processor) && !NewRelic::Control.instance['disable_active_messaging'] &&
!NewRelic::Control.instance['disable_active_mq'] !NewRelic::Control.instance['disable_active_mq']
end end

executes do executes do
NewRelic::Agent.logger.debug 'Installing ActiveMessaging instrumentation' NewRelic::Agent.logger.debug 'Installing ActiveMessaging instrumentation'
end end


executes do executes do
::ActiveMessaging::Processor.class_eval do ::ActiveMessaging::Processor.class_eval do
class << self include NewRelic::Agent::MethodTracer
add_method_tracer :on_message, 'ActiveMessaging/OnMessage'
end add_method_tracer :on_message, 'ActiveMessaging/OnMessage'
end end
end end
end end

0 comments on commit ba13e92

Please sign in to comment.