Living on the Edge with Rails 4 & Ruby 2

By Posted in Events, New Relic News, Tech Topics, Top Post 24 April 2013

RailsConf 2013 logoRailsConf 2013 is right around the corner! And to celebrate, we’re publishing a series of blog post that highlight what’s new and exciting in the world of New Relic’s Ruby support. Don’t forget to check out the entire series so far: Cross Application Tracing and Thread Profiling.

We want New Relic’s Ruby agent to work best with the latest Ruby libraries and implementation. Sure, we still support Ruby 1.8.6 and Rails 2.0, but most people have moved on. And that’s what we focus on.

Ruby!We were proud to provide Ruby 2.0.0 compatibility from the day it was released, thanks to a pull request from charliesome in Melbourne, Australia. “Ruby 2.0.0 is the first stable release of the Ruby 2.0 series, with many new features and improvements in response to the increasingly diverse and expanding demands for Ruby.

We’ve also kept the agent compatible with Rails 4 development, including rails 4.0.0.beta1. Rails 4 provides updated versions of the ActiveSupport::Notifications Rails 4libraries, which generate a queue of events containing performance timing information. The latest versions of the Ruby agent subscribe to these event streams, allowing us to integrate more seamlessly into the framework and avoid excessive monkey-patching. The highlights for Rails 4 include strong parameters, turbolinks, and Russion doll caching. See the Rails 4 release notes for all the coolness.

Not too long ago, our own Jon Guymon released metriks-reporter-newrelic_rpm for feeding data from Metrik’s API into New Relic. Metriks is a well thought out open source API for measuring aspects of your Ruby app.

We’ve also been investigating the best way to measure the performance of Rails 4 Ajax features like Turbolinks. Ben Weintraub recently pull requested an additional JavaScript event into the Turbolinks gem, and we’ve been experimenting with approaches for monitoring JavaScript and Ajax performance.

See the following for more information on New Relics support for Rails 4 and Ruby 2:

* Come & Get the Latest New Relic Ruby Agent
* Ruby Agent Installation Documentation
* https://github.com/newrelic/rpm/pull/104
* Metrik’s API

Tune in tomorrow for the next blog post in our RailsConf series!

Headed to RailsConf 2013? Stop by our booth to see the New Relic Ruby Agent in action, pick up your free Data Nerd t-shirt and more. You can even try New Relic Pro free for 30 days. For more information, go to newrelic.com/railsconf.

About the author

Sam Goldstein is engineering manager, agents, for New Relic. He manages Browser Application Monitoring team. He's been writing Ruby for almost a decade and is the author of several semi-popular gems, including diffy and timetrap.

Tell us your thoughts Or Send us an internal high five

Talk to @newrelic