v6.4.0
Custom Metadata Collection
The agent now collects environment variables prefixed by
NEW_RELIC_METADATA_
. These may be added to transaction events to provide context between your Kubernetes cluster and your services. For details on the behavior, see this blog post.Bugfix for faster ActiveRecord connection resolution
Version 6.3.0 of the agent backported the faster ActiveRecord connection resolution from Rails 6.0 to previous versions, but the implementation caused certain other gems which measured ActiveRecord performance to stop working. This version of the agent changes the implementation of this performance improvement so no such conflicts occur.
Bugfix for Grape instrumentation error
Previous versions of the agent would fail to install Grape instrumentation in Grape versions 1.2.0 and up if the API being instrumented subclassed
Grape::API::Instance
rather thanGrape::API
. A warning would also print to the newrelic_agent log:WARN : Error in Grape instrumentationWARN : NoMethodError: undefined method `name' for nil:NilClassThis version of the agent successfully installs instrumentation for subclasses of
Grape::API::Instance
, and these log messages should no longer appear.Bugfix for streaming responses
Previous versions of the agent would attempt to insert JavaScript instrumentation into any streaming response that did not make use of
ActionController::Live
. This resulted in an empty, non-streamed response being sent to the client.This version of the agent will not attempt to insert JavaScript instrumentation into a response which includes the header
Transfer-Encoding=chunked
, which indicates a streaming response.This should exclude JavaScript instrumentation for all streamed responses. To include this instrumentation manually, see Manually instrument via agent API in our documentation.
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
anddisable_active_record_5
settings in NewRelic.yml are being deprecated in favor of the newdisable_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
scriptFor 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!
v6.2.0
Bugfix for superfluous
Empty JSON response
error messagesVersion 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 messagesRuby 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.
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 anil
value. Previous Ruby Agent versions raised aNoMethodError
when trying to process this result. Now, the agent correctly skips processing fornil
values. Thanks to Matt Campbell for the contribution.
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 itsin_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
orTransaction.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.
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!
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 withActionController::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 thetransaction_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.
v5.5.0
Bugfix for
perform
instrumentation with curb gemUse 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 deleteddeveloper_mode
option. Thanks to Yuichiro Kaneko for the contribution!
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
deprecatedNewRelic::Agent.disable_transaction_tracing
has been deprecated. Users are encouraged to useNewRelic::Agent.disable_all_tracing
orNewRelic::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
Previously, some users encountered a bug where span events would not be sent from Resque processes due to a missing endpoint, resulting in errors containing the text
NoMethodError: undefined method span_event_data
.Span events can now be successfully sent from Resque processes.
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 the
distributed_tracing.enabled
configuration option totrue
.