Ruby Release Notes

Ruby Agent Release Notes

Tuesday, April 22, 2014 - 17:08
End of Life

The end-of-life date for this agent version is July 29, 2019. To update to the latest agent version, see Update the agent. For more information, see End-of-life policy.

Notes

  • Better support for forking and daemonizing dispatchers (e.g. Puma, Unicorn)

    The agent should now work out-of-the box with no special configuration on servers that fork or daemonize themselves (such as Unicorn or Puma in some configurations). The agent's background thread will be automatically restarted after the first transaction processed within each child process.

    This change means it's no longer necessary to set the 'restart_thread_in_children setting' in your agent configuration file if you were doing so previously.

  • Rails 4.1 support

    Rails 4.1 has shipped, and the Ruby agent is ready for it! We've been running our test suites against the release candidates with no significant issues, so we're happy to announce full compatibility with this new release of Rails.

  • Ruby VM measurements

    The Ruby agent now records more detailed information about the performance and behavior of the Ruby VM, mainly focused around Ruby's garbage collector. This information is exposed on the new 'Ruby VM' tab in the UI. For details about what is recorded, see:

    http://docs.newrelic.com/docs/ruby/ruby-vm-stats

  • Separate in-transaction GC timings for web and background processes

    Previously, an application with GC instrumentation enabled, and both web and background processes reporting in to it would show an overly inflated GC band on the application overview graph, because data from both web and non-web transactions would be included. This has been fixed, and GC time during web and non-web transactions is now tracked separately.

  • More accurate GC measurements on multi-threaded web servers

    The agent could previously have reported inaccurate GC times on multi-threaded web servers such as Puma. It will now correctly report GC timings in multi-threaded contexts.

  • Improved ActiveMerchant instrumentation

    The agent will now trace the store, unstore, and update methods on ActiveMerchant gateways. In addition, a bug preventing ActiveMerchant instrumentation from working on Ruby 1.9+ has been fixed.

    Thanks to Troex Nevelin for the contribution!

  • More robust Real User Monitoring script injection with charset meta tags

    Previous versions of the agent with Real User Monitoring enabled could have injected JavaScript code into the page above a charset meta tag. By the HTML5 spec, the charset tag must appear in the first 1024 bytes of the page, so the Ruby agent will now attempt to inject RUM script after a charset tag, if one is present.

  • More robust connection sequence with New Relic servers

    A rare bug that could cause the agent's initial connection handshake with New Relic servers to silently fail has been fixed, and better logging has been added to the related code path to ease diagnosis of any future issues.

  • Prevent over-counting of queue time with nested transactions

    When using add_transaction_tracer on methods called from within a Rails or Sinatra action, it was previously possible to get inflated queue time measurements, because queue time would be recorded for both the outer transaction (the Rails or Sinatra action) and the inner transaction (the method given to add_transaction_tracer). This has been fixed, so only the outermost transaction will now record queue time.

Tuesday, March 11, 2014 - 10:46
End of Life

The end-of-life date for this agent version is July 29, 2019. To update to the latest agent version, see Update the agent. For more information, see End-of-life policy.

Notes

  • Fix for Puma 2.8.0 cluster mode (3.7.3.204)

    Puma's 2.8.0 release renamed a hook New Relic used to support Puma's cluster mode. This resulted in missing data for users running Puma. Thanks Benjamin Kudria for the fix!

  • Fix for deployment command bug (3.7.3.204)

    Problems with file loading order could result in newrelic deployments failing with an unrecognized command error. This has been fixed.

Wednesday, March 5, 2014 - 10:09
End of Life

The end-of-life date for this agent version is July 29, 2019. To update to the latest agent version, see Update the agent. For more information, see End-of-life policy.

Notes

  • Obfuscation for PostgreSQL explain plans

    Fixes an agent bug with PostgreSQL where parameters from the original query could appear in explain plans sent to New Relic servers, even when SQL obfuscation was enabled. Parameters from the query are now masked in explain plans prior to transmission when transaction_tracer.record_sql is set to 'obfuscated' (the default setting).

    For more information, see: https://docs.newrelic.com/docs/traces/security-for-postgresql-explain-plans

  • More accurate categorization of SQL statements

    Some SQL SELECT statements that were previously being mis-categorized as 'SQL - OTHER' will now correctly be tagged as 'SQL - SELECT'. This particularly affected ActiveRecord users using PostgreSQL.

  • More reliable Typhoeus instrumentation

    Fixed an issue where an exception raised from a user-specified on_complete block would cause our Typhoeus instrumentation to fail to record the request.

