Ruby Release Notes

Tuesday, April 30, 2019 - 12:00 Download

v6.3.0

  • Official Rails 6.0 support

    This version of the agent has been verified against the Rails 6.0.0 release.

    As ActiveRecord 4, 5, and 6 use the same New Relic instrumentation, the disable_active_record_4 and disable_active_record_5 settings in NewRelic.yml are being deprecated in favor of the new disable_active_record_notifications. This new setting will affect the instrumentation of ActiveRecord 4, 5, and 6. The deprecated settings will be removed in a future release.

  • Bugfix for newrelic deployments script

    For applications housed in the EU, the newrelic deployments script included with previous versions of the agent would fail with the following message: Deployment not recorded: Application does not exist. This is because the script would attempt to send the deployment notification to the US region. The deployment script now sends deployments to the correct region.

  • Faster ActiveRecord connection resolution

    This version of the agent uses the faster ActiveRecord connection resolution that Rails 6.0 uses, even on previous versions of Rails. Thanks to Callum Jones for the contribution!

  • Support non-ascii characters in hostnames

    Previous versions of the agent would frequently log warnings like: log writing failed. "\xE2" from ASCII-8BIT to UTF-8 if the hostname contained a non-ascii character. This version of the agent will no longer log these warnings. Thanks to Rafael Petry for the contribution!

Monday, March 18, 2019 - 12:00 Download

v6.2.0

  • Bugfix for superfluous Empty JSON response error messages

    Version 6.1.0 of the agent frequently logged error messages about an empty JSON response, when no error had occurred. These logs no longer appear.

  • Bugfix for Unable to calculate elapsed transaction time warning messages

    Ruby Agent versions 5.4 through 6.1, when running in jruby without ObjectSpace enabled, would occasionally log a warning indicating that the agent was unable to calculate the elapsed transaction time. When this log statement appeared, the affected transactions would not be included in the data displayed on the capacity analysis page. These transactions are now correctly recorded.

Tuesday, February 26, 2019 - 09:00 Download

v6.1.0

  • Performance monitoring on Kubernetes

    This release adds Transaction event attributes that provide context between your Kubernetes cluster and services. For details on the benefits, see this blog post.

  • Bugfix for Bunny instrumentation when popping empty queues

    When a customer calls Bunny::Queue#pop on an empty queue, Bunny returns a nil value. Previous Ruby Agent versions raised a NoMethodError when trying to process this result. Now, the agent correctly skips processing for nil values. Thanks to Matt Campbell for the contribution.

Monday, January 28, 2019 - 11:55 Download

v6.0.0

  • Tracer API for flexible custom instrumentation

    With agent version 6.0, we are introducing the Tracer class, an officially supported public API for more flexible custom instrumentation. By calling its in_transaction method, you can instrument an arbitrary section of Ruby code without needing to juggle any explicit state. Behind the scenes, the agent will make sure that the measured code results in an APM segment inside a transaction.

    The same API contains additional methods for creating transactions and segments, and for interacting with the current transaction. For more details, see the custom instrumentation documentation.

    If you were previously using any of the agent's private, undocumented APIs, such as Transaction.wrap or Transaction.start/stop, you will need to update your code to use the Tracer API.

    The full list of APIs that were removed or deprecated are:

    • External.start_segment
    • Transaction.create_segment
    • Transaction.start
    • Transaction.stop
    • Transaction.start_datastore_segment
    • Transaction.start_segment
    • Transaction.wrap
    • TransactionState.current_transaction

      If are you using any of these APIs, please see the upgrade guide for a list of replacements.

  • Agent detects Rails 6.0

    The agent properly detects Rails 6.0 and no longer logs an error when started in a Rails 6.0 environment. This does not include full Rails 6.0 support, which will be coming in a future release. Thanks to Jacob Bednarz for the contribution.

Monday, January 14, 2019 - 13:39 Download

