Skip to content

Instantly share code, notes, and snippets.

--type-set=log=.log
--type-add=ruby=.haml
--type-add=objc=.pch
--type-set=xcode=.pbxproj,.pbxuser,.perspectivev3
--type-set=ragel=.rl
--type-set=nib=.xib
--type-set=plist=.plist
--type-set=tmstuff=.tmproj,.tm_build_errors
--nolog
--nonib
class Job
def self.perform_with_newrelic(*args)
NewRelic::Control.instance['forked_job'] = true
perform(*args)
NewRelic::Agent.shutdown
end
end
Index: dispatcher_instrumentation.rb
===================================================================
--- dispatcher_instrumentation.rb (revision 5545)
+++ dispatcher_instrumentation.rb (working copy)
@@ -2,7 +2,8 @@
# We have to patch the mongrel dispatcher live since the classes
# aren't defined when our instrumentation loads
-module NewRelic::DispatcherInstrumentation
export GEM_HOME=$d/jruby/lib/ruby/gems/1.8/gem
export GEM_PATH=$GEM_HOME:/Library/Ruby/Gems/1.8
export PATH=$PATH:$d/jruby/bin:$GEM_HOME/bin
export GEM_HOME=$d/jruby/lib/ruby/gems/1.8/gem
export GEM_PATH=$GEM_HOME:/Library/Ruby/Gems/1.8
export PATH=$PATH:$d/jruby/bin:$GEM_HOME/bin