Skip to content
Browse files

Have the ActiveMessaging instrumentation properly inject into ActiveM…

…essaging::Processor.
  • Loading branch information...
1 parent 4af710c commit ba13e923b7d58dbfcabb76b1a6bdca3521890078 @loe committed Nov 29, 2011
Showing with 6 additions and 8 deletions.
  1. +6 −8 lib/rpm_contrib/instrumentation/active_messaging.rb
View
14 lib/rpm_contrib/instrumentation/active_messaging.rb
@@ -1,24 +1,22 @@
-# == ActiveMessaging Instrumentation ==
-# Robert R. Meyer
-# Blue-Dog-Archolite @ GitHub
+# ActiveMessaging Instrumentation
DependencyDetection.defer do
@name = :active_messaging
-
+
depends_on do
defined?(::ActiveMessaging::Processor) && !NewRelic::Control.instance['disable_active_messaging'] &&
!NewRelic::Control.instance['disable_active_mq']
end
-
+
executes do
NewRelic::Agent.logger.debug 'Installing ActiveMessaging instrumentation'
end
executes do
::ActiveMessaging::Processor.class_eval do
- class << self
- add_method_tracer :on_message, 'ActiveMessaging/OnMessage'
- end
+ include NewRelic::Agent::MethodTracer
+
+ add_method_tracer :on_message, 'ActiveMessaging/OnMessage'
end
end
end

0 comments on commit ba13e92

Please sign in to comment.
Something went wrong with that request. Please try again.