v5.7.0

  • Ruby 2.6 support

    We have tested the agent with the official release of Ruby 2.6.0 made on December 25, 2018.

  • Support for loading Sequel core standalone

    The agent will now enable Sequel instrumentation when an application loads Sequel's core standalone, which does not use the Sequel:Model class. Thanks to Vasily Kolesnikov for the contribution!

  • Grape 1.2 support

    With agent versions 5.6 and earlier, Grape 1.2 apps reported their transactions under the name Proc#call instead of the name of the API endpoint. Starting with agent version 5.7, all existing versions of Grape will report the correct transaction name. Thanks to Masato Ohba for the contribution!

Wednesday, December 12, 2018 - 12:44 Download

v5.6.0

  • Bugfix for transactions with ActionController::Live

    Previously, transactions containing ActionController::Live resulted in incorrect calculations of capacity analysis as well as error backtraces appearing in agent logs in agent versions 5.4 and later. The agent now correctly calculates capacity for transactions with ActionController::Live.

  • Add ability to exclude attributes from span events and transaction segments

    Agent versions 5.5 and lower could selectively exclude attributes from page views, error traces, transaction traces, and transaction events. With agent version 5.6 and higher, you can also exclude attributes from span events (via the span_events.include/exclude options) and from transaction segments (via the transaction_segments.include/exclude options).

    As with other attribute destinations, these new options will inherit values from the top-level attributes.include/exclude settings. See the documentation for more information.

  • Increasing backoff sequence on failing to connect to New Relic

    If the agent cannot reach New Relic, it will now wait for an increasing amount of time after each failed attempt. We are also starting with a shorter delay initially, which will help customer apps bounce back more quickly from transient network errors.

  • Truncation of long stack traces

    Previous versions of the agent would truncate long stack traces to 50 frames. To give customers more flexibility, we have added the error_collector.max_backtrace_frames configuration option. Thanks to Patrick Tulskie for the contribution!

  • Update link in documentation

    The community forum link in README.md now goes to the updated location. Thanks to Sam Killgallon for the contribution!

  • Active Storage instrumentation

    The agent now provides instrumentation for Active Storage, introduced in Rails 5.2. Customers will see Active Storage operations represented as segments within transaction traces.

Thursday, November 8, 2018 - 11:25 Download

v5.5.0

  • Bugfix for perform instrumentation with curb gem

    Use of curb's perform method now no longer results in nil headers getting returned.

  • Bugfix for parsing Docker container IDs

    The agent now parses Docker container IDs correctly regardless of the cgroup parent.

  • Use lazy load hooks for ActiveJob instrumentation

    In some instances the ActiveJob instrumentation could trigger ActiveJob to load before it was initialized by Rails. This could result in configuration changes not being properly applied. The agent now uses lazy load hooks which fixes this issue.

  • Documentation improvement

    The config.dot diagram of the agent's configuration settings no longer includes the deleted developer_mode option. Thanks to Yuichiro Kaneko for the contribution!

Tuesday, September 11, 2018 - 10:45 Download

v5.4.0

  • Capacity analysis for multi-threaded dispatchers

    Metrics around capacity analysis did not previously account for multi-threaded dispatchers, and consequently could result in capacities of over 100% being recorded. This version now properly accounts for multi-threaded dispatchers.

  • NewRelic::Agent.disable_transaction_tracing deprecated

    NewRelic::Agent.disable_transaction_tracing has been deprecated. Users are encouraged to use NewRelic::Agent.disable_all_tracing or NewRelic::Agent.ignore_transaction instead.

  • Bugfix for SQL over-obfuscation

    A bug, introduced in v5.3.0, where SQL could be over-obfuscated for some database adapters has been fixed.

  • Bugfix for span event data in Resque processes

    A bug where span events would not be sent from Resque processes due to a missing endpoint has been fixed.

Tuesday, July 31, 2018 - 10:52 Download

