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

Ruby agent v9.0.0

February 21, 2023Download

Importante

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 at most 90 days old. Read more about keeping agent up to date.

As of this release, the oldest supported version is 6.10.0

v9.0.0

Version 9.0.0 of the agent removes several deprecated configuration options and API methods, enables Thread tracing by default, adds Fiber instrumentation, removes support for Ruby versions 2.2 and 2.3, removes instrumentation for several deprecated gems, changes how the API method set_transaction_name works, and updates rails_defer_initialization to be an environment variable only configuration option.

  • Remove deprecated configuration options

    The following configuration options have been removed and will no longer work. Please update all configs to use the replacements listed below. PR#1782

Removed

Replacement

newrelic.yml example

analytics_events.capture_attributes

transaction_events.attributes.enabled

transaction_events.attributes.enabled: false

browser_monitoring.capture_attributes

browser_monitoring.attributes.enabled

browser_monitoring.attributes.enabled: false

error_collector.capture_attributes

error_collector.attributes.enabled

error_collector.attributes.enabled: false

resque.capture_params

attributes.include

attributes.include: ['job.resque.args.*']

sidekiq.capture_params

attributes.include

attributes.include: ['job.sidekiq.args.*']

transaction_tracer.capture_attributes

transaction_tracer.attributes.enabled

transaction_tracer.attributes.enabled: false

error_collector.ignore_errors

error_collector.ignore_classes

error_collector.ignore_classes: ['ActionController::RoutingError', 'CustomError']

analytics_events.enabled

transaction_events.enabled

transaction_events.enabled: false

analytics_events.max_samples_stored

transaction_events.max_samples_stored

transaction_events.max_samples_stored: 1200

disable_database_instrumentation

disable_sequel_instrumentation

disable_sequel_instrumentation: true

disable_bunny

instrumentation.bunny

instrumentation.bunny: disabled

disable_curb

instrumentation.curb

instrumentation.curb: disabled

disable_dj

instrumentation.delayed_job

instrumentation.delayed_job: disabled

disable_excon

instrumentation.excon

instrumentation.excon: disabled

disable_grape

instrumentation.grape

instrumentation.grape: disabled

disable_grape_instrumentation

instrumentation.grape

instrumentation.grape: disabled

disable_httpclient

instrumentation.httpclient

instrumentation.httpcient: disabled

disable_httprb

instrumentation.httprb

instrumentation.httprb: disabled

disable_dalli

instrumentation.memcache

instrumentation.memcache: disabled

disable_dalli_cas_client

instrumentation.memcache

instrumentation.memcache: disabled

disable_memcache_client

instrumentation.memcache-client

instrumentation.memcache-client: disabled

disable_memcache_instrumentation

instrumentation.memcache

instrumentation.memcache: disabled

disable_memcached

instrumentation.memcached

instrumentation.memcached: disabled

disable_mongo

instrumentation.mongo

instrumentation.mongo: disabled

disable_net_http

instrumentation.net_http

instrumentation.net_http: disabled

prepend_net_instrumentation

instrumentation.net_http

instrumentation.net_http: prepend

disable_puma_rack

instrumentation.puma_rack

instrumentation.puma_rack: disabled

disable_puma_rack_urlmap

instrumentation.puma_rack_urlmap

instrumentation.puma_rack_urlmap: disabled

disable_rack

instrumentation.rack

instrumentation.rack: disabled

disable_rack_urlmap

instrumentation.rack_urlmap

instrumentation.rack_urlmap: disabled

disable_redis

instrumentation.redis

instrumentation.redis: disabled

disable_redis_instrumentation

instrumentation.redis

instrumentation.redis: disabled

disable_resque

instrumentation.resque

instrumentation.resque: disabled

disable_sinatra

instrumentation.sinatra

instrumentation.sinatra: disabled

disable_rake

instrumentation.rake

instrumentation.rake: disabled

disable_rake_instrumentation

instrumentation.rake

instrumentation.rake: disabled

disable_typhoeus

instrumentation.typhoeus

