I have already looked at how New Relic does that: They do it pretty the 
same way that Robert Klemme described above. You have to change the Ruby 
source code if you want to instrument a method. Here is an example:

require 'new_relic/agent/method_tracer'
class Foo
  include ::NewRelic::Agent::MethodTracer

  def generate_image
    ...
  end

  add_method_tracer :generate_image, 'Custom/generate_image'
end

So this does not help me a lot.

-- 
Posted via http://www.ruby-forum.com/.