Tracing ruby code that does a send(method_to_call)

simon's Avatar

simon

28 May, 2010 01:57 AM via web

We have some code which takes a parameter and then dynamically calls another method based on that.

According to the dashboard that method is taking a really long time which seems unlikely because it doesn't do anything other than a regex so I'm presuming that it's actually one of the methods being called that's causing the problem but the method is not being traced.

Is this a bug? Or alternatively can I manually indicated to NewRelic::Agent what the name of the method is e.g

NewRelic::Agent.entering(method) send(method) NewRelic::Agent.exiting(method)

  1. 2 Posted by simon on 28 May, 2010 02:00 AM

    simon's Avatar

    Oh, wait - perform_action_with_newrelic_trace should do what I want, yes?

  2. Support Staff 3 Posted by Bill Kayser on 28 May, 2010 05:44 AM

    Bill Kayser's Avatar

    Simon, yes, that's the method you want.

  3. Bill Kayser resolved this discussion on 28 May, 2010 05:44 AM.

Comments are currently closed for this discussion. You can start a new one.