v5.3.0

  • Distributed tracing

    Distributed tracing lets you see the path that a request takes as it travels through your distributed system. By showing the distributed activity through a unified view, you can troubleshoot and understand a complex system better than ever before.

    Distributed tracing is available with an APM Pro or equivalent subscription. To see a complete distributed trace, you need to enable the feature on a set of neighboring services. Enabling distributed tracing changes the behavior of some New Relic features, so carefully consult the transition guide before you enable this feature.

    To enable distributed tracing, set thedistributed_tracing.enabled configuration option to true.

Monday, June 4, 2018 - 11:52 Download

v5.2.0

  • Use priority sampling for errors and custom events

    Priority sampling replaces the older reservoir event sampling method. With this change, the agent will maintain randomness across a given time period while improving coordination among transactions, errors, and custom events.

  • Bugfix for wrapping datastore operations

    The agent will now complete the process of wrapping datastore operations even if an error occurs during execution of a callback.

Monday, April 30, 2018 - 10:31 Download

Notes

  • Rails 5.2 support

    The Ruby agent has been validated against the latest release of Ruby on Rails!

  • Support for newer libraries and frameworks

    We have updated the multiverse suite to test the agent against current versions of several frameworks.

  • Add custom_attributes.enabled configuration option

    This option is enabled by default. When it's disabled, custom attributes will not be transmitted on transaction events or error events.

  • Fix Grape load order dependency

    The agent will now choose the correct name for Grape transactions even if the customer's app loads the agent before Grape. Thanks to Daniel Doubrovkine for the contribution!

  • Add webpacker:compile to blacklisted tasks

    webpacker:compile is commonly used for compiling assets. It has been added to AUTOSTART_BLACKLISTED_RAKE_TASKS in the default configuration. Thanks to Claudio B. for the contribution!

  • Make browser instrumentation W3C-compliant

    type="text/javascript" is optional for the <script> tag under W3C. The type attribute has now been removed from browser instrumentation. Thanks to Spharian for the contribution!

  • Deferred add_method_tracer calls

    If a third-party library calls add_method_tracer before the agent has finished starting, we now queue these calls and run them when it's safe to do so (rather than skipping them and logging a warning).

  • Bugfix for Resque around / before hooks

    In rare cases, the agent was not instrumenting Resque around and before hooks. This version fixes the error.

  • Truncation of long stack traces

    Occasionally, long stack traces would cause complications sending data to New Relic. This version truncates long traces to 50 frames (split evenly between the top and bottom of the trace).

Monday, March 26, 2018 - 11:05 Download

Notes

  • SSL connections to New Relic are now mandatory

    Prior to this version, using an SSL connection to New Relic was the default behavior, but could be overridden. SSL connections are now enforced (not overrideable).

  • Additional security checking before trying to explain multi-statement SQL queries

    Customer applications might submit SQL queries containing multiple statements (e.g., SELECT * FROM table; SELECT * FROM table). For security reasons, we should not generate explain plans in this situation.

    Although the agent correctly skipped explain plans for these queries during testing, we have added extra checks for this scenario.

  • Bugfix for RabbitMQ exchange names that are symbols

    The agent no longer raises a TypeError when a RabbitMQ exchange name is a Ruby symbol instead of a string.

  • Bugfix for audit logging to stdout

    Previous agents configured to log to stdout would correctly send regular agent logs to stdout, but would incorrectly send audit logs to a text file named "stdout". This release corrects the error.

  • Bugfix for Capistrano deployment notifications on v3.7 and beyond

    Starting with version 3.7, Capistrano uses a different technique to determine a project's version control system. The agent now works correctly with this new behavior. Thanks to Jimmy Zhang for the contribution.

Wednesday, January 31, 2018 - 11:05 Download

