You can enable GC profiling instrumentation in New Relic using one of these calls in your application initialization:
- MRI 1.9.2 or higher:
GC::Profiler.enable
- Ruby Enterprise Edition:
GC.enable_stats
For your Rails application, you can either add this call to an initializer in config/initializers
, or add it directly to your config/application.rb
file.
You can find more information on this at Ruby agent: Garbage collection.