APM logs-in-context log forwarding on by default
Automatic application log forwarding is now enabled by default. This version of the agent will automatically send enriched application logs to New Relic. To learn more about about this feature see here, and additional configuration options are available here. To learn about how to toggle log ingestion on or off by account see here.
Improved async support and Thread instrumentation
Previously, the agent was not able to record events and metrics inside Threads created inside of an already running transaction. This release includes 2 new configuration options to support multithreaded applications to automatically instrument threads. A new configuration option,
instrumentation.thread.tracing(disabled by default), has been introduced that, when enabled, will allow the agent to insert New Relic tracing inside of all Threads created by an application. To support applications that only want some threads instrumented by New Relic, a new class is available,
NewRelic::TracedThread, that will create a thread that includes New Relic instrumentation, see our API documentation for more details.
New configuration options included in this release:
Configuration name Default Behavior
Allows the agent to correctly nest spans inside of an asyncronous transaction.
Automatically add tracing to all Threads created in the application. This may be enabled by default in a future release.
We'd like to thank @mikeantonelli for sharing a gist with us that provided our team with an entry point for this feature.
Deprecate support for Ruby 2.2
Ruby 2.2 reached end of life on March 31, 2018. The agent has deprecated support for Ruby 2.2 and will make breaking changes for this version in its next major release.
Added updated configuration options for transaction events and deprecated previous configs
This release deprecates the following instrumentation:
Deprecated Replacement ActiveMerchant 1.64.0 or lower ActiveMerchant 1.65.0 or higher ActiveRecord 220.127.116.11 or lower ActiveRecord 4.0.0 or higher Acts As Solr (all versions) none Authlogic (all versions) none Bunny 2.6.7 or lower Bunny 2.7.0 or higher Dalli 2.7.6 or lower Dalli 2.7.7 or higher DataMapper (all versions) none Delayed Job 4.1.2 or lower Delayed Job 4.1.3 or higher Excon 0.55.0 or lower Excon 0.56.0 or higher Grape 0.19.1 or lower Grape 0.19.2 or higher HTTPClient 18.104.22.168 or lower HTTPClient 2.8.3 HTTP.rb 2.2.1 or lower HTTP.rb 2.2.2 or higher Mongo 2.4.0 or lower Mongo 2.4.1 or higher Padrino 0.14.4 or lower Padrino 0.15.0 or higher Passenger 5.1.2 or lower Passenger 5.1.3 or higher Puma 3.8.2 or lower Puma 3.9.0 or higher Rack 1.6.7 or lower Rack 1.6.8 or higher Rails 22.214.171.124 or lower Rails 4.0.0 or higher Rainbows (all versions) none Sequel 4.44.0 or lower Sequel 4.45.0 or higher Sidekiq 4.2.10 or lower Sidekiq 5.0.0 or higher Sinatra 1.4.8 or lower Sinatra 2.0.0 or higher Sunspot (all versions) none Typhoeus 1.1.2 or lower Typhoeus 1.3.0 or higher Unicorn 5.2.0 or lower Unicorn 5.3.0 or higher
For the gems with deprecated versions, we will no longer test those versions in our multiverse suite. They may, however, still be compatible with the agent. We will no longer fix bug reports for issues with these versions of the gem.
When dynamically checking for or obtaining a handle to a class constant from a string, leverage the
Objectclass's built in methods wherever possible to enjoy simpler, more performant operations. All JRubies and CRubies v2.5 and below need a bit of assistance beyond what
Objectcan provide given that those Rubies may yield an unwanted constant from a different namespace than the one that was specified. But for all other Rubies and even for those Rubies in contexts where we can 100% trust the string value coming in, leverage the
Objectclass's methods and reap the benefits.
Clarify documentation for
rake.tasksdescription in the default
newrelic.ymlfile and the New Relic Ruby Agent Configuration docs have been updated to clarify its behavior and usage. The documentation now reads:
Specify an array of Rake tasks to automatically instrument. This configuration option converts the Array to a RegEx list. If you'd like to allow all tasks by default, use
rake.tasks: [.+]. Rake tasks will not be instrumented unless they're added to this list. For more information, visit the (New Relic Rake Instrumentation docs)[/docs/apm/agents/ruby-agent/background-jobs/rake-instrumentation].
We thank @robotfelix for suggesting these changes.
Enable Environment Variables setting Array configurations to be converted to Arrays
Prior to this change, when comma-separated lists were passed as environment variables, an error would be emitted to the
newrelic_agent.logand a String would be set as the value. Now, Arrays will be accurately coerced.
Bugfix: Allow TransactionEvents to be sampled at the expected rate
transaction_events.max_samples_storedcapacity value within the TransactionEventAggregator did not match up with its expected harvest cycle interval, causing TransactionEvents to be over-sampled. This bugfix builds upon the updates made in #952 so that the interval and capacity behave as expected for the renamed
Bugfix: Error events missing attributes when created outside of a transaction
Previously the agent was not assigning a priority to error events that were created by calling notice_error outside the scope of a transaction. This caused issues with sampling when the error event buffer was full, resulting in a
NoMethodError: undefined method '<' for nil:NilClassin the newrelic_agent.log. This bugfix ensures that a priority is always assigned on error events so that the agent will be able to sample these error events correctly. Thank you to @olleolleolle for bringing this issue to our attention.
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 126.96.36.1990.