Notes

  • Initialize New Relic Agent before config initializers

    When running in a Rails environment, the agent registers an initializer that starts the agent. This initializer is now defined to run before config/initializers. Previously, the ordering was not specified for the initializer. This change guarantees the agent will started by the time your initializers run, so you can safely reference the Agent in your custom initializers. Thanks to Tony Ta for the contribution.

  • Ruby 2.5 Support

    The Ruby Agent has been verified to run under Ruby 2.5.

  • request.uri Collected as an Agent Attribute

    Users can now control the collection of request.uri on errors and transaction traces. Previously it was always collected without the ability to turn it off. It is now an agent attribute that can be controlled via the attributes config. For more information on agent attributes see here.

Friday, December 22, 2017 - 12:52

Notes

  • Bugfix for Manual Browser Instrumentation

    There was a previous bug that required setting both rum.enabled: false and browser.auto_instrument: false to completely disable browser monitoring. An attempt to fix this in 4.7.0 resulted in breaking manual browser instrumentation. Those changes have been reverted. We will revisit this issue in an upcoming release.

Tuesday, December 19, 2017 - 13:52

Notes

  • Expected Error API

    The agent now sends up error.expected as an intrinsic attribute on error events and error traces. When you pass expected: true to the notice_error method, both Insights and APM will indicate that the error is expected.

  • Typhoeus Hydra Instrumentation

    The agent now has request level visibility for HTTP requests made using Typhoeus Hydra.

  • Total Time Metrics are Recorded

    The agent now records Total Time metrics. In an application where segments execute concurrently, the total time can exceed the wall-clock time for a transaction. Users of the new Typhoeus Hydra instrumentation will notice this as changes on the overview page. Immediately after upgrading there will be an alert in the APM dashboard that states: "There are both old and new time metrics for this time window". This indicates that during that time window, some transactions report the total time metrics, while others do not. The message will go away after waiting for enough time to elapse and / or updating the time window.

  • Add :message category to set_transaction_name public API method

    The agent now permits the :message category to be passed into the public API method set_transaction_name, which will enable the transaction to be displayed as a messaging transaction.

  • Create prepend_active_record_instrumentation config option

    Users may now set the prepend_active_record_instrumentation option in their agent config to install Active Record 3 or 4 instrumentation using Module.prepend rather than alias_method.

  • Use Lazy load hooks for ActionController::Base and ActionController::API

    The agent now uses lazy load hooks to hook on ActionController::Base and ActionController::API. Thanks Edouard Chin for the contribution!

  • Use Lazy load hooks for ActiveRecord::Base and ActiveRecord::Relation

    The agent uses lazy load hooks when recording supportability metrics for ActiveRecord::Base and ActiveRecord::Relation. Thanks Joseph Haig for the contribution!

  • Check that Rails::VERSION is defined instead of just Rails

    The agent now checks that Rails::VERSION is defined since there are cases where Rails is defined but Rails::VERSION is not. Thanks to Alex Riedler and nilsding for the contribution!

  • Support fast RPC/direct reply-to in RabbitMQ

    The agent can now handle the pseudo-queue 'amq.rabbitmq.reply-to' in its Bunny instrumentation. Previously, using fast RPC led to a NoMethodError because the reply-to queue was expected to be a Queue object instead of a string.

Monday, November 13, 2017 - 10:20 Download

Notes

  • Public API for External Requests

    The agent now has public API for instrumenting external requests and linking up transactions via cross application tracing. See the API Guide for more details on this new functionality.

Thursday, September 28, 2017 - 13:35

Notes

  • Send synthetics headers even when CAT disabled

    The agent now sends synthetics headers whenever they are received from an external request, even if cross-application tracing is disabled.

  • Bugfix for DelayedJob Daemonization

    Customers using the delayed_job script that ships with the gem may encounter an IOError with a message indicating the stream was closed. This was due to the agent attempting to write a byte into a Pipe that was closed during the deamonization of the delayed_job script. This issue has been fixed.

  • Collect supportability metrics for public API

    The agent now collects Supportability/API/{method} metrics to track usage of all methods in the agent's public API.

  • Collect supportability metrics on Module#prepend

    The agent now collects Supportability/PrependedModules/{Module} metrics for ActiveRecord 4 and 5, ActionController 4 and 5, ActionView 4 and 5, ActiveJob 5, and ActionCable 5. These help track the adoption of the Module#prepend method so we can maintain compatibility with newer versions of Ruby and Rails.

  • Collect explain plans when using PostGIS ActiveRecord adapter

    The agent will now collect slow SQL explain plans, if configured to, on connections using the PostGIS adapter. Thanks Ari Pollak for the contribution!

  • Lazily Intialize New Relic Config

    The agent will lazily initialize the New Relic config. This allows the agent to pickup configuration from environment variables set by dotenv and similar tools.