Tuesday, February 18, 2014 - 10:17
End of Life

The end-of-life date for this agent version is July 29, 2019. To update to the latest agent version, see Update the agent. For more information, see End-of-life policy.

Notes

  • Update gem signing cert (3.7.2.195)

    The certificate used to sign newrelic_rpm expired in February. This patch updates that for clients installing with verification.

Wednesday, February 5, 2014 - 09:58
End of Life

The end-of-life date for this agent version is July 29, 2019. To update to the latest agent version, see Update the agent. For more information, see End-of-life policy.

Notes

  • Mongo instrumentation improvements

    Users of the 'mongo' MongoDB client gem will get more detailed instrumentation including support for some operations that were not previously captured, and separation of aggregate metrics for web transactions from background jobs.

    An issue with ensure_index when passed a symbol or string was also fixed. Thanks Maxime RETY for the report!

  • More accurate error tracing in Rails 4

    Traced errors in Rails 4 applications will now be correctly associated with the transaction they occurred in, and custom attributes attached to the transaction will be correctly attached to the traced error as well.

  • More accurate partial-rendering metrics for Rails 4

    View partials are now correctly treated as sub-components of the containing template render in Rails 4 applications, meaning that the app server breakdown graphs for Rails 4 transactions should be more accurate and useful.

  • Improved Unicorn 4.8.0 compatibility

    A rare issue that could lead to spurrious traced errors on app startup for applications using Unicorn 4.8.0 has been fixed.

  • meta_request gem compatibility

    An incompatibility with the meta_request gem has been fixed.

  • Typhoeus 0.6.4+ compatibility

    A potential crash with Typhoeus 0.6.4+ when passing a URI object instead of a String instance to one of Typhoeus's HTTP request methods has been fixed.

  • Sequel single threaded mode fix

    The agent will no longer attempt to run EXPLAIN queries for slow SQL statements issued using the Sequel gem in single-threaded mode, since doing so could potentially cause crashes.

  • Additional functionality for add_custom_parameters

    Calling add_custom_parameters adds parameters to the system codenamed Rubicon. For more information, see http://newrelic.com/software-analytics

Monday, January 20, 2014 - 17:04
End of Life

The end-of-life date for this agent version is July 29, 2019. To update to the latest agent version, see Update the agent. For more information, see End-of-life policy.

Notes

  • Correct first reported metric timespan for forking dispatchers (3.7.1.188)

    The first time a newly-forked process (in some configurations) reported metric data, it would use the startup time of the parent process as the start time for that metric data instead of its own start time. This has been fixed.

Tuesday, December 31, 2013 - 16:08
End of Life

The end-of-life date for this agent version is July 29, 2019. To update to the latest agent version, see Update the agent. For more information, see End-of-life policy.

Notes

  • Fix for Mongo ensure_index instrumentation (3.7.1.182)

    The Mongo instrumentation for ensure_index in 3.7.1.180 was not properly calling through to the uninstrumented version of this method. This has been fixed in 3.7.1.182. Thanks to Yuki Miyauchi for the fix!

Friday, December 20, 2013 - 09:15
End of Life

The end-of-life date for this agent version is July 29, 2019. To update to the latest agent version, see Update the agent. For more information, see End-of-life policy.

Notes

  • MongoDB support

    The Ruby agent provides support for the mongo gem, versions 1.8 and 1.9! Mongo calls are captured for transaction traces along with their parameters, and time spent in Mongo shows up on the Database tab.

    Support for more Mongo gems and more UI goodness will be coming, so watch http://docs.newrelic.com/docs/ruby/mongo for up-to-date status.

  • Harvest thread restarts for forked and daemonized processes

    Historically framework specific code was necessary for the Ruby agent to successfully report data after an app forked or daemonized. Gems or scripts with daemonizing modes had to wait for agent support or find workarounds.

    With 3.7.1 setting restart_thread_in_children: true in your newrelic.yml automatically restarts the agent in child processes without requiring custom code. For now the feature is opt-in, but future releases may default it on.

  • Fix for missing HTTP time

    The agent previously did not include connection establishment time for outgoing Net::HTTP requests. This has been corrected, and reported HTTP timings should now be more accurate.

