Skip to content

Commit

Permalink
Merge pull request newrelic#21 from loe/master
Browse files Browse the repository at this point in the history
Correct the ActiveMessaging Instrumentation to actually work
  • Loading branch information
gnarg committed Nov 29, 2011
2 parents 4af710c + ba13e92 commit 4bb1747
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 ==
# 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.