Permalink
Browse files

Merge pull request #21 from loe/master

Correct the ActiveMessaging Instrumentation to actually work
  • Loading branch information...
2 parents 4af710c + ba13e92 commit 4bb17477b0c5bdd7f9a5701624c826c9e637d987 @gnarg gnarg committed Nov 29, 2011
Showing with 6 additions and 8 deletions.
  1. +6 −8 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 4bb1747

Please sign in to comment.