• /
  • EnglishEspañolFrançais日本語한국어Português
  • Inicia sesiónComenzar ahora

Ruby agent release notesRSS

January 9, 2023
Ruby agent v8.15.0

Importante

We recommend updating to the latest agent version as soon as it's available. If you are prevented from upgrading to the latest version, ensure that your agents are updated to a version at most 90 days old. Read more about keeping your agent up to date.

As of this release, the oldest supported version is 6.9.0.363

v8.15.0

Version 8.15.0 of the agent confirms compatibility with Ruby 3.2.0, adds instrumentation for concurrent-ruby, and confirms Sinatra 3 compatibility with Padrino 0.15.2. It also enables batching and compression for Infinite Tracing.

Configuration nameDefaultBehavior
instrumentation.concurrent_rubyautoControls auto-instrumentation of the concurrent-ruby library at start up. May be one of auto, prepend, chain, disabled.
  • Infinite Tracing: Use batching and compression

    For Infinite Tracing, which Ruby applications can leverage with the newrelic-infinite_tracing gem, payloads will now be batched and compressed to signficantly decrease the amount of outbound network traffic. PR#1723

Configuration nameDefaultBehavior
infinite_tracing.batchingtrueIf true (the default), the Trace Observer will receive data in batches instead of sending each span individually
infinite_tracing.compression_levelhighConfigure the compression level for data sent to the trace observer. May be one of [nonelowmediumhigh]. 'high' is the default. Set the level to 'none' to disable compression.
  • Add Support for Padrino 0.15.2 and Sinatra 3

    We've added testing to confirm Padrino 0.15.2 and Sinatra 3 are compatible with the Ruby agent. Thank you @nesquena for letting us know 0.15.2 was ready! PR#1712

December 14, 2022
Ruby agent v8.14.0

Importante

We recommend updating to the latest agent version as soon as it's available. If your organization has established practices that prevent you from upgrading to the latest version, ensure that your agents are regularly updated to a version at most 90 days old. Read more about keeping your agent up to date.

As of this release, the oldest supported version is 6.8.0.359

v8.14.0

Version 8.14.0 of the agent restores desired Capistrano-based changelog lookup functionality when a deployment is performed, speeds up GUID generation, delivers support for instrumenting Rails custom event notifications, fixes potential compatibility issues with the RedisClient gem, and fixes bugs related to initialization in Rails.

  • Deployment Recipe: Restore desired Capistrano-based changelog lookup behavior

    The New Relic Ruby agent offers a Capistrano recipe for recording app deployments. The recipe code was significantly cleaned up with PR#1498 which inadvertently changed the way the recipe handles the changelog for a deployment. Community member @arthurwozniak spotted and corrected this change in order to restore the desired changelog lookup functionality while retaining all of the previous cleanup. Thank you very much for your contribution, @arthurwozniak! PR#1653

  • Speed up GUID generation

    The agent leverages random numbers in its GUID (globally unique identifier) generation and would previously always freshly calculate the result of 16^16 or 32^32 before generating a random number. Given that those 16^16 and 32^32 operations are expected, it makes sense to calculate their results up front and store them in constants to be referred to later. Doing so has resulted in a performance gain for the generation of GUIDs. Many thanks to @tungmq for contributing this optimisation and the benchmarks to support it! PR#1693

  • Support for Rails ActiveSupport::Notifications for custom events

    When the new active_support_custom_events_names configuration parameter is set equal to an array of custom event names to subscribe to, the agent will now subscribe to each of the names specified and report instrumentation for the events when they take place. Creating custom events is simple and now reporting instrumentation for them to New Relic is simple as well. PR#1659

  • Bugfix: Support older versions of the RedisClient gem, handle unknown Redis database index

    With version 8.13.0 of the agent, support was added for the redis-rb gem v5+ and the new RedisClient gem. With versions of RedisClient older than v0.11, the agent could cause the monitored application to crash when attempting to determine the Redis database index. Version 8.14.0 adds two related improvements. Firstly, support for RedisClient versions older than v0.11 has been added to get at the database index value. Secondly, the agent will no longer crash or impact the monitored application in the event that the database index cannot be obtained. Thank you very much to our community members @mbsmartee and @patatepartie for bringing this issue to our attention, for helping us determine how to best reproduce it, and for testing out the update. We appreciate your help! Issue#1650 PR#1673

  • Bugfix: Defer agent startup in Rails until after application-defined initializers have run

    In Rails, the agent previously loaded before any application-defined initializers. This allowed initializers to reference the add_method_tracer API. However, this had the side-effect of forcing some framework libraries to load before initializers ran, preventing any configuration values related to these libraries from being applied. This fix provides an option to split initialization into two parts: load add_method_tracer before application-defined initializers and start the agent after application-defined initializers. This may cause other initializers to behave differently.

    If you'd like to use this feature, set defer_rails_initialization to true. It is false by default, but may become true by default in a future release.

    Furthermore, our Action View instrumentation was missing an ActiveSupport.on_load block around the code that loads our instrumentation.

    Thank you @jdelStrother for bringing this to our attention and collaborating with us on a fix. PR#1658

    Unfortunately, this bugfix is unreachable as written because the configuration value used to access the bugfix won't be applied until after initialization. Follow along for updates at Issue#662.