Thursday, December 5, 2013 - 14:26
End of Life

The end-of-life date for this agent version is July 29, 2019. To update to the latest agent version, see Update the agent. For more information, see End-of-life policy.

Notes

  • Official Rubinius support (for Rubinius >= 2.2.1)

    We're happy to say that all known issues with the Ruby agent running on Rubinius have been resolved as of Rubinius version 2.2.1! See New Relic on Rubinius for the most up-to-date status.

  • RUM injection updates

    The Ruby agent's code for both automatic and manual injection of Real User Monitoring scripts has been improved. No application changes are required, but the new injection logic is simpler, faster, more robust, and paves the way for future improvements to Real User Monitoring.

  • More robust communication with New Relic

    Failures when transmitting data to New Relic could cause data to be held over unnecessarily to a later harvest. This has been improved both to handle errors more robustly and consistently, and to send data as soon as possible.

  • Fix for agent not restarting on server-side config changes

    A bug in 3.6.9 caused the agent to not reset correctly after server-side config changes. New settings would not be received without a full process restart. This has been fixed.

  • Blacklisting rake spec tasks

    A blacklist helps the agent avoid starting during rake tasks. Some default RSpec tasks were missing. Thanks for the contribution Kohei Hasegawa!

Thursday, November 7, 2013 - 11:30
End of Life

The end-of-life date for this agent version is July 29, 2019. To update to the latest agent version, see Update the agent. For more information, see End-of-life policy.

Notes

  • Experimental Rubinius 2.x support

    The agent is now being tested against the latest version of Rubinius. While support is still considered experimental, you can track the progress at https://docs.newrelic.com/docs/ruby/rubinius for up to date status.

  • Capture arguments for Resque and Sidekiq jobs

    The agent can optionally record arguments for your Resque and Sidekiq jobs on transaction traces and traced errors. This is disabled by default, but may be enabled by setting resque.capture_params or sidekiq.capture_params.

    Thanks to Juan Ignacio Pumarino, Ken Mayer, Paul Henry, and Eric Saxby for their help with this feature!

  • Supported versions rake task and documentation

    We've improved our documentation for what Ruby and gem versions we support. Run rake newrelic:supported_versions or see the latest agent's versions at https://docs.newrelic.com/docs/ruby/supported-frameworks.

  • ActiveRecord 4.0 explain plans for JRuby and Rubinius

    The agent's ActiveRecord 4.0 instrumentation could not gather SQL explain plans on JRuby by default because of a dependency on ObjectSpace, which isn't available by default. This has been fixed.

  • Fix for Curb http_put_with_newrelic

    A bug in the agent caused PUT calls in the Curb gem to crash. This has been fixed. Thanks to Michael D'Auria and Kirk Diggler for the contributions!

  • Fix for head position on RUM injection

    Certain unusual HTML documents resulted in browser monitoring injecting incorrect content. Thanks Alex McHale for the contribution!

  • Specify the Content-Type header in developer mode

    Thanks Jared Ning for the contribution!

Saturday, October 19, 2013 - 13:03
End of Life

The end-of-life date for this agent version is July 29, 2019. To update to the latest agent version, see Update the agent. For more information, see End-of-life policy.

Notes

  • Percentiles and Histograms

    The Ruby Agent now captures data that provides percentile and histogram views in the New Relic UI.

  • Missing Resque transaction traces

    A bug in 3.6.8.164 prevented transaction traces in Resque jobs from being communicated back to New Relic. 3.6.8.168 fixes this.

  • Retry on initial connect.

    Failure to contact New Relic on agent start-up would not properly retry. This has been fixed.

  • Fix potential memory leak on failure to send to New Relic.

    3.6.8.164 introduced a potential memory leak when transmission of some kinds of data to New Relic servers failed. 3.6.8.168 fixes this.

Wednesday, October 9, 2013 - 10:47
End of Life

The end-of-life date for this agent version is July 29, 2019. To update to the latest agent version, see Update the agent. For more information, see End-of-life policy.

Notes

  • X-Ray Sessions support

    X-Ray Sessions provide more targeted transaction trace samples and thread profiling for web transactions. For full details see our X-Ray sessions documentation at https://newrelic.com/docs/site/xray-sessions.

  • CPU metrics re-enabled for JRuby >= 1.7.0

    To work around a JRuby bug, the Ruby agent stopped gathering CPU metrics on that platform. With the bug fixed, the agent can gather those metrics again. Thanks Bram de Vries for the contribution!

