v4.0.0
Require Ruby 2.0.0+
The agent no longer supports Ruby versions prior to 2.0, JRuby 1.7 and earlier, and all versions of Rubinius. Customers using affected Rubies can continue to run 3.x agent versions, but new features or bugfixes will not be published for 3.x agents. For more information, check out our community forum.
OkJson vendored library removed
Ruby 1.8 did not include the JSON gem by default, so the agent included a vendored version of OkJson that it would fall back on using in cases where the JSON gem was not available. This has been removed.
YAJL workaround removed
yajl-ruby versions prior to 1.2 had the potential to cause a segmentation fault when working large, deeply-nested objects like thread profiles. If you are using yajl-ruby with the
JSONmonkey patches enabled by requiringyajl/json_gem, you should upgrade to at least version 1.2.Deprecated APIs removed
Agent.abort_transaction!Agent.add_custom_parametersAgent.add_request_parametersAgent.browser_timing_footerAgent.get_statsAgent.get_stats_no_scopeAgent.record_transactionAgent.reset_statsAgent.set_user_attributesAgent::Instrumentation::RackActionController#newrelic_notice_errorActiveRecordHelper.rollup_metrics_for(may be incompatible with newrelic_moped)Instrumentation::MetricFrame.recording_web_transaction?Instrumentation::MetricFrame.abort_transaction!MethodTracer.get_stats_scopedMethodTracer.get_stats_unscopedMethodTracer.trace_method_executionMethodTracer.trace_method_execution_no_scopeMethodTracer.trace_method_execution_with_scopeMetricSpec#subMetricStats#get_statsMetricStats#get_stats_no_scopeNoticedError#exception_classRack::ErrorCollectorStatsEngine::Samplers.add_samplerStatsEngine::Samplers.add_harvest_sampler
The above methods have had deprecation notices on them for some time and have now been removed. Assistance migrating usage of these APIs is available at https://docs.newrelic.com/docs/agents/ruby-agent/troubleshooting/update-... .
The agent no longer deletes deprecated keys passed to
add_method_tracer. Passing in deprecated keys can cause an exception. Ensure that you are not passing any of the following keys::force, :scoped_metric_only, :deduct_call_time_from_parenttoadd_method_tracer.The agent no longer deletes deprecated keys passed in as options to
NewRelic::Agent.notice_error. If you are passing any of these deprecated keys::request_params, :request, :refererto thenotice_errorAPI, please delete them otherwise they will be collected as custom attributes.Error handling changes
The agent now only checks for
original_exceptionin environments with Rails versions prior to 5. Checking forException#causehas been removed. In addition, the agent now will match class name with message and backtrace when noticing errors that have anoriginal_exception.