Monday, August 28, 2017 - 11:05 Download

Notes

  • Include test helper for 3rd party use

    In 4.2.0, all test files were excluded from being packaged in the gem. An agent class method NewRelic::Agent.require_test_helper was used by 3rd party gem authors to test extensions to the agent. The required file is now included in the gem.

  • Collect cloud metadata from Azure, GCP, PCF, and AWS cloud platform

    The agent now collects additional metadata when running in AWS, GCP, Azure, and PCF. This information is used to provide an enhanced experience when the agent is deployed on those platforms.

  • Install at_exit hook when running JRuby

    The agent now installs an at_exit hook when running JRuby, which wasn't done before because of constraints related to older JRuby versions that are no longer supported.

  • User/Utilization and System/Utilization metrics not recorded after Resque forks

    The agent no longer records invalid User/Utilization and System/Utilization metrics, which can lead to negative values, in forks of Resque processes.

  • Add identifier field to agent connect settings

    The agent now includes a unique identifier in its connect settings, ensuring that when multiple agents connect to multiple different apps, data are reported for each of the apps.

  • Clear transaction state after forking now opt-in

    The agent waits to connect until the first web request when it detects it's running in a forking dispatcher. When clearing the transaction state in this situation we lose the first frame of the transaction and the subsequent trace becomes corrupted. We've made this feature opt-in and is turned off by default. This behavior only affects the first transaction after a dispatcher forks.

Monday, July 24, 2017 - 10:57

v4.3.0

  • Instrumentation for the Bunny AMQP Client

    The Bunny AMQP Client is now automatically instrumented. The agent will report data for messages sent and received by an application. Data on messages is available in both APM and Insights. Applications connected through a RabbitMQ exchange will now also be visible on Service Maps as part of Cross Application Tracing. See the message queues documentation page for more details.

  • Safely normalize external hostnames

    The agent has been updated to check for nil host values before downcasing the hostname. Thanks Rafael Valério for the contribution!

  • PageView events will not be generated for ignored transactions

    The agent now checks if transaction is ignored before injecting the New Relic Browser Agent. This will prevent PageView events from being generated for ignored transactions.

  • Datastores required explicitly in agent

    The agent has been modified to explicity require the Datastores module whereas previously there were situations where the module could be implicitly defined. Thanks Kevin Griffin for the contribution!

  • Clear transaction state after forking

    Previously, if a transaction was started and the process forks, the transaction state survived the fork and #after_fork call in thread local storage. Now, this state is cleared by #after_fork.

  • Postgis adapter reports as Postgres for datastores

    The agent now maps the Postgis adapter to Postgres for datastore metrics. Thanks Vojtěch Vondra for the contribution!

  • Deprecate :trace_only option

    The NewRelic::Agent.notice_error API has been updated to deprecate the :trace_only option in favor of :expected.

Thursday, May 25, 2017 - 13:56

v4.2.0

  • Sinatra 2.0 and Padrino 0.14.x Support

    The agent has been verified against the latest versions of Sinatra and Padrino.

  • Rails 5.1 Support

    The Ruby agent has been validated against the latest release of Ruby on Rails!

  • APP_ENV considered when determining environment

    The agent will now consider the APP_ENV environment when starting up.

  • Test files excluded from gem

    The gemspec has been updated to exclude test files from being packaged into the gem. Thanks dimko for the contribution!

Pages