Monday, September 23, 2013 - 22:00
End of Life

The end-of-life date for this agent version is July 29, 2019. To update to the latest agent version, see Update the agent. For more information, see End-of-life policy.

Notes

  • Additional locking option for Resque

    There have been reports of worker process deadlocks in Resque when using the Ruby agent. An optional lock is now available to avoid those deadlocks. See https://newrelic.com/docs/ruby/resque-instrumentation for more details.

  • HTTP connection setup timeout

    HTTP initialization in the agent lacked an appropriate timeout, leading to dropouts in reporting under certain network error conditions.

  • Unnecessary requests from Resque jobs

    An issue causing Resque jobs to unnecessarily make requests against New Relic servers was fixed.

Monday, September 9, 2013 - 10:15
End of Life

The end-of-life date for this agent version is July 29, 2019. To update to the latest agent version, see Update the agent. For more information, see End-of-life policy.

Notes

  • Resque-pool support

    Resque processes started via the resque-pool gem weren't recognized by the Ruby agent. The agent now starts correctly in those worker processes.

  • Environment-based configuration

    All settings in newrelic.yml can now be configured via environment variables. See https://newrelic.com/docs/ruby/ruby-agent-configuration for full details.

  • Fix compatibility issues with excon and curb instrumentation

    This release of the agent fixes a warning seen under certain circumstances with the excon gem (most notably, when excon was used by fog), as well as a bug with the curb instrumentation that conflicted with the feedzirra gem.

  • Allow license key to be set by Capistrano variables

    A license key can be passed via a Capistrano variable where previously it could only be in newrelic.yml. Thanks Chris Marshall for the contribution!

  • Make HTTP client instrumentation aware of "Host" request header

    If a "Host" header is set explicitly on an HTTP request, that hostname will be used for external metrics. Thanks Mislav Marohnić for the contribution!

  • Fix ActiveSupport::Concern warnings with MethodTracer

    Including NewRelic::Agent::MethodTracer in a class using Concerns could cause deprecation warnings. Thanks Mike Połtyn for the contribution!

  • Fix Authlogic constant name

    Code checking for the Authlogic module was using in the wrong case. Thanks Dharam Gollapudi for the contribution!

Thursday, July 25, 2013 - 10:46
End of Life

The end-of-life date for this agent version is July 29, 2019. To update to the latest agent version, see Update the agent. For more information, see End-of-life policy.

Notes

  • HTTPClient and Curb support

    The Ruby agent now supports the HTTPClient and Curb HTTP libraries! Cross application tracing and more is fully supported for these libraries. For more details see https://newrelic.com/docs/ruby/ruby-http-clients.

  • Sinatra startup improvements

    In earlier agent versions, newrelic_rpm had to be required after Sinatra to get instrumentation. Now the agent should start when your Sinatra app starts up in rackup, thin, unicorn, or similar web servers.

  • Puma clustered mode support

    Clustered mode in Puma was not reporting data without manually adding a hook to Puma's configuration. The agent will now automatically add this hook.

  • SSL certificate verification

    Early versions of the agent's SSL support provided an option to skip certificate verification. This option has been removed.

Thursday, June 27, 2013 - 20:57
End of Life

The end-of-life date for this agent version is July 29, 2019. To update to the latest agent version, see Update the agent. For more information, see End-of-life policy.

Notes

  • Rails 4.0 Support

    The Ruby agent is all set for the recent general release of Rails 4.0! We've been tracking the RC's, and that work paid off. Versions 3.6.5 and 3.6.4 of the Ruby agent should work fine with Rails 4.0.0.

  • Excon and Typhoeus support

    The Ruby agent now supports the Excon and Typhoeus HTTP libraries! For more details see https://newrelic.com/docs/ruby/ruby-http-clients.

Tuesday, June 18, 2013 - 08:59
End of Life

The end-of-life date for this agent version is July 29, 2019. To update to the latest agent version, see Update the agent. For more information, see End-of-life policy.

