All Versions
Latest Version
Avg Release Cycle
62 days
Latest Release
1098 days ago

Changelog History
Page 7

  • v3.11.0 Changes

    • Unified view for SQL database and NoSQL datastore products.

    The response time charts in the application overview page will now include NoSQL datastores, such as MongoDB, and also the product name of existing SQL databases such as MySQL, Postgres, etc.

    The Databases page will now enable the filtering of metrics and operations by product, and includes a table listing all operations.

    For existing SQL databases, in addition to the existing breakdown of SQL statements and operations, the queries are now also associated with the database product being used.

    For NoSQL datastores, such as MongoDB, we have now added information about operations performed against those products, similar to what is being done for SQL databases.

    Because this introduces a notable change to how SQL database metrics are collected, it is important that you upgrade the agent version on all hosts. If you are unable to transition to the latest agent version on all hosts at the same time, you can still access old and new metric data for SQL databases, but the information will be split across two separate views.

    For more information see

    • Track background transactions as Key Transactions

    In prior versions of the Ruby agent, only web transactions could be tracked as Key Transactions. This functionality is now available to all transactions, including custom Apdex values and X-Ray sessions.

    For more information see

    • More support and documentation for third-party extensions

    It's always been possible to write extension gems for the Ruby agent, but now there's one location with best practices and recommendations to guide you in writing extensions. Check out

    We've also added simpler APIs for tracing datastores and testing your extensions. It's our way of giving back to everyone who's helped build on the agent over the years. <3

    • Fix for anonymous class middleware naming

    Metric names based off anonymous middlewares lacked a class name in the UI. The Ruby agent will now look for a superclass, or default to AnonymousClass in those cases.

    • Improved exit behavior in the presence of Sinatra

    The agent uses an at_exit hook to ensure data from the last < 60s before a process exits is sent to New Relic. Previously, this hook was skipped if Sinatra::Application was defined. This unfortunately missed data for short-lived background processes that required, but didn't run, Sinatra. Now the agent only skips its at_exit hook if Sinatra actually runs from at_exit.

  • v3.10.0 Changes

    • Support for the Grape framework

    We now instrument the Grape REST API framework! To avoid conflicts with the third-party newrelic-grape gem, our instrumentation will not be installed if newrelic-grape is present in the Gemfile.

    For more details, see

    • Automatic Cross Application Tracing support for all Rack applications

    Previously Rack apps not using Rails or Sinatra needed to include the AgentHooks middleware to get Cross Application Tracing support. With these changes, this is no longer necessary. Any explicit references to AgentHooks can be removed unless the disable_middleware_instrumentation setting is set to true.

    • Metrics no longer reported from Puma master processes

    When using Puma's cluster mode with the preload_app! configuration directive, the agent will no longer start its reporting thread in the Puma master process. This should result in more accurate instance counts, and more accurate stats on the Ruby VMs page (since the master process will be excluded).

    • Better support for Sinatra apps used with Rack::Cascade

    Previously, using a Sinatra application as part of a Rack::Cascade chain would cause all transactions to be named after the Sinatra application, rather than allowing downstream applications to set the transaction name when the Sinatra application returned a 404 response. This has been fixed.

    • Updated support for Rubinius 2.3+ metrics

    Rubinius 2.3 introduced a new system for gathering metrics from the underlying VM. Data capture for the Ruby VM's page has been updated to take advantage of these. Thanks Yorick Peterse for the contribution!

    • Fix for missing ActiveJob traced errors

    ActiveJobs processed by backends where the Ruby agent lacked existing instrumentation missed reporting traced errors. This did not impact ActiveJobs used with Sidekiq or Resque, and has been fixed.

    • Fix possible crash in middleware tracing

    In rare circumstances, a failure in the agent early during tracing of a web request could lead to a cascading error when trying to capture the HTTP status code of the request. This has been fixed. Thanks to Michal Cichra for the fix!

  • v3.9.9 Changes

    • Support for Ruby 2.2

    A new version of Ruby is available, and the Ruby agent is ready to run on it. We've been testing things out since the early previews so you can upgrade to the latest and greatest and use New Relic right away to see how the new Ruby's performing for you.

    • Support for Rails 4.2 and ActiveJob

    Not only is a new Ruby available, but a new Rails is out too! The Ruby agent provides all the usual support for Rails that you'd expect, and we instrument the newly released ActiveJob framework that's part of 4.2.

    • Security fix for handling of error responses from New Relic servers

    This release fixes a potential security issue wherein an attacker who was able to impersonate New Relic's servers could have triggered arbitrary code execution in agent's host processes by sending a specially-crafted error response to a data submission request.

    This issue is mitigated by the fact that the agent uses SSL certificate checking in order to verify the identity of the New Relic servers to which it connects. SSL is enabled by default by the agent, and can be enforced account-wide by enabling High Security Mode for your account:

    • Fix for transactions with invalid URIs

    If an application used the agent's ignore_url_regexes config setting to ignore certain transactions, but received an invalid URI, the agent would fail to record the transaction. This has been fixed.

    • Fixed incompatibility with newrelic-grape

    The 3.9.8 release of the Ruby agent included disabled prototyped instrumentation for the Grape API framework. This introduced an incompatibility with the existing third party extension newrelic-grape. This has been fixed. Newrelic-grape continues to be the right solution until full agent support for Grape is available.

  • v3.9.8 Changes

    • Custom Insights events API

    In addition to attaching custom parameters to the events that the Ruby agent generates automatically for each transaction, you can now record custom event types into Insights with the new NewRelic::Agent.record_custom_event API.

    For details, see

    • Reduced memory usage for idling applications

    Idling applications using the agent could previously appear to leak memory because of native allocations during creation of new SSL connections to our servers. These native allocations didn't factor into triggering Ruby's garbage collector.

    The agent will now re-use a single TCP connection to our servers for as long as possible, resulting in improved memory usage for applications that are idling and not having GC triggered for other reasons.

    • Don't write to stderr during CPU sampling

    The Ruby agent's code for gathering CPU information would write error messages to stderr on some FreeBSD systems. This has been fixed.

    • LocalJumpError on Rails 2.x

    Under certain conditions, Rails 2.x controller instrumentation could fail with a LocalJumpError when an action was not being traced. This has been fixed.

    • Fixed config lookup in warbler packaged apps

    When running a Ruby application from a standalone warbler .jar file on JRuby, the packaged config/newrelic.yml was not properly found. This has been fixed, and thanks to Bob Beaty for the help getting it fixed!

    • Hash iteration failure in middleware

    If a background thread iterated over the keys in the Rack env hash, it could cause failures in New Relic's AgentHooks middleware. This has been fixed.

  • v3.9.7 Changes

    • Support for New Relic Synthetics

    The Ruby agent now gives you additional information for requests from New Relic Synthetics. More transaction traces and events give you a clearer look into how your application is performing around the world.

    For more details, see

    • Support for multiple job per fork gems with Resque

    The resque-jobs-per-fork and resque-multi-job-forks gems alter Resque to fork every N jobs instead of every job. This previously caused issues for the Ruby agent, but those have been resolved. These gems are fully supported.

    Running Resque with the FORK_PER_JOB=false environment variable setting is also supported now.

    For more details on our Resque support, see

    • Support agent when starting Resque Pool from Rake task

    When running resque-pool with its provided rake tasks, the agent would not start up properly. Thanks Tiago Sousa for the fix!

    • Fix for DelayedJob + Rails 4.x queue depth metrics

    The Ruby agent periodically records DelayedJob queuedepth as a metric, but this didn't work properly in Rails 4.x applications. This has been fixed. Thanks Jonathan del Strother for his help with the issue!

    • Fix for failure in background transactions with rules.ignore_url_regexes

    The recently added feature for ignoring transactions via URL regexes caused errors for non-web transactions. This has been fixed.

    • Rename the method to TransactionNamer.name_for

    The internal TransactionNamer class had a class method called 'name', with a different signature than the existing Class#name method and could cause problems when trying to introspect instances of the class.

    Thanks to Dennis Taylor for contributing this fix!

  • v3.9.6 Changes

    • Rails 4.2 ActiveJob support

    A new version of Rails is coming! One of the highlight features is ActiveJob, a framework for interacting with background job processors. This release of the Ruby agent adds instrumentation to give you insight into ActiveJob, whether you're just testing it out or running it for real.

    Metrics are recorded around enqueuing ActiveJobs, and background transactions are started for any ActiveJob performed where the agent didn't already provide specific instrumentation (such as DelayedJob, Resque and Sidekiq).

    Since Rails 4.2 is still in beta we'd love to hear any feedback on this instrumentation so it'll be rock solid for the general release!

    • Ruby 2.2.0-preview1 updates

    Ruby 2.2.0 is on its way later in the year, and the Ruby agent is ready for it. Updates to the GC stats and various other small changes have already been applied, and our automated tests are running against 2.2.0 so the agent will be ready on release day.

    • Ignoring transactions by URL

    While you could always ignore transactions by controller and action, the Ruby agent previously lacked a way to ignore by specific URLs or patterns without code changes. This release adds the config setting, rules.ignore_url_regexes to ignore specific transactions based on the request URL as well. For more information, see the documentation at:

    • Better dependency detection in non-Rack applications

    The Ruby agent runs dependency detection at key points in the Rack and Rails lifecycle, but non-Rails apps could occasionally miss out instrumenting late loaded libraries. The agent now runs an additional dependency detection during manual_start to more seamlessly install instrumentation in any app.

    • Excluding /newrelic routes from developer mode

    Recent changes to track time in middleware resulted in New Relic's developer mode capturing its own page views in the list. This has been fixed. Thanks to Ignatius Reza Lesmana for the report!

    • Spikes in external time

    Timeouts during certain external HTTP requests could result in incorrect large spikes in the time recorded by the agent. This has been fixed.

    • Recognize browser_monitoring.auto_instrument setting in non-Rails apps

    The browser_monitoring.auto_instrument config setting disables auto-injection of JavaScript into your pages, but was not properly obeyed in Sinatra and other non-Rails contexts. This has been fixed.

    • Failures to gather CPU thread time on JRuby

    JRuby running on certain JVM's and operating systems (FreeBSD in particular) did not always support the method being used to gather CPU burn metrics. This would result in a failure during those transactions. This has been fixed.

    • Fix for rare race condition in Resque instrumentation

    A race condition in the agent's Resque instrumentation that could cause rare Resque job failures in high-throughput Resque setups has been fixed. This bug would manifest as an exception with the following error message: "RuntimeError: can't add a new key into hash during iteration" and a backtrace leading through the PipeChannelManager class in the agent.

  • v3.9.5 Changes

    • Per-dyno data on Heroku

    When running on Heroku, data from the agent can now be broken out by dyno name, allowing you to more easily see what's happening on a per-dyno level. Dynos on Heroku are now treated in the same way that distinct hosts on other platforms work.

    By default, 'scheduler' and 'run' dyno names will be aggregated into 'scheduler.' and 'run.' to avoid unbounded growth in the number of reported hostnames.

    Read more about this feature on our Heroku docs page:

    • HTTP response codes in Insights events

    The Ruby agent will now capture HTTP response codes from Rack applications (including Rails and Sinatra apps) and include them under the httpResponseCode attribute on events sent to Insights.

    • Stricter limits on memory usage of SQL traces

    The agent now imposes stricter limits on the number of distinct SQL traces that it will buffer in memory at any point in time, leading to more predictable memory consumption even in exceptional circumstances.

    • Improved reliability of thread profiling

    Several issues that would previously have prevented the successful completion and transmission of thread profiles to New Relic's servers have been fixed.

    These issues were related to the use of recursion in processing thread profiles, and have been addressed by both limiting the maximum depth of the backtraces recorded in thread profiles, and eliminating the agent's use of recursion in processing profile data.

    • Allow tracing Rails view helpers with add_method_tracer

    Previously, attempting to trace a Rails view helper method using add_method_tracer on the view helper module would lead to a NoMethodError when the traced method was called (undefined method `trace_execution_scoped'). This has been fixed.

    This issue was an instance of the Ruby 'dynamic module inclusion' or 'double inclusion' problem. Usage of add_method_tracer now no longer relies upon the target class having actually picked up the trace_execution_scoped method from the NewRelic::Agent::MethodTracer module.

    • Improved performance of queue time parsing

    The number of objects allocated while parsing the front-end timestamps on incoming HTTP requests has been significantly reduced.

    Thanks to Aleksei Magusev for the contribution!

  • v3.9.4 Changes

    • Allow agent to use alternate certificate stores

    When connecting via SSL to New Relic services, the Ruby agent verifies its connection via a certificate bundle shipped with the agent. This had problems with certain proxy configurations, so the ca_bundle_path setting in newrelic.yml can now override where the agent locates the cert bundle to use.

    For more information see the documentation at:

    • Rails 4.2 beta in tests

    Although still in beta, a new version of Rails is on its way! We're already running our automated test suites against the beta to ensure New Relic is ready the day the next Rails is released.

    • ActiveRecord 4 cached queries fix

    Queries that were hitting in the ActiveRecord 4.x query cache were incorrectly being counted as database time by the agent.

    • Fix for error in newrelic.yml loading

    If your application ran with a RAILS_ENV that was not listed in newrelic.yml recent agent versions would give a NameError rather than a helpful message. This has been fixed. Thanks Oleksiy Kovyrin for the patch!

  • v3.9.3 Changes

    • Fix to prevent proxy credentials transmission

    This update prevents proxy credentials set in the agent config file from being transmitted to New Relic.

  • v3.9.2 Changes

    • Added API for ignoring transactions

    This release adds three new API calls for ignoring transactions:

    - `NewRelic::Agent.ignore_transaction`
    - `NewRelic::Agent.ignore_apdex`
    - `NewRelic::Agent.ignore_enduser`

    The first of these ignores a transaction completely: nothing about it will be reported to New Relic. The second ignores only the Apdex metric for a single transaction. The third disables javascript injection for browser monitoring for the current transaction.

    These methods differ from the existing newrelic_ignore_* method in that they may be called during a transaction based on some dynamic runtime criteria, as opposed to at the class level on startup.

    See the docs for more details on how to use these methods:

    • Improved SQL obfuscation

    SQL queries containing string literals ending in backslash ('\') characters would previously not have been obfuscated correctly by the Ruby agent prior to transmission to New Relic. In addition, SQL comments were left un-obfuscated. This has been fixed, and the test coverage for SQL obfuscation has been improved.

    • newrelic_ignore* methods now work when called in a superclass

    The newrelic_ignore* family of methods previously did not apply to subclasses of the class from which it was called, meaning that Rails controllers inheriting from a single base class where newrelic_ignore had been called would not be ignored. This has been fixed.

    • Fix for rare crashes in Rack::Request#params on Sinatra apps

    Certain kinds of malformed HTTP requests could previously have caused unhandled exceptions in the Ruby agent's Sinatra instrumentation, in the Rack::Request#params method. This has been fixed.

    • Improved handling for rare errors caused by timeouts in Excon requests

    In some rare cases, the agent would emit a warning message in its log file and abort instrumentation of a transaction if a timeout occurred during an Excon request initiated from within that transaction. This has been fixed.

    • Improved behavior when the agent is misconfigured

    When the agent is misconfigured by attempting to shut it down without it ever having been started, or by attempting to disable instrumentation after instrumentation has already been installed, the agent will no longer raise an exception, but will instead log an error to its log file.

    • Fix for ignore_error_filter not working in some configurations

    The ignore_error_filter method allows you to specify a block to be evaluated in order to determine whether a given error should be ignored by the agent. If the agent was initially disabled, and then later enabled with a call to manual_start, the ignore_error_filter would not work. This has been fixed.

    • Fix for Capistrano 3 ignoring newrelic_revision

    New Relic's Capistrano recipes support passing parameters to control the values recorded with deployments, but user provided :newrelic_revision was incorrectly overwritten. This has been fixed.

    • Agent errors logged with ruby-prof in production

    If the ruby-prof gem was available in an environment without New Relic's developer mode enabled, the agent would generate errors to its log. This has been fixed.

    • Tighter requirements on naming for configuration environment variables

    The agent would previously assume any environment variable containing 'NEWRELIC' was a configuration setting. It now looks for this string as a prefix only.

    Thanks to Chad Woolley for the contribution!