November 21, 2022
Ruby agent v8.13.1

Importante

We recommend updating to the latest agent version as soon as it's available. If your organization has established practices that prevent you from upgrading to the latest version, ensure that your agents are regularly updated to a version at most 90 days old. Read more about keeping your agent up to date.

As of this release, the oldest supported version is 6.8.0.359

v8.13.1

Version 8.13.1 of the agent provides a bugfix for Redis v5.0 instrumentation.

  • Fix NoMethodError when using Sidekiq v7.0 with Redis Client v0.11

    In some cases, the RedisClient object cannot directly access methods like db, port, or path. These methods are always available on the client.config object. This raised a NoMethodError in environments that used Sidekiq v7.0 and Redis Client v0.11. Thank you to fcheung and @stevenou for bringing this to our attention! Issue#1639

November 15, 2022
Ruby agent v8.13.0

v8.13.0

Version 8.13.0 of the agent updates our Rack, Redis, and Sidekiq instrumentation. It also delivers some bugfixes.

  • Support for Redis v5.0

    Redis v5.0 restructures where some of our instrumented methods are located and how they are named. It also introduces a new instrumentation middleware API. This API is used for pipelined and multi calls to maintain reporting parity with previous Redis versions. However, it is introduced later in the chain, so you may see errors that used to appear at the segment level on the transaction instead. The agent's behavior when used with older supported Redis versions will remain unaffected. PR#1611

  • Support for Sidekiq v7.0

    Sidekiq v7.0 removed Delayed Extensions and began offering client and server middleware classes to inherit from. The agent's Sidekiq instrumentation has been updated accordingly. The agent's behavior when used with older Sidekiq versions will remain unaffected. PR#1615 NOTE: an issue was discovered with Sidekiq v7.0+ and addressed by Ruby agent v8.13.1. If you are using Sidekiq, please skip Ruby agent v8.13.0 and use v8.13.1 or above.

  • Support for Rack v3.0: Rack::Builder#new accepting a block

    Via rack/rack#1942 (released with Rack v3.0), Rack::Builder#run now optionally accepts a block instead of an app argument. The agent's instrumentation has been updated to support the use of a block with Rack::Builder#run. PR#1600

  • Bugfix: Correctly identify Unicorn, Rainbows and FastCGI with Rack v3.0

    Unicorn, Rainbows, or FastCGI web applications using Rack v3.0 may previously have had the "dispatcher" value incorrectly reported as "Webrick" instead of "Unicorn", "Rainbows", or "FastCGI". This issue has now been addressed. PR#1585

  • Bugfix: add_method_tracer fails to record code level metric attributes on private methods

    When using add_method_tracer on a private method, the agent was unable to record code level metrics for the method. This resulted in the following being logged to the newrelic_agent.log file.

    WARN : Unable to determine source code info for 'Example', method 'private_method' - NameError: undefined method 'private_method' for class '#<Class:Example\>'

    Thank you @jdelStrother for bringing this issue to our attention and suggesting a fix! PR#1593

  • Bugfix: Category is a required keyword arg for NewRelic::Agent::Tracer.in_transaction

    When support for Ruby 2.0 was dropped in version 8.0.0 of the agent, the agent API methods were updated to use the required keyword argument feature built into Ruby, rather than manually raising ArgumentErrors. The API method NewRelic::Agent::Tracer.in_transaction removed the ArgumentError raised by the agent, but did not update the method arguments to identify :category as a required keyword argument. This is now resolved. Thank you @tatzsuzuki for bringing this to our attention. PR#1587

