Bugfix for transactions with
Previously, transactions containing
ActionController::Liveresulted 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
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/excludeoptions) and from transaction segments (via the
As with other attribute destinations, these new options will inherit values from the top-level
attributes.include/excludesettings. 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_framesconfiguration option. Thanks to Patrick Tulskie for the contribution!
Update link in documentation
The community forum link in
README.mdnow 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.
performinstrumentation with curb gem
Use of curb's
performmethod 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.
config.dotdiagram of the agent's configuration settings no longer includes the deleted
developer_modeoption. Thanks to Yuichiro Kaneko for the contribution!
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_tracinghas been deprecated. Users are encouraged to use
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.
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 the
distributed_tracing.enabledconfiguration option to
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.
Finished segments whose
truewill now post Span events to Insights.
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.
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!
webpacker:compileto blacklisted tasks
webpacker:compileis commonly used for compiling assets. It has been added to
AUTOSTART_BLACKLISTED_RAKE_TASKSin the default configuration. Thanks to Claudio B. for the contribution!
Make browser instrumentation W3C-compliant
<script>tag under W3C. The
typeattribute has now been removed from browser instrumentation. Thanks to Spharian for the contribution!
If a third-party library calls
add_method_tracerbefore 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
In rare cases, the agent was not instrumenting Resque
beforehooks. 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).
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.
- 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.uriCollected as an Agent Attribute
Users can now control the collection of
request.urion 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.
- Bugfix for Manual Browser Instrumentation
There was a previous bug that required setting both
browser.auto_instrument: falseto 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.
- Expected Error API
The agent now sends up
error.expectedas an intrinsic attribute on error events and error traces. When you pass
expected: trueto the
notice_errormethod, 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.
set_transaction_namepublic API method
The agent now permits the
:messagecategory to be passed into the public API method
set_transaction_name, which will enable the transaction to be displayed as a messaging transaction.
Users may now set the
prepend_active_record_instrumentationoption in their agent config to install Active Record 3 or 4 instrumentation using
- Use Lazy load hooks for
The agent now uses lazy load hooks to hook on
ActionController::API. Thanks Edouard Chin for the contribution!
- Use Lazy load hooks for
The agent uses lazy load hooks when recording supportability metrics for
ActiveRecord::Relation. Thanks Joseph Haig for the contribution!
- Check that
Rails::VERSIONis defined instead of just
The agent now checks that
Rails::VERSIONis defined since there are cases where
Railsis defined but
Rails::VERSIONis 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
NoMethodErrorbecause the reply-to queue was expected to be a
Queueobject instead of a string.