Ruby Release Notes

Ruby Agent Release Notes

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().

Wednesday, March 20, 2013 - 15:53
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

  • Sidekiq supprt

    The Ruby agent now supports the Sidekiq background job framework. Traces from Sidekiq jobs will automatically show up in the Background tasks on New Relic similar to Resque and Delayed::Job tasks.

  • Improved thread safety

    The primary metrics data structures in the Ruby agent are now thread safe. This should provide better reliability for the agent under JRuby and threaded scenarios such as Sidekiq or Puma.

  • More robust environment report

    The agent's analysis of the local environment (e.g. OS, Processors, loaded gems) will now work in a wider variety of app environments, including Sinatra.

  • Experimental Rainbows! support

    The Ruby agent now automatically detects and instruments the Rainbows! web server. This support is considered experimental at present, and has not been tested with all dispatch modes.

    Thanks to Joseph Chen for the contribution.

  • Fix a potential file descriptor leak in Resque instrumentation

    A file descriptor leak that occurred when DontPerform exceptions were used to abort processing of a job has been fixed. This should allow the Resque instrumentation work correctly with the resque-lonely_job gem.

Thursday, February 28, 2013 - 15:11
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

  • Key Transactions

    The Ruby agent now supports Key Transactions! Check out more details on the feature at https://newrelic.com/docs/site/key-transactions.

  • Ruby 2.0

    The Ruby agent is compatible with Ruby 2.0.0 which was just released.

  • Improved Sinatra instrumentation

    Several cases around the use of conditions and pass in Sinatra are now better supported by the Ruby agent. Thanks Konstantin for the help!

  • Cross Application Tracing

    See https://newrelic.com/docs/features/cross-application-traces for details. Adds a 'X-NewRelic-ID' header to outbound Net::HTTP requests. This change helps improve the correlation of performance between services in a service- oriented architecture.

  • Automatically detect Resque dispatcher

    The agent does better auto-detection for the Resque worker process. This should reduce the need to set NEW_RELIC_DISPATCHER=resque directly.

Wednesday, February 20, 2013 - 11: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

  • Resolved some issues with tracking of front-end queue time, particularly when the agent is running on an app hosted on Heroku. The agent will now more reliably parse the headers described in https://newrelic.com/docs/features/tracking-front-end-time and will automatically detect whether the times provided are in seconds, milliseconds or microseconds.