Support statement

New Relic recommends that you upgrade the Ruby agent regularly and at a minimum of every 3 months. As of this release, the oldest supported version is 6.8.0.359.

October 26, 2022
Ruby agent v8.12.0

v8.12.0

Version 8.12.0 of the Ruby agent delivers new Elasticsearch instrumentation. Version 8.12.0 of the Ruby agent also increases the default number of recorded custom events, announces the deprecation of Ruby 2.3, and brings some valuable code cleanup.

  • Support for Elasticsearch instrumentation

    This release of the Ruby agent adds support to automatically instrument the elasticsearch gem. Versions 7.x and 8.x are supported. PR#1525

    Configuration nameDefaultBehavior
    instrumentation.elasticsearchautoControls auto-instrumentation of the elasticsearch library at start up. May be one of auto, prepend, chain, disabled.
    elasticsearch.capture_queriestrueIf true, the agent captures Elasticsearch queries in transaction traces.
    elasticsearch.obfuscate_queriestrueIf true, the agent obfuscates Elasticsearch queries in transaction traces.
  • Custom Event Limit Increase

    This version of the Ruby agent increases the default limit of custom events from 1000 events per minute to 3000 events per minute. If your custom events were being limited, this change will allow more custom events to be sent to New Relic. There is also a new configurable maximum limit of 100,000 events per minute. To change the limits, see the documentation for max_samples_stored. To learn more about the change and how to determine if custom events are being dropped, see our Explorers Hub post. PR#1541

  • Deprecate support for Ruby 2.3

    Ruby 2.3 reached end of life on March 31, 2019. The Ruby agent has deprecated support for Ruby 2.3 and will make breaking changes for this version in its next major release, v9.0.0 (release date not yet planned). All 8.x.x versions of the agent will remain compatible with Ruby 2.3.

  • Cleanup: Remove orphaned code

    In both the agent and unit tests, changes have taken place over the years that have left certain bits of code unreachable. This orphaned code can complicate code maintenance and refactoring, so getting it squared away can be very helpful. Commmuniy member @ohbarye contributed two separate cleanup PRs for this release; one for the agent and one for the tests. PR#1537 PR#1548

    Thank you to @ohbarye for contributing this helpful cleanup!

Support statement

New Relic recommends that you upgrade the Ruby agent regularly and at a minimum of every 3 months. As of this release, the oldest supported version is 6.7.0.359.

October 11, 2022
Ruby agent v8.11.0

v8.11.0

Version 8.11.0 of the agent updates the newrelic deployments command to work with API keys issued to newer accounts, fixes a memory leak in the instrumentation of Curb error handling, further preps for Ruby 3.2.0 support, and includes several community member driven cleanup and improvement efforts. Thank you to everyone involved!

  • Added support for New Relic REST API v2 when using newrelic deployments command

    Previously, the newrelic deployments command only supported the older version of the deployments api, which does not currently support newer license keys. Now you can use the New Relic REST API v2 to record deployments by providing your user API key to the agent configuration using api_key. When this configuration option is present, the newrelic deployments command will automatically use the New Relic REST API v2 deployment endpoint. PR#1461

    Thank you to @Arkham for bringing this to our attention!

  • Cleanup: Performance tests, constants, rubocop-minitest assertions and refutations

    Community member @esquith contributed a whole slew of cleanup successes for our performance test configuration, orphaned constants in our code base, and RuboCop related improvements. PR#1406 PR#1408 PR#1409 PR#1411

    Thank you @esquith for these great contributions!

  • CI: Notify on a change from failure to success

    A super handy, much beloved feature of certain CI and build systems is to not only notify when builds start to fail, but also to notify again when the builds once again start to go green. Community member @luigieai was able to figure out how to configure our existing complex, multiple-3rd-party-action based GitHub Actions pipeline to notify on a switch back to success from failure. PR#1519

    This is much appreciated! Thank you, @luigieai.

  • Spelling corrections

    Community member @jsoref, author of the Check Spelling GitHub Action, contributed a significant number of spelling corrections throughout the code base. The intelligent issues that were flagged made for a more comprehensive review than a simple dictionary based check would have been able to provide, and the changes are much appreciated. PR#1508

    Thank you very much, @jsoref!

  • Ruby 3.2.0-preview2 compatibility

    Ruby 3.2.0-preview1 introduced a change to the way that Ruby reports VM stats and the approach was changed yet again to a 3rd approach with the preview2 release. New Relic reports on Ruby VM stats and is keeping track of the Ruby 3.2 development process to help ensure our customers with a smooth and worthwhile upgrade process once Ruby 3.2.0 (non-preview) is released. PR#1436

  • Bugfix: Fix memory leak in the Curb instrumentation

    Community member @charkost was able to rework the on_failure callback logic prepped via the agent's Curb instrumentation in order to avoid some nesting that was causing memory leaks. PR#1518

    Many thanks for both the heads up on the issue and the fix, @charkost!