instrumentation.typhoeus: disabled

  • Enable Thread instrumentation by default

    The configuration option instrumentation.thread.tracing is now enabled by default. This configuration allows the agent to properly monitor code occurring inside threads. In Ruby agent 9.0, instrumented code within threads will be recorded and associated with the current transaction when the thread was created.

    This may be a breaking change if you are currently using custom thread instrumentation. New transactions inside of threads will no longer be started if one already exists. PR#1767

  • Add Fiber instrumentation

    Fiber instances are now automatically instrumented similarly to Thread instances. This can be configured using instrumentation.fiber. PR#1802

  • Removed support for Ruby 2.2 and 2.3

    Ruby 2.2 and 2.3 are no longer supported by the Ruby agent. To continue using the latest Ruby Agent version, please update to Ruby 2.4.0 or above. PR#1778

  • Removed deprecated instrumentation

    Instrumentation for the following gems had been previously deprecated and has now been removed. PR#1788

    • Acts As Solr
    • Authlogic
    • DataMapper
    • Rainbows
    • Sunspot

    Versions of the following technologies had been previously deprecated and are no longer supported.

    • Passenger: 2.2.x - 4.0.x
    • Puma: 2.0.x
    • Grape: 0.2.0
    • Padrino: 0.14.x
    • Rails: 3.2.x
    • Sinatra: 1.4.x, 1.5.x
    • Mongo: 1.8.x - 2.3.x
    • Sequel: 3.37.x, 4.0.x
    • Delayed_Job: 2.0.x - 4.0.x
    • Sidekiq: 4.2.x
    • Excon: below 0.55.0
    • HttpClient: 2.2.0 - 2.8.0
    • HttpRb: 0.9.9 - 2.2.1
    • Typhoeus: 0.5.3 - 1.2.x
    • Bunny: 2.0.x - 2.6.x
    • ActiveMerchant: 1.25.0 - 1.64.x
  • Updated API method set_transaction_name

    When the method NewRelic::Agent.set_transaction_name is called, it will now always change the name and category of the currently running transaction to what is passed into the method. This is a change from previous agent versions.

    Previously, if set_transaction_name was called with a new transaction name and a new category that did not match the category already assigned to a transaction, neither the new name nor category would be saved to the transaction. If this method is being called in a situation in which it was previously ignored due to category differences, this will now change the name and category of the transaction. PR#1797

  • Removed API method: NewRelic::Agent.disable_transaction_tracing

    The deprecated API method NewRelic::Agent.disable_transaction_tracing has been removed. Instead use either NewRelic::Agent#ignore_transaction to disable the recording of the current transaction or NewRelic::Agent.disable_all_tracing to yield a block without collecting any metrics or traces in any of the subsequent calls. PR#1792

  • Renamed ActiveJob metrics

    Previously, ActiveJob was categorized as a message broker, which is inaccurate. We've updated the naming of ActiveJob traces from leading with MessageBroker/ActiveJob to simply leading with ActiveJob. PR#1811

  • Code cleanup

    Thank you to community member @esquith for contributing some cleanup of orphaned constants in our code base. PR#1793 PR#1794 PR#1808

    Community member @fchatterji helped standardize how we reference NewRelic throughout our codebase PR#1795 and updated our README's community header PR#1815. Thanks fchatterji!

  • Bugfix: Allow rails initialization to be deferred by environment variable

    The Ruby agent may force some Rails libraries to load on agent initialization, preventing some settings defined in config/initializers from being applied. Changing the initialization process to run after config/initializers, however, may break the configuration for other gems (ex. Roadie Rails).

    For those having troubles with agent initialization and Rails initializers, you can now pass the environment variable NEW_RELIC_DEFER_RAILS_INITIALIZATION=true to make the agent initialize after config/initializers are run. This config option can only be set using an environment variable and can't be set using YAML. PR#1791

    Thanks to @jdelStrother for bringing this issue to our attention and testing our fixes along the way. Issue#662

Copyright © 2024 New Relic Inc.

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