Notes

  • Exception Whitelist

    We've improved exception message handling for applications running in high security mode. Enabling 'high_security' now removes exception messages entirely rather than simply obfuscating any SQL.

    By default this feature affects all exceptions, though you can configure a whitelist of exceptions whose messages should be left intact.

    More details: https://newrelic.com/docs/ruby/ruby-agent-configuration

  • Fix a race condition affecting some Rails applications at startup

    Some Rails applications using newrelic_rpm were affected by a race condition at startup that manifested as an error when model classes with associations were first loaded. The cause of these errors has been addressed by moving the generation of the agent's EnvironmentReport on startup from a background thread to the main thread.

Thursday, May 30, 2013 - 13:09
End of Life

The end-of-life date for this agent version is July 29, 2019. To update to the latest agent version, see Update the agent. For more information, see End-of-life policy.

Notes

  • Better Sinatra Support

    A number of improvements have been made to our Sinatra instrumentation. More details: https://newrelic.com/docs/ruby/sinatra-support-in-the-ruby-agent

    Sinatra instrumentation has been updated to more accurately reflect the final route that was actually executed, taking pass and conditions into account.

    New Relic middlewares for error collection, real user monitoring, and cross application tracing are automatically inserted into the middleware stack.

    Ignoring routes, similar to functionality available to Rails controllers, is now available in Sinatra as well.

    Routes in 1.4 are properly formatting in transaction names. Thanks Zachary Anker for the contribution!

  • Padrino Support

    Along with improving our support of Sinatra, we've also extended that to supporting Padrino, a framework that builds on Sinatra. Web transactions should show up in New Relic now for Padrino apps automatically. The agent has been tested against the latest Padrino in versions 0.11.x and 0.10.x.

  • Main overview graph only shows web transactions

    In the past database times from background jobs mixed with other web transaction metrics in the main overview graph. This often skewed graphs. A common workaround was to send background jobs to a separate application, but that should no longer be necessary as the overview graphs now only represent web transactions.

Thursday, May 9, 2013 - 12:21
End of Life

The end-of-life date for this agent version is July 29, 2019. To update to the latest agent version, see Update the agent. For more information, see End-of-life policy.

Notes

  • Sequel support

    The Ruby agent now supports Sequel, a database toolkit for Ruby. This includes capturing SQL calls and model operations in transaction traces, and recording slow SQL calls. See https://newrelic.com/docs/ruby/sequel-instrumentation for full details.

  • Thread profiling fix

    The prior release of the agent (version 3.6.1) broke thread profiling. A profile would appear to run, but return no data. This has been fixed.

  • Fix for over-counted Net::HTTP calls

    Under some circumstances, calls into Net::HTTP were being counted twice in metrics and transaction traces. This has been fixed.

  • Missing traced errors for Resque applications

    Traced errors weren't displaying for some Resque workers, although the errors were factored into the overall count graphs. This has been fixed, and traced errors should be available again after upgrading the agent.

Monday, April 29, 2013 - 12:13
End of Life

The end-of-life date for this agent version is July 29, 2019. To update to the latest agent version, see Update the agent. For more information, see End-of-life policy.

Notes

  • Full URIs for HTTP requests are recorded in transaction traces

    When recording a transaction trace node for an outgoing HTTP call via Net::HTTP, the agent will now save the full URI (instead of just the hostname) for the request. Embedded credentials, the query string, and the fragment will be stripped from the URI before it is saved.

  • Simplify Agent Autostart Logic

    Previously the agent would only start when it detected a supported "Dispatcher", meaning a known web server or background task framework. This was problematic for customers using webservers that the agent was not configured to detect (e.g. Puma). Now the agent will attempt to report any time it detects it is running in a monitored environment (e.g. production). There are two exceptions to this. The agent will not autostart in a rails console or irb session or when the process was invoked by a rake task (e.g. rake assets:precompile). The NEWRELIC_ENABLE environment variable can be set to true or false to force the agent to start or not start.

  • Don't attempt to resolve collector hostname when proxy is in use

    When a proxy is configured, the agent will not attempt to lookup and cache the IP address of New Relic server to which it is sending data, since DNS may not be available in some environments. Thanks to Bill Kirtley for the contribution

  • Added NewRelic::Agent.set_transaction_name and NewRelic::Agent.get_transaction_name

    Ordinarily the name of your transaction is defined up-front, but if you'd like to change the name of a transaction while it is still running you can use NewRelic::Agent.set_transaction_name(). Similarly, if you need to know the name of the currently running transaction, you can use NewRelic::Agent.get_transaction_name().

Pages