Support statement

New Relic recommends that you upgrade the agent regularly and at a minimum every 3 months. As of this release, the oldest supported version is 6.7.0.359.

September 13, 2022
Ruby agent v8.10.1

v8.10.1

  • Bugfix: Missing unscoped metrics when instrumentation.thread.tracing is enabled

    Previously, when instrumentation.thread.tracing was set to true, some puma applications encountered a bug where a varying number of unscoped metrics would be missing. The agent now will correctly store and send all unscoped metrics.

    Thank you to @texpert for providing details of their situation to help resolve the issue.

  • Bugfix: gRPC instrumentation causes ArgumentError when other Google gems are present

    Previously, when the agent had gRPC instrumentation enabled in an application using other gems (such as google-ads-googleads), the instrumentation could cause the error ArgumentError: wrong number of arguments (given 3, expected 2). The gRPC instrumentation has been updated to prevent this issue from occurring in the future.

    Thank you to @FeminismIsAwesome for bringing this issue to our attention.

Support statement

New Relic recommends that you upgrade the agent regularly and at a minimum every 3 months. As of this release, the oldest supported version is 6.5.0.357.

August 17, 2022
Ruby agent v8.10.0

v8.10.0

  • New gRPC instrumentation

    The agent will now instrument gRPC activity performed by clients and servers that use the grpc RubyGem. Instrumentation is automatic and enabled by default, so gRPC users should not need to modify any existing application code or agent configuration to benefit from the instrumentation. The instrumentation makes use of distributed tracing for a comprehensive overview of all gRPC traffic taking place across multiple monitored applications. This allows you to observe your client and server activity using any service that adheres to the W3C standard.

    The following new configuration parameters have been added for gRPC. All are optional.

    Configuration nameDefaultBehavior
    instrumentation.grpc_clientautoSet to 'disabled' to disable, set to 'chain' if there are module prepending conflicts
    instrumentation.grpc_serverautoSet to 'disabled' to disable, set to 'chain' if there are module prepending conflicts
    instrumentation.grpc.host_denylist""Provide a comma delimited list of host regex patterns (ex: "private.com$,exception.*")
  • Code-level metrics functionality is enabled by default

    The code-level metrics functionality for the Ruby agent's CodeStream integration is now enabled by default after we have received positive feedback and no open bugs for the past two releases.

  • Performance: Rework timing range overlap calculations for multiple transaction segments

    Many thanks to GitHub community members @bmulholland and @hkdnet. @bmulholland alerted us to rmosolgo/graphql-ruby#3945. That Issue essentially notes that the New Relic Ruby agent incurs a significant perfomance hit when the graphql RubyGem (which ships with New Relic Ruby agent support) is used with DataLoader to generate a high number of transactions. Then @hkdnet diagnosed the root cause in the Ruby agent and put together both a proof of concept fix and a full blown PR to resolve the problem. The agent keeps track multiple segments that are concurrently in play for a given transaction in order to merge the ones whose start and stop times intersect. The logic for doing this find-and-merge operation has been reworked to a) be deferred entirely until the transaction is ready to be recorded, and b) made more performant when it is needed. GraphQL DataLoader users and other users who generate lots of activity for monitoring within a short amount of time will hopefully see some good performance gains from these changes.

  • Performance: Make frozen string literals the default for the agent

    The Ruby frozen_string_literal: true magic source code comment has now been applied consistently across all Ruby files belonging to the agent. This can provide a performance boost, given that Ruby can rely on the strings remaining immutable. Previously only about a third of the agent's code was freezing string literals by default. Now that 100% of the code freezes string literals by default, we have internally observed some related performance gains through testing. We are hopeful that these will translate into some real world gains in production capacities.

  • Bugfix: Error when setting the yaml configuration with transaction_tracer.transaction_threshold: apdex_f

    Originally, the agent was only checking the transaction_tracer.transaction_threshold from the newrelic.yml correctly if it was on two lines.

    Example:

    # newrelic.yml
    transaction_tracer:
    transaction_threshold: apdex_f

    When this was instead changed to be on one line, the agent was not able to correctly identify the value of apdex_f.

    Example:

    # newrelic.yml
    transaction_tracer.transaction_threshold: apdex_f

    This would cause prevent transactions from finishing due to the error ArgumentError: comparison of Float with String failed. This has now been corrected and the agent is able to process newrelic.yml with a one line transaction_tracer.transaction_threshold: apdex_f correctly now.

    Thank you to @oboxodo for bringing this to our attention.

  • Bugfix: Don't modify frozen Logger

    Previously the agent would modify each instance of the Logger class by adding a unique instance variable as part of the instrumentation. This could cause the error FrozenError: can't modify frozen Logger to be thrown if the Logger instance had been frozen. The agent will now check if the object is frozen before attempting to modify the object. Thanks to @mkcosta for bringing this issue to our attention.