Thursday, February 14, 2013 - 08:31
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

  • Use HTTPS by default

    The agent now defaults to using SSL when it communicates with New Relic's servers. By defaults already configured, New Relic does not transmit any sensitive information (e.g. SQL parameters are masked), but SSL adds another layer of security. Upgrading customers may need to remove the "ssl: false" directive from their newrelic.yml to enable ssl. Customers on Jruby may need to install the jruby-openssl gem to take advantage of this feature.

    • Fix two Resque-related issues

    Fixes a possible hang on exit of an instrumented Resque master process (https://github.com/resque/resque/issues/578), as well as a file descriptor leak that could occur during startup of the Resque master process.

    • Fix for error graph over 100%

    Some errors were double counted toward the overall error total. This resulted in graphs with error percentages over 100%. This duplication did not impact the specific error traces captured, only the total metric.

    • Notice gracefully handled errors in Sinatra

    When show_exceptions was set to false in Sinatra, errors weren't caught by New Relic's error collector. Now handled errors also have the chance to get reported back.

    • Ruby 2.0 compatibility fixes

    Ruby 2.0 no longer finds protected methods by default, but will with a flag. http://tenderlovemaking.com/2012/09/07/protected-methods-and-ruby-2-0.html

    Thanks Ravil Bayramgalin and Charlie Somerville for the fixes.

    • Auto-detect Trinidad as dispatcher

    Code already existing for detecting Trinidad as a dispatcher, but was only accessible via an ENV variable. This now auto-detects on startup. Thanks Robert Rasmussen for catching that.

    • Coercion of types in collector communication

    Certain metrics can be recorded with a Ruby Rational type, which JSON serializes as a string rather than a floating point value. We now treat coerce each outgoing value, and log issues before sending the data.

    • Developer mode fix for chart error

    Added require to fix a NameError in developer mode for summary page. Thanks to Ryan B. Harvey.

    • Don't touch deprecated RAILS_ROOT if on Rails 3

    Under some odd startup conditions, we would look for the RAILS_ROOT constant after failing to find the ::Rails.root in a Rails 3 app, causing deprecation warnings. Thanks for Adrian Irving-Beer for the fix.

Wednesday, January 9, 2013 - 18:38
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

  • Add thread profiling support

    Thread profiling performs statistical sampling of backtraces of all threads within your Ruby processes. This feature requires MRI >= 1.9.2, and is controlled via the New Relic web UI. JRuby support (in 1.9.x compat mode) is considered experimental, due to issues with JRuby's Thread#backtrace.

  • Add audit logging capability

    The agent can now log all of the data it sends to the New Relic servers to a special log file for human inspection. This feature is off by default, and can be enabled by setting the audit_log.enabled configuration key to true. You may also control the location of the audit log with the audit_log.path key.

  • Use config system for dispatcher, framework, and config file detection

    Several aspects of the agent's configuration were not being handled by the configuration system. Detection/configuration of the dispatcher (e.g. passenger, unicorn, resque), framework (e.g. rails3, sinatra), and newrelic.yml location are now handled via the Agent environment, manual, and default configuration sources.

  • Updates to logging across the agent

    We've carefully reviewed the logging messages that the agent outputs, adding details in some cases, and removing unnecessary clutter. We've also altered the startup sequence to ensure that we don't spam STDOUT with messages during initialization.

  • Fix passing environment to manual_start()

    Thanks to Justin Hannus. The :env key, when passed to Agent.manual_start, can again be used to specify which section of newrelic.yml is loaded.

  • Rails 4 support

    This release includes preliminary support for Rails 4 as of 4.0.0.beta. Rails 4 is still in development, but the agent should work as expected for people who are experimenting with the beta.

Wednesday, December 26, 2012 - 18:38
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.

Fixes

  • Fix incompatibility with logging gem by renaming NewRelic::Agent::Thread to NewRelic::Agent::AgentThread.
Tuesday, December 18, 2012 - 19: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.

Fixes

  • Add queue time support for sinatra apps

    Sinatra applications can now take advantage of front-end queue time reporting. Thanks to Winfield Peterson for this contribution.

  • Simplify queue time configuration for nginx 1.2.6+

    Beginning in version 1.2.6, recently released as a development version, the $msec variable can be used to set an http header. This change allows front-end queue time to be tracked in New Relic simply by adding this line to the nginx config:

    proxy_set_header X-Queue-Start "t=${msec}000"

    It will no longer be necessary to compile a patched version of nginx or compile in the perl or lua module to enable this functionality.

    Thanks to Lawrence Pit for the contribution.

  • Report back build number and stage along with version info

    In the 3.5.3 series the agent would fail to report its full version number to NewRelic's environment report. For example it would report its version as 3.5.3 instead of 3.5.3.25 or 3.5.3.25.beta. The agent will now report its complete version number as defined in newrelic_rpm.gemspec.

  • The host and the port that the agent reports to can now be set from environment vars

    The host can be set with NEW_RELIC_HOST and the port with NEW_RELIC_PORT. These setting will overrride any other settings in your newrelic.yml.

  • Fix RUM reporting to multiple applications

    When the agent is configured to report to multiple "roll up" applications RUM did not work correctly.

Wednesday, December 5, 2012 - 23:01
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.

Fixes

  • Update the collector protocol to use JSON and Ruby primitives

    The communication between the agent and the NewRelic will not longer be marshaled Ruby objects, but rather JSON in the case of Ruby 1.9 and marshaled Ruby primitives in the case of 1.8. This results in greater harvest efficiency as well as feature parity with other New Relic agents.

  • Fix incorrect application of conditions in sinatra instrumentation

    The agent's sinatra instrumentation was causing sinatra's condidtions to be incorrectly applied in some obscure cases. The bug was triggered when a condition was present on a lower priority route that would match the current request, except for the presence of a higher priority route.

Thursday, November 15, 2012 - 01:07
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.

Fixes

Tuesday, November 13, 2012 - 22: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.

Fixes

  • Enabling Memory Profiling on Lion and Mountain Lion

    The agent's list of supported platforms for memory profiling wasn't correctly checking for more recent versions of OS X.

  • Fixed an arity issue encountered when calling newrelic_notice_error from Rails applications.

  • End user queue time was not being properly reported, works properly now.

  • Server-side configuration for ignoring errors was not being heeded by agent.

  • Better handling of a thread safety issue.

    Some issues may remain, which we are working to address, but they should be gracefully handled now, rather than crashing the running app.

  • Use "java_import" rather than "include_class" when require Java Jars into a JRuby app.

    Thanks to Jan Habermann for the pull request

  • Replaced alias_method mechanism with super call in DataMapper instrumentation.

    Thanks to Michael Rykov for the pull request

  • Fixed the Rubinius GC profiler.

    Thanks to Dirkjan Bussink

  • Use ActiveSupport.on_load to load controller instrumentation Rails 3.

    Thanks to Jonathan del Strother

  • Reduce the number of thread local reference in a particular high traffic method

    Thanks to Jeremy Kemper

Tuesday, October 23, 2012 - 00:23
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.

Fixes

  • (performance) Gradual slowdown on Phusion Passenger

    This release resolves a performance issue that effected sites running on some versions of Phusion Passenger. The issue manifests as a slow degradation of response time and increased CPU usage. This issue was only present in version 3.5.0 of the agent.

  • Drop support for Passenger versions less than 2.1.1

    In order to implement the above fix we have dropped official support for Passenger versions 2.1.0 and older. These early versions of Passenger do not support an after_fork event which is necessary for the smooth operation of the agent.

Tuesday, October 9, 2012 - 17: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.

Fixes

  • (Fix) RUM Stops Working After 3.4.2.1 Agent Upgrade

    v3.4.2.1 introduced a bug that caused the browser monitor auto instrumentation (for RUM) default to be false. The correct value of true is now used

  • When the Ruby Agent detects Unicorn as the dispatcher it creates an INFO level log message with additional information

    To help customers using Unicorn, if the agent detects it (Unicorn) is being used as the dispatcher an INFO level log message it created that includes a link to New Relic online doc that has additional steps that may be required to get performance data reporting.

  • (Fix) In version 3.4.2 of the Ruby Agent the server side value for Apdex T was disgregarded

    With version 3.4.2 of the agent, the value set in the newrelic.yml file took precedence over the value set in the New Relic UI. As of version 3.5.0 only the value for Apdex T set in the New Relic UI will be used. Any setting in the yaml file will be ignored.

  • Improved Error Detection/Reporting capabilities for Rails 3 apps

    Some errors are missed by the agent's exception reporting handlers because they are generated in the rails stack, outside of the instrumented controller action. A Rack middleware is now included that can detect these errors as they bubble out of the middleware stack. Note that this does not include Routing Errors.

  • The Ruby Agent now logs certain information it receives from the New Relic servers

    After connecting to the New Relic servers the agent logs the New Relic URL of the app it is reporting to.

  • GC profiling overhead for Ruby 1.9 reduced

    For Ruby 1.9 the amount of time spent in GC profiling has been reduced.

  • Know issue with Ruby 1.8.7-p334, sqlite3-ruby 1.3.0 or older, and resque 1.23.0

    The Ruby Agent will not work in conjunction with Ruby 1.8.7-p334, sqlite3-ruby 1.3.3 or earlier, and resque 1.23.0. Your app will likely stop functioning. This is a known problem with Ruby versions up to 1.8.7-p334. Upgrading to the last release of Ruby 1.8.7 is recommended. This issue has been present in every version of the agent we've tested going back for a year.

Thursday, September 13, 2012 - 23:31
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.

Fixes

  • Fix issue when app_name is nil

    If the app_name setting ends up being nil an exception got generated and the application wouldn't run. This would notably occur when running a Heroku app locally without the NEW_RELIC_APP_NAME environment variable set. A nil app_name is now detected and an error logged specifying remediation.

Thursday, September 6, 2012 - 16: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.

Fixes

  • Support for Apdex T in server side configuration

    For those using server side configuration the Ruby Agent now supports setting the Apdex T value via the New Relic UI.

  • The RUM NRAGENT tk value gets more robustly sanitized to prevent potential XSS vulnerabilities

    The code that scrubs the token used in Real User Monitoring has been enhanced to be more robust.

  • Refactoring of agent config code

    The code that reads the configuration information and configures the agent got substantially reorganized, consolidated, simplified, and made more robust.

Thursday, July 26, 2012 - 14:42
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.

Bug Fixes

  • Fix edge case in RUM auto instrumentation where X-UA-Compatible meta tag is present but </head> tag is missing.

    There is a somewhat obscure edge case where RUM auto instrumentation will crash a request. The issue seems to be triggered when the X-UA-Compatible meta tag is present and the </head> tag is missing.

  • Fixed reference to @service.request_timeout to @request_timeout in new_relic_service.rb. (Thanks to Matthew Savage)

    When a timeout occurred during connection to the collector an "undefined method request_timeout for nil:NilClass" would get raised.

  • preserve visibility on traced methods.

    Aliased methods now have the same visibility as the original traced method. A couple of the esoteric methods created in the process weren't getting the visibility set properly.

  • Agent service does not connect to directed shard collector after connecting to proxy

    After connecting to collector proxy name of real collector was updated, but ip address was not being updated causing connections to go to the proxy. Agent now looks up ip address for real collector.

  • corrupt marshal data from pipe children crashing agent

    If the agent received corrupted data from the Reqsue worker child agent it could crash the agent itself. fixed.

  • should reset RubyBench GC counter between polls

    On Ruby REE, the GC profiler does not reset the counter between polls. This is only a problem if GC could happen between transactions, as in, for example, out-of-band GC in Unicorn. fixed.

Wednesday, June 27, 2012 - 17:24
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.

Fixes

  • Prevent the agent from resolving the collector address when disabled.
  • Fix for error collector configuration that was introduced during beta.
Monday, June 4, 2012 - 16: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.

New Feature(s)

  • Major refactor of data transmission mechanism. This enabled child processes to send data to parent processes, which then send the data to the New Relic service. This should only affect Resque users, dramatically improving their experience.

Bug Fixes

  • Resolve issue with configuring the Error Collector when using server-side configuration.

Changes

  • Moved Resque instrumentation from rpm_contrib to main agent. Resque users should discontinue use of rpm_contrib or upgrade to 2.1.11.
Thursday, May 31, 2012 - 14:37
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.

Fixes

  • Replaced "Custom/DJ Locked Jobs" metric with three new metrics for monitoring DelayedJob: queue_length, failed_jobs, and locked_jobs, all under Workers/DelayedJob
  • Fix allowing instrumentation of methods ending in '?' or '!'
  • Limit scanning first 50k of the response in RUM auto-instrumentation.
  • Fix keeping exception from being raised when when extracting metrics from SQL queries with non UTF-8 bytes

Pages