forked from newrelic/rpm_contrib
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Have the ActiveMessaging instrumentation properly inject into ActiveM…
…essaging::Processor.
- Loading branch information
Showing
1 changed file
with
6 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -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 |