• English日本語한국어
  • Log inStart now

Ruby agent v9.6.0

October 30, 2023Download

Important

We recommend updating to the latest agent version as soon as it's available. If you can't upgrade to the latest version, update your agents to a version no more than 90 days old. Read more about keeping agents up to date.

See the New Relic Ruby agent EOL policy for information about agent releases and support dates.

v9.6.0

Version 9.6.0 adds instrumentation for Async::HTTP, Ethon, and HTTPX, adds the ability to ignore specific routes with Roda, gleans Docker container IDs from cgroups v2-based containers, records additional synthetics attributes, fixes an issue with Rails 7.1 that could cause duplicate log records to be sent to New Relic, fixes a deprecation warning for the Sidekiq error handler, adds additional attributes for OpenTelemetry compatibility, and resolves some technical debt, thanks to the community.

  • Feature: Add instrumentation for Async::HTTP

    The agent will now record spans for Async::HTTP requests. Versions 0.59.0 and above of the async-http gem are supported. PR#2272

  • Feature: Add instrumentation for Ethon

    Instrumentation has been added for the Ethon HTTP client gem. Versions 0.12.0 and above are supported. The agent will now record external request segments for invocations of Ethon::Easy#perform and Ethon::Multi#perform. NOTE: The Typhoeus gem is maintained by the same team that maintains Ethon and depends on Ethon for its functionality. To prevent duplicate reporting for each HTTP request, the Ethon instrumentation will be disabled when Typhoeus is detected. PR#2260

  • Feature: Add instrumentation for HTTPX

    The agent now offers instrumentation for the HTTP client HTTPX, provided the gem is at version 1.0.0 or above. PR#2278

  • Feature: Prevent the agent from starting in "rails" commands in Rails 7

    Previously, the agent ignored many Rails commands by default, such as rails routes, using Rake-specific logic. This was accomplished by setting these commands as default values for the config option autostart.denylisted_rake_tasks. However, Rails 7 no longer uses Rake for these commands, causing the agent to start running and attempting to record data when running these commands. The commands have now been added to the default value for the config option autostart.denylisted_constants, which will allow the agent to recognize these commands correctly in Rails 7 and prevent the agent from starting during ignored tasks. Note that the agent will continue to start-up when the rails server and rails runner commands are invoked. PR#2239

  • Feature: Glean Docker container ID for cgroups v2-based containers

    Previously, the agent was only capable of determining a host Docker container's ID if the container was based on cgroups v1. Now, containers based on cgroups v2 will also have their container IDs reported to New Relic. PR#2229.

  • Feature: Update events with additional synthetics attributes when available

    The agent will now record additional synthetics attributes on synthetics events if these attributes are available. PR#2203

  • Feature: Declare a gem dependency on the Ruby Base 64 gem 'base64'

    For compatibility with Ruby 3.4 and to silence compatibility warnings present in Ruby 3.3, declare a dependency on the base64 gem. The New Relic Ruby agent uses the native Ruby base64 gem for Base 64 encoding/decoding. The agent is joined by Ruby on Rails (rails/rails@3e52adf) and others in making this change in preparation for Ruby 3.3/3.4. PR#2238

  • Feature: Add Roda support for the newrelic_ignore* family of methods

    The agent can now selectively disable instrumentation for particular requests within Roda applications. Supported methods include:

    • newrelic_ignore: ignore a given route.
    • newrelic_ignore_apdex: exclude a given route from consideration in overall Apdex calculations.
    • newrelic_ignore_enduser: prevent automatic injection of the page load timing JavaScript when a route is rendered.

    For more information, see Roda Instrumentation. PR#2267

  • Feature: Add additional span attributes for OpenTelemetry compatibility

    For improved compatibility with OpenTelemetry's semantic conventions, the agent's datastore (for databases) and external request (for HTTP clients) segments have been updated with additional attributes.

    Datastore segments now offer 3 additional attributes:

    • db.system: The database system. For Ruby we use the database adapter name here.
    • server.address: The database host.
    • server.port: The database port.

    External request segments now offer 3 additional attributes:

    • http.request.method: The HTTP method (ex: 'GET')
    • server.address: The target host.
    • server.port: The target port.

    For maximum backwards compatibility, no existing attributes have been renamed or removed. PR#2283

  • Bugfix: Stop sending duplicate log events for Rails 7.1 users

    Rails 7.1 introduced the public API ActiveSupport::BroadcastLogger. This logger replaces a private API, ActiveSupport::Logger.broadcast. In Rails versions below 7.1, the agent uses the broadcast method to stop duplicate logs from being recoded by broadcasted loggers. Now, we've updated the code to provide a similar duplication fix for the ActiveSupport::BroadcastLogger class. PR#2252

  • Bugfix: Resolve Sidekiq 8.0 error handler deprecation warning

    Sidekiq 8.0 will require procs passed to the error handler to include three arguments: error, context, and config. Users running sidekiq/main would receive a deprecation warning with this change any time an error was raised within a job. Thank you, @fukayatsu for your proactive fix! PR#2261

  • Community: Resolve technical debt

    We also received some great contributions from community members to resolve some outstanding technical debt issues. Thank you for your contributions!

Copyright © 2024 New Relic Inc.

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