• EnglishEspañol日本語한국어Português
  • Log inStart now

Ruby agent v8.0.0

September 22, 2021Download

v8.0.0

  • add_method_tracer refactored to use prepend over alias_method chaining

    This release overhauls the implementation of add_method_tracer, as detailed in issue #502. The main breaking updates are as follows:

    • A metric name passed to add_method_tracer will no longer be interpolated in an instance context as before. To maintain this behavior, pass a Proc object with the same arity as the method being traced. For example:

      # OLD
      add_method_tracer :foo, '#{args[0]}.#{args[1]}'
      # NEW
      add_method_tracer :foo, -> (*args) { "#{args[0]}.#{args[1]}" }
    • Similarly, the :code_header and :code_footer options to add_method_tracer will only accept a Proc object, which will be bound to the calling instance when the traced method is invoked.

    • Calling add_method_tracer for a method will overwrite any previously defined tracers for that method. To specify multiple metric names for a single method tracer, pass them to add_method_tracer as an array.

    See updated documentation on the following pages for full details:

  • Distributed tracing is enabled by default

    Distributed tracing tracks and observes service requests as they flow through distributed systems. Distributed tracing is now enabled by default and replaces cross application tracing.

  • Bugfix: Incorrectly loading configuration options from newrelic.yml

    The agent will now import the configuration options error_collector.ignore_messages and error_collector.expected_messages from the newrelic.yml file correctly.

  • Cross Application is now deprecated, and disabled by default

    Distributed tracing is replacing cross application tracing as the default means of tracing between services. To continue using it, enable it with cross_application_tracer.enabled: true and distributed_tracing.enabled: false

  • Update configuration option default value for span_events.max_samples_stored from 1000 to 2000

    For more information about this congfiguration option, visit the Ruby agent documentation.

  • Agent now enforces server supplied maximum value for configuration option span_events.max_samples_stored

    Upon connection to the New Relic servers, the agent will now enforce a maximum value allowed for the configuration option span_events.max_samples_stored sent from the New Relic servers.

  • Remove Ruby 2.0 required kwarg compatibility checks

    Our agent has code that provides compatibility for required keyword arguments in Ruby versions below 2.1. Since the agent now only supports Ruby 2.2+, this code is no longer required.

  • Replace Time.now with Process.clock_gettime

    Calls to Time.now have been replaced with calls to Process.clock_gettime to leverage the system's built-in clocks for elapsed time (Process::CLOCK_MONOTONIC) and wall-clock time (Process::CLOCK_REALTIME). This results in fewer object allocations, more accurate elapsed time records, and enhanced performance. Thanks to @sdemjanenko and @viraptor for advocating for this change!

  • Updated generated default newrelic.yml

    Thank you @wyhaines and @creaturenex for your contribution. The default newrelic.yml that the agent can generate is now updated with commented out examples of all configuration options.

  • Bugfix: Psych 4.0 causes errors when loading newrelic.yml

    Psych 4.0 now uses safe load behavior when using YAML.load which by default doesn't allow aliases, causing errors when the agent loads the config file. We have updated how we load the config file to avoid these errors.

  • Remove support for Excon versions below 0.19.0

    Excon versions below 0.19.0 will no longer be instrumented through the Ruby agent.

  • Remove support for Mongo versions below 2.1

    Mongo versions below 2.1 will no longer be instrumented through the Ruby agent.

  • Remove tests for Rails 3.0 and Rails 3.1

    As of the 7.0 release, the Ruby agent stopped supporting Rails 3.0 and Rails 3.1. Despite this, we still had tests for these versions running on the agent's CI. Those tests are now removed.

  • Update test Gemfiles for patched versions

    The gem has individual Gemfiles it uses to test against different common user setups. Rails 5.2, 6.0, and 6.1 have been updated to the latest patch versions in the test Gemfiles. Rack was updated in the Rails61 test suite to 2.1.4 to resolve a security vulnerability.

  • Remove Merb Support

    This release removes the remaining support for the Merb framework. It merged with Rails during the 3.0 release. Now that the Ruby agent supports Rails 3.2 and above, we thought it was time to say goodbye.

  • Remove deprecated method External.start_segment

    The method NewRelic::Agent::External.start_segment has been deprecated as of Ruby Agent 6.0.0. This method is now removed.

  • Added testing and support for the following gem versions

    • activemerchant 1.121.0
    • bunny 2.19.0
    • excon 0.85.0
    • mongo 2.14.0, 2.15.1
    • padrino 0.15.1
    • resque 2.1.0
    • sequel 5.48.0
    • yajl-ruby 1.4.1
  • This version adds support for ARM64/Graviton2 platform using Ruby 3.0.2+

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 5.4.0.347.

Copyright © 2024 New Relic Inc.

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