Support statement

New Relic recommends that you upgrade the agent regularly and at a minimum every 3 months. As of this release, the oldest supported version is 6.5.0.357.

July 11, 2022
Ruby agent v8.9.0

v8.9.0

  • Add support for Dalli 3.1.0 to Dalli 3.2.2

    Dalli versions 3.1.0 and above include breaking changes where the agent previously hooked into the gem. We have updated our instrumentation to correctly hook into Dalli 3.1.0 and above. At this time, 3.2.2 is the latest Dalli version and is confirmed to be supported.

  • Bugfix: Infinite Tracing hung on connection restart

    Previously, when using infinite tracing, the agent would intermittently encounter a deadlock when attempting to restart the infinite tracing connection. This bug would prevent the agent from sending all data types, including non-infinite-tracing-related data. This change reworks how we restart Infinite Tracing to prevent potential deadlocks.

  • Bugfix: Use read_nonblock instead of read on pipe

    Previously, our PipeChannelManager was using read which could cause resque jobs to get stuck in some versions. This change updates the PipeChannelManager to use read_nonblock instead to avoid this issue.

Support statement

New Relic recommends that you upgrade the agent regularly and at a minimum every 3 months. As of this release, the oldest supported version is 6.5.0.357.

June 2, 2022
Ruby agent v8.8.0

v8.8.0

  • Support Makara database adapters with ActiveRecord

    Thanks to a community submission from lucasklaassen with PR #1177, the Ruby agent will now correctly work well with the Makara gem. Functionality such as SQL obfuscation should now work when Makara database adapters are used with Active Record.

  • Lowered the minimum payload size to compress

    Previously the Ruby agent used a particularly large payload size threshold of 64KiB that would need to be met before the agent would compress data en route to New Relic's collector. The original value stems from segfault issues that very old Rubies (older than 2.2) used to encounter when compressing smaller payloads. This value has been lowered to 2KiB (2048 bytes), which should provide a more optimal balance between the CPU cycles spent on compression and the bandwidth savings gained from it.

  • Provide Code Level Metrics for New Relic CodeStream

    For Ruby on Rails applications and/or those with manually traced methods, the agent is now capable of reporting metrics with Ruby method-level granularity. When the new code_level_metrics.enabled configuration parameter is set to a true value, the agent will associate source-code-related metadata with the metrics for things such as Rails controller methods. Then, when the corresponding Ruby class file that defines the methods is loaded up in a New Relic CodeStream-powered IDE, the four golden signals for each method will be presented to the developer directly.

  • Supportability Metrics will always report uncompressed payload size

    New Relic's agent specifications call for Supportability Metrics to always reference the uncompressed payload byte size. Previously, the Ruby agent was calculating the byte size after compression. Furthermore, compression is only performed on payloads of a certain size. This means that sometimes the value could have represented a compressed size and sometimes an uncompressed one. Now the uncompressed value is always used, bringing consistency for comparing two instances of the same metric and alignment with the New Relic agent specifications.

Support statement

New Relic recommends that you upgrade the agent regularly and at a minimum every 3 months. As of this release, the oldest supported version is 6.5.0.357.

Copyright © 2025 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.