Skip to content

Instantly share code, notes, and snippets.

@benders
Created July 10, 2009 06:29
Show Gist options
  • Select an option

  • Save benders/144278 to your computer and use it in GitHub Desktop.

Select an option

Save benders/144278 to your computer and use it in GitHub Desktop.
Failing strawman for New Relic add_method_tracer
# This doesn't work
class Product < ActiveRecord::Base
# Define a public Class method on Product
def self.get_recommended_for_subscriber(subscriber)
# ... call some web service, then use find to return a product instance ...
end
add_method_tracer :get_recommended_for_subscriber, 'Custom/Product.get_recommended_for_subscriber'
# Instance methods of Product go here
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment