Find file
Fetching contributors…
Cannot retrieve contributors at this time
1548 lines (1126 sloc) 60.7 KB
# New Relic Ruby Agent Release Notes #
## v3.8.1 ##
* Better handling for Rack applications implemented as middlewares
When using a Sinatra application as a middleware around another app (for
example, a Rails app), or manually instrumenting a Rack middleware wrapped
around another application, the agent would previously generate two separate
transaction names in the New Relic UI (one for the middleware, and one for
the inner application).
As of this release, the agent will instead unify these two parts into a single
transaction in the UI. The unified name will be the name assigned to the
inner-most traced transaction by default. Calls to
NewRelic::Agent.set_transaction_name will continue to override the default
names assigned by the agent's instrumentation code.
This change also makes it possible to run X-Ray sessions against transactions
of the 'inner' application in cases where one instrumented app is wrapped in
another that's implemented as a middleware.
* Support for mongo-1.10.0
The Ruby agent now instruments version 1.10.0 of the mongo gem (versions 1.8.x
and 1.9.x were already supported, and continue to be).
* Allow setting configuration file path via an option to manual_start
Previously, passing the :config_path option to NewRelic::Agent.manual_start
would not actually affect the location that the agent would use to look for
its configuration file. This has been fixed, and the log messages emitted when
a configuration file is not found should now be more helpful.
## v3.8.0 ##
* Better support for forking and daemonizing dispatchers (e.g. Puma, Unicorn)
The agent should now work out-of-the box with no special configuration on
servers that fork or daemonize themselves (such as Unicorn or Puma in some
configurations). The agent's background thread will be automatically restarted
after the first transaction processed within each child process.
This change means it's no longer necessary to set the
'restart_thread_in_children setting' in your agent configuration file if you
were doing so previously.
* Rails 4.1 support
Rails 4.1 has shipped, and the Ruby agent is ready for it! We've been running
our test suites against the release candidates with no significant issues, so
we're happy to announce full compatibility with this new release of Rails.
* Ruby VM measurements
The Ruby agent now records more detailed information about the performance and
behavior of the Ruby VM, mainly focused around Ruby's garbage collector. This
information is exposed on the new 'Ruby VM' tab in the UI. For details about
what is recorded, see:
* Separate in-transaction GC timings for web and background processes
Previously, an application with GC instrumentation enabled, and both web and
background processes reporting in to it would show an overly inflated GC band
on the application overview graph, because data from both web and non-web
transactions would be included. This has been fixed, and GC time during web
and non-web transactions is now tracked separately.
* More accurate GC measurements on multi-threaded web servers
The agent could previously have reported inaccurate GC times on multi-threaded
web servers such as Puma. It will now correctly report GC timings in
multi-threaded contexts.
* Improved ActiveMerchant instrumentation
The agent will now trace the store, unstore, and update methods on
ActiveMerchant gateways. In addition, a bug preventing ActiveMerchant
instrumentation from working on Ruby 1.9+ has been fixed.
Thanks to Troex Nevelin for the contribution!
* More robust Real User Monitoring script injection with charset meta tags
Previous versions of the agent with Real User Monitoring enabled could have
injected JavaScript code into the page above a charset meta tag. By the HTML5
spec, the charset tag must appear in the first 1024 bytes of the page, so the
Ruby agent will now attempt to inject RUM script after a charset tag, if one
is present.
* More robust connection sequence with New Relic servers
A rare bug that could cause the agent's initial connection handshake with
New Relic servers to silently fail has been fixed, and better logging has been
added to the related code path to ease diagnosis of any future issues.
* Prevent over-counting of queue time with nested transactions
When using add_transaction_tracer on methods called from within a Rails or
Sinatra action, it was previously possible to get inflated queue time
measurements, because queue time would be recorded for both the outer
transaction (the Rails or Sinatra action) and the inner transaction (the
method given to add_transaction_tracer). This has been fixed, so only the
outermost transaction will now record queue time.
## v3.7.3 ##
* Obfuscation for PostgreSQL explain plans
Fixes an agent bug with PostgreSQL where parameters from the original query
could appear in explain plans sent to New Relic servers, even when SQL
obfuscation was enabled. Parameters from the query are now masked in explain
plans prior to transmission when transaction_tracer.record_sql is set to
'obfuscated' (the default setting).
For more information, see:
* More accurate categorization of SQL statements
Some SQL SELECT statements that were previously being mis-categorized as
'SQL - OTHER' will now correctly be tagged as 'SQL - SELECT'. This
particularly affected ActiveRecord users using PostgreSQL.
* More reliable Typhoeus instrumentation
Fixed an issue where an exception raised from a user-specified on_complete
block would cause our Typhoeus instrumentation to fail to record the request.
* Fix for Puma 2.8.0 cluster mode (
Puma's 2.8.0 release renamed a hook New Relic used to support Puma's cluster
mode. This resulted in missing data for users running Puma. Thanks Benjamin
Kudria for the fix!
* Fix for deployment command bug (
Problems with file loading order could result in `newrelic deployments`
failing with an unrecognized command error. This has been fixed.
## v3.7.2 ##
* Mongo instrumentation improvements
Users of the 'mongo' MongoDB client gem will get more detailed instrumentation
including support for some operations that were not previously captured, and
separation of aggregate metrics for web transactions from background jobs.
An issue with ensure_index when passed a symbol or string was also fixed.
Thanks Maxime RETY for the report!
* More accurate error tracing in Rails 4
Traced errors in Rails 4 applications will now be correctly associated with
the transaction they occurred in, and custom attributes attached to the
transaction will be correctly attached to the traced error as well.
* More accurate partial-rendering metrics for Rails 4
View partials are now correctly treated as sub-components of the containing
template render in Rails 4 applications, meaning that the app server breakdown
graphs for Rails 4 transactions should be more accurate and useful.
* Improved Unicorn 4.8.0 compatibility
A rare issue that could lead to spurious traced errors on app startup for
applications using Unicorn 4.8.0 has been fixed.
* meta_request gem compatibility
An incompatibility with the meta_request gem has been fixed.
* Typhoeus 0.6.4+ compatibility
A potential crash with Typhoeus 0.6.4+ when passing a URI object instead of a
String instance to one of Typhoeus's HTTP request methods has been fixed.
* Sequel single threaded mode fix
The agent will no longer attempt to run EXPLAIN queries for slow SQL
statements issued using the Sequel gem in single-threaded mode, since
doing so could potentially cause crashes.
* Additional functionality for add_custom_parameters
Calling add_custom_parameters adds parameters to the system codenamed
Rubicon. For more information, see
* Update gem signing cert (
The certificate used to sign newrelic_rpm expired in February. This patch
updates that for clients installing with verification.
## v3.7.1 ##
* MongoDB support
The Ruby agent provides support for the mongo gem, versions 1.8 and 1.9!
Mongo calls are captured for transaction traces along with their parameters,
and time spent in Mongo shows up on the Database tab.
Support for more Mongo gems and more UI goodness will be coming, so watch for up-to-date status.
* Harvest thread restarts for forked and daemonized processes
Historically framework specific code was necessary for the Ruby agent to
successfully report data after an app forked or daemonized. Gems or scripts
with daemonizing modes had to wait for agent support or find workarounds.
With 3.7.1 setting `restart_thread_in_children: true` in your newrelic.yml
automatically restarts the agent in child processes without requiring custom
code. For now the feature is opt-in, but future releases may default it on.
* Fix for missing HTTP time
The agent previously did not include connection establishment time for
outgoing Net::HTTP requests. This has been corrected, and reported HTTP
timings should now be more accurate.
* Fix for Mongo ensure_index instrumentation (
The Mongo instrumentation for ensure_index in was not properly
calling through to the uninstrumented version of this method. This has been
fixed in Thanks to Yuki Miyauchi for the fix!
* Correct first reported metric timespan for forking dispatchers (
The first time a newly-forked process (in some configurations) reported metric
data, it would use the startup time of the parent process as the start time
for that metric data instead of its own start time. This has been fixed.
## v3.7.0 ##
* Official Rubinius support (for Rubinius >= 2.2.1)
We're happy to say that all known issues with the Ruby agent running on
Rubinius have been resolved as of Rubinius version 2.2.1! See for the most up-to-date status.
* RUM injection updates
The Ruby agent's code for both automatic and manual injection of Real User
Monitoring scripts has been improved. No application changes are required, but
the new injection logic is simpler, faster, more robust, and paves the way for
future improvements to Real User Monitoring.
* More robust communication with New Relic
Failures when transmitting data to New Relic could cause data to be held over
unnecessarily to a later harvest. This has been improved both to handle
errors more robustly and consistently, and to send data as soon as possible.
* Fix for agent not restarting on server-side config changes
A bug in 3.6.9 caused the agent to not reset correctly after server-side
config changes. New settings would not be received without a full process
restart. This has been fixed.
* Blacklisting rake spec tasks
A blacklist helps the agent avoid starting during rake tasks. Some default
RSpec tasks were missing. Thanks for the contribution Kohei Hasegawa!
## v3.6.9 ##
* Experimental Rubinius 2.x support
The agent is now being tested against the latest version of Rubinius. While
support is still considered experimental, you can track the progress at for up to date status.
* Capture arguments for Resque and Sidekiq jobs
The agent can optionally record arguments for your Resque and Sidekiq jobs on
transaction traces and traced errors. This is disabled by default, but may be
enabled by setting resque.capture_params or sidekiq.capture_params.
Thanks to Juan Ignacio Pumarino, Ken Mayer, Paul Henry, and Eric Saxby for
their help with this feature!
* Supported versions rake task and documentation
We've improved our documentation for what Ruby and gem versions we support.
Run `rake newrelic:supported_versions` or see the latest agent's versions at
* ActiveRecord 4.0 explain plans for JRuby and Rubinius
The agent's ActiveRecord 4.0 instrumentation could not gather SQL explain
plans on JRuby by default because of a dependency on ObjectSpace, which isn't
avialable by default. This has been fixed.
* Fix for Curb http_put_with_newrelic
A bug in the agent caused PUT calls in the Curb gem to crash. This has been
fixed. Thanks to Michael D'Auria and Kirk Diggler for the contributions!
* Fix for head position on RUM injection
Certain unusual HTML documents resulted in browser monitoring injecting
incorrect content. Thanks Alex McHale for the contribution!
* Specify the Content-Type header in developer mode
Thanks Jared Ning for the contribution!
## v3.6.8 ##
* X-Ray Sessions support
X-Ray Sessions provide more targeted transaction trace samples and thread
profiling for web transactions. For full details see our X-Ray sessions
documentation at
* Percentiles and Histograms
The Ruby Agent now captures data that provides percentile and histogram views
in the New Relic UI.
* CPU metrics re-enabled for JRuby >= 1.7.0
To work around a JRuby bug, the Ruby agent stopped gathering CPU metrics on
that platform. With the bug fixed, the agent can gather those metrics again.
Thanks Bram de Vries for the contribution!
* Missing Resque transaction traces (
A bug in prevented transaction traces in Resque jobs from being
communicated back to New Relic. fixes this.
* Retry on initial connect (
Failure to contact New Relic on agent start-up would not properly retry. This
has been fixed.
* Fix potential memory leak on failure to send to New Relic ( introduced a potential memory leak when transmission of some kinds
of data to New Relic servers failed. fixes this.
## v3.6.7 ##
* Resque-pool support
Resque processes started via the resque-pool gem weren't recognized by the
Ruby agent. The agent now starts correctly in those worker processes.
* Environment-based configuration
All settings in newrelic.yml can now be configured via environment variables.
See for full details.
* Additional locking option for Resque (
There have been reports of worker process deadlocks in Resque when using the
Ruby agent. An optional lock is now available to avoid those deadlocks. See for more details.
* HTTP connection setup timeout (
HTTP initialization in the agent lacked an appropriate timeout,
leading to dropouts in reporting under certain network error conditions.
* Unnecessary requests from Resque jobs (
An issue causing Resque jobs to unnecessarily make requests against New Relic
servers was fixed.
* Fix compatibility issues with excon and curb instrumentation
This release of the agent fixes a warning seen under certain circumstances
with the excon gem (most notably, when excon was used by fog), as well as
a bug with the curb instrumentation that conflicted with the feedzirra gem.
* Allow license key to be set by Capistrano variables
A license key can be passed via a Capistrano variable where previously it
could only be in newrelic.yml. Thanks Chris Marshall for the contribution!
* Make HTTP client instrumentation aware of "Host" request header
If a "Host" header is set explicitly on an HTTP request, that hostname will
be used for external metrics. Thanks Mislav Marohnić for the contribution!
* Fix ActiveSupport::Concern warnings with MethodTracer
Including NewRelic::Agent::MethodTracer in a class using Concerns could cause
deprecation warnings. Thanks Mike Połtyn for the contribution!
* Fix Authlogic constant name
Code checking for the Authlogic module was using in the wrong case. Thanks
Dharam Gollapudi for the contribution!
## v3.6.6 ##
* HTTPClient and Curb support
The Ruby agent now supports the HTTPClient and Curb HTTP libraries! Cross
application tracing and more is fully supported for these libraries. For more
details see
* Sinatra startup improvements
In earlier agent versions, newrelic_rpm had to be required after Sinatra to
get instrumentation. Now the agent should start when your Sinatra app starts
up in rackup, thin, unicorn, or similar web servers.
* Puma clustered mode support
Clustered mode in Puma was not reporting data without manually adding a hook
to Puma's configuration. The agent will now automatically add this hook.
* SSL certificate verification
Early versions of the agent's SSL support provided an option to skip
certificate verification. This option has been removed.
## v3.6.5 ##
* Rails 4.0 Support
The Ruby agent is all set for the recent general release of Rails 4.0! We've
been tracking the RC's, and that work paid off. Versions 3.6.5 and 3.6.4 of
the Ruby agent should work fine with Rails 4.0.0.
* Excon and Typhoeus support
The Ruby agent now supports the Excon and Typhoeus HTTP libraries! For more
details see
## v3.6.4 ##
* Exception Whitelist
We've improved exception message handling for applications running in
high security mode. Enabling 'high_security' now removes exception messages
entirely rather than simply obfuscating any SQL.
By default this feature affects all exceptions, though you can configure a
whitelist of exceptions whose messages should be left intact.
More details:
* Fix a race condition affecting some Rails applications at startup
Some Rails applications using newrelic_rpm were affected by a race condition
at startup that manifested as an error when model classes with associations
were first loaded. The cause of these errors has been addressed by moving the
generation of the agent's EnvironmentReport on startup from a background
thread to the main thread.
## v3.6.3 ##
* Better Sinatra Support
A number of improvements have been made to our Sinatra instrumentation.
More details:
Sinatra instrumentation has been updated to more accurately reflect the final
route that was actually executed, taking pass and conditions into account.
New Relic middlewares for error collection, real user monitoring, and cross
application tracing are automatically inserted into the middleware stack.
Ignoring routes, similar to functionality available to Rails controllers, is
now available in Sinatra as well.
Routes in 1.4 are properly formatting in transaction names. Thanks Zachary
Anker for the contribution!
* Padrino Support
Along with improving our support of Sinatra, we've also extended that to
supporting Padrino, a framework that builds on Sinatra. Web transactions
should show up in New Relic now for Padrino apps automatically. The agent has
been tested against the latest Padrino in versions 0.11.x and 0.10.x.
* Main overview graph only shows web transactions
In the past database times from background jobs mixed with other web transaction
metrics in the main overview graph. This often skewed graphs. A common workaround
was to send background jobs to a separate application, but that should no longer
be necessary as the overview graphs now only represent web transactions.
## v3.6.2 ##
* Sequel support
The Ruby agent now supports Sequel, a database toolkit for Ruby. This
includes capturing SQL calls and model operations in transaction traces, and
recording slow SQL calls. See
for full details.
* Thread profiling fix
The prior release of the agent (version 3.6.1) broke thread profiling. A
profile would appear to run, but return no data. This has been fixed.
* Fix for over-counted Net::HTTP calls
Under some circumstances, calls into Net::HTTP were being counted twice in
metrics and transaction traces. This has been fixed.
* Missing traced errors for Resque applications
Traced errors weren't displaying for some Resque workers, although the errors
were factored into the overall count graphs. This has been fixed, and traced
errors should be available again after upgrading the agent.
## v3.6.1 ##
* Full URIs for HTTP requests are recorded in transaction traces
When recording a transaction trace node for an outgoing HTTP call via
Net::HTTP, the agent will now save the full URI (instead of just the hostname)
for the request. Embedded credentials, the query string, and the fragment will
be stripped from the URI before it is saved.
* Simplify Agent Autostart Logic
Previously the agent would only start when it detected a supported
"Dispatcher", meaning a known web server or background task framework. This
was problematic for customers using webservers that the agent was not
configured to detect (e.g. Puma). Now the agent will attempt to report any
time it detects it is running in a monitored environment (e.g. production).
There are two exceptions to this. The agent will not autostart in a rails
console or irb session or when the process was invoked by a rake task (e.g.
rake assets:precompile). The NEWRELIC_ENABLE environment variable can be set
to true or false to force the agent to start or not start.
* Don't attempt to resolve collector hostname when proxy is in use
When a proxy is configured, the agent will not attempt to lookup and cache the
IP address of New Relic server to which it is sending data, since DNS may not
be available in some environments. Thanks to Bill Kirtley for the contribution
* Added NewRelic::Agent.set_transaction_name and NewRelic::Agent.get_transaction_name
Ordinarily the name of your transaction is defined up-front, but if you'd like to
change the name of a transaction while it is still running you can use
**NewRelic::Agent.set_transaction_name()**. Similarly, if you need to know the name
of the currently running transaction, you can use **NewRelic::Agent.get_transaction_name()**.
## v3.6.0 ##
* Sidekiq support
The Ruby agent now supports the Sidekiq background job framework. Traces from
Sidekiq jobs will automatically show up in the Background tasks on New Relic
similar to Resque and Delayed::Job tasks.
* Improved thread safety
The primary metrics data structures in the Ruby agent are now thread safe.
This should provide better reliability for the agent under JRuby and threaded
scenarios such as Sidekiq or Puma.
* More robust environment report
The agent's analysis of the local environment (e.g. OS, Processors, loaded
gems) will now work in a wider variety of app environments, including
* Experimental Rainbows! support
The Ruby agent now automatically detects and instruments the Rainbows! web
server. This support is considered experimental at present, and has not been
tested with all dispatch modes.
Thanks to Joseph Chen for the contribution.
* Fix a potential file descriptor leak in Resque instrumentation
A file descriptor leak that occurred when DontPerform exceptions were used to
abort processing of a job has been fixed. This should allow the Resque
instrumentation work correctly with the resque-lonely_job gem.
## v3.5.8 ##
* Key Transactions
The Ruby agent now supports Key Transactions! Check out more details on the
feature at
* Ruby 2.0
The Ruby agent is compatible with Ruby 2.0.0 which was just released.
* Improved Sinatra instrumentation
Several cases around the use of conditions and pass in Sinatra are now
better supported by the Ruby agent. Thanks Konstantin for the help!
* Outbound HTTP headers
Adds a 'X-NewRelic-ID' header to outbound Net::HTTP requests. This change
helps improve the correlation of performance between services in a service-
oriented architecture for a forthcoming feature. In the meantime, to disable
the header, set this in your newrelic.yml:
enabled: false
* Automatically detect Resque dispatcher
The agent does better auto-detection for the Resque worker process.
This should reduce the need to set NEW_RELIC_DISPATCHER=resque directly.
## v3.5.7 ##
* Resolved some issues with tracking of frontend queue time, particularly
when the agent is running on an app hosted on Heroku. The agent will now
more reliably parse the headers described in and will
automatically detect whether the times provided are in seconds,
milliseconds or microseconds.
## v3.5.6 ##
* Use HTTPS by default
The agent now defaults to using SSL when it communicates with New Relic's
servers. By default is already configured New Relic does not transmit any
sensitive information (e.g. SQL parameters are masked), but SSL adds an
additional layer of security. Upgrading customers may need to remove the
"ssl: false" directive from their newrelic.yml to enable ssl. Customers on
Jruby may need to install the jruby-openssl gem to take advantage of this
* Fix two Resque-related issues
Fixes a possible hang on exit of an instrumented Resque master process
(, as well as a file descriptor
leak that could occur during startup of the Resque master process.
* Fix for error graph over 100%
Some errors were double counted toward the overall error total. This
resulted in graphs with error percentages over 100%. This duplication did
not impact the specific error traces captured, only the total metric.
* Notice gracefully handled errors in Sinatra
When show_exceptions was set to false in Sinatra, errors weren't caught
by New Relic's error collector. Now handled errors also have the chance
to get reported back.
* Ruby 2.0 compatibility fixes
Ruby 2.0 no longer finds protected methods by default, but will with a flag.
Thanks Ravil Bayramgalin and Charlie Somerville for the fixes.
* Auto-detect Trinidad as dispatcher
Code already existing for detecting Trinidad as a dispatcher, but was only
accessible via an ENV variable. This now auto-detects on startup. Thanks
Robert Rasmussen for catching that.
* Coercion of types in collector communication
Certain metrics can be recorded with a Ruby Rational type, which JSON
serializes as a string rather than a floating point value. We now treat
coerce each outgoing value, and log issues before sending the data.
* Developer mode fix for chart error
Added require to fix a NameError in developer mode for summary page. Thanks
to Ryan B. Harvey.
* Don't touch deprecated RAILS_ROOT if on Rails 3
Under some odd startup conditions, we would look for the RAILS_ROOT constant
after failing to find the ::Rails.root in a Rails 3 app, causing deprecation
warnings. Thanks for Adrian Irving-Beer for the fix.
## v3.5.5 ##
* Add thread profiling support
Thread profiling performs statistical sampling of backtraces of all threads
within your Ruby processes. This feature requires MRI >= 1.9.2, and is
controlled via the New Relic web UI. JRuby support (in 1.9.x compat mode) is
considered experimental, due to issues with JRuby's Thread#backtrace.
* Add audit logging capability
The agent can now log all of the data it sends to the New Relic servers to
a special log file for human inspection. This feature is off by default, and
can be enabled by setting the audit_log.enabled configuration key to true.
You may also control the location of the audit log with the audit_log.path key.
* Use config system for dispatcher, framework, and config file detection
Several aspects of the agent's configuration were not being handled by the
configuration system. Detection/configuration of the dispatcher (e.g. passenger,
unicorn, resque), framework (e.g. rails3, sinatra), and newrelic.yml
location are now handled via the Agent environment, manual, and default
configuration sources.
* Updates to logging across the agent
We've carefully reviewed the logging messages that the agent outputs, adding
details in some cases, and removing unnecessary clutter. We've also altered
the startup sequence to ensure that we don't spam STDOUT with messages
during initialization.
* Fix passing environment to manual_start()
Thanks to Justin Hannus. The :env key, when passed to Agent.manual_start,
can again be used to specify which section of newrelic.yml is loaded.
* Rails 4 support
This release includes preliminary support for Rails 4 as of 4.0.0.beta.
Rails 4 is still in development, but the agent should work as expected for
people who are experimenting with the beta.
## v3.5.4 ##
* Add queue time support for sinatra apps
Sinatra applications can now take advantage of front end queue time
reporting. Thanks to Winfield Peterson for this contribution.
* Simplify queue time configuration for nginx 1.2.6+
Beginning in version 1.2.6, recently released as a development version, the
$msec variable can be used to set an http header. This change allows front
end queue time to be tracked in New Relic simply by adding this line to the
nginx config:
proxy_set_header X-Queue-Start "t=${msec}000"
It will no longer be necessary to compile a patched version of nginx or
compile in the perl or lua module to enable this functionality.
Thanks to Lawrence Pit for the contribution.
* Report back build number and stage along with version info
In the 3.5.3 series the agent would fail to report its full version number
to NewRelic's environment report. For example it would report its version
as 3.5.3 instead of or The agent will now report
its complete version number as defined in newrelic_rpm.gemspec.
* The host and the port that the agent reports to can now be set from environment vars
The host can be set with NEW_RELIC_HOST and the port with NEW_RELIC_PORT. These setting
will override any other settings in your newrelic.yml.
* Fix RUM reporting to multiple applications
When the agent is configured to report to multiple "roll up" applications
RUM did not work correctly.
## v3.5.3 ##
* Update the collector protocol to use JSON and Ruby primitives
The communication between the agent and the NewRelic will not longer be
marshaled Ruby objects, but rather JSON in the case of Ruby 1.9 and marshaled
Ruby primitives in the case of 1.8. This results in greater harvest efficiency
as well as feature parity with other New Relic agents.
* Fix incorrect application of conditions in sinatra instrumentation
The agent's sinatra instrumentation was causing sinatra's conditions to
be incorrectly applied in some obscure cases. The bug was triggered
when a condition was present on a lower priority route that would match
the current request, except for the presence of a higher priority route.
## v3.5.2 ##
* Simplified process of running agent test suite and documented code
contribution process in GUIDELINES_FOR_CONTRIBUTING.
## v3.5.1 ##
* Enabling Memory Profiling on Lion and Mountain Lion
The agent's list of supported platforms for memory profiling wasn't correctly checking
for more recent versions of OS X.
* Fixed an arity issue encountered when calling newrelic_notice_error from Rails applications.
* End user queue time was not being properly reported, works properly now.
* Server-side configuration for ignoring errors was not being heeded by agent.
* Better handling of a thread safety issue.
Some issues may remain, which we are working to address, but they should be gracefully handled
now, rather than crashing the running app.
* Use "java_import" rather than "include_class" when require Java Jars into a JRuby app.
Thanks to Jan Habermann for the pull request
* Replaced alias_method mechanism with super call in DataMapper instrumentation.
Thanks to Michael Rykov for the pull request
* Fixed the Rubinius GC profiler.
Thanks to Dirkjan Bussink
* Use ActiveSupport.on_load to load controller instrumentation Rails 3.
Thanks to Jonathan del Strother
* Reduce the number of thread local reference in a particular high traffic method
Thanks to Jeremy Kemper
## v3.5.0.1 ##
* (Fix) Due to a serious resource leak we have ended support for versions of Phusion Passenger
older than 2.1.1. Users of older versions are encouraged upgrade to a more recent version.
## v3.5.0 ##
* (Fix) RUM Stops Working After Agent Upgrade
v3.4.2.1 introduced a bug that caused the browser monitor auto instrumentation
(for RUM) default to be false. The correct value of true is now used
* When the Ruby Agent detects Unicorn as the dispatcher it creates an INFO level log message
with additional information
To help customers using Unicorn, if the agent detects it (Unicorn) is being used as the
dispatcher an INFO level log message it created that includes a link to New Relic
online doc that has additional steps that may be required to get performance data reporting.
* (Fix) In version 3.4.2 of the Ruby Agent the server side value for Apdex T was disregarded
With version 3.4.2 of the agent, the value set in the newrelic.yml file took precedence over the
value set in the New Relic UI. As of version 3.5.0 only the value for Apdex T set in the
New Relic UI will be used. Any setting in the yaml file will be ignored.
* Improved Error Detection/Reporting capabilities for Rails 3 apps
Some errors are missed by the agent's exception reporting handlers because they are
generated in the rails stack, outside of the instrumented controller action. A Rack
middleware is now included that can detect these errors as they bubble out of the middleware stack.
Note that this does not include Routing Errors.
* The Ruby Agent now logs certain information it receives from the New Relic servers
After connecting to the New Relic servers the agent logs the New Relic URL
of the app it is reporting to.
* GC profiling overhead for Ruby 1.9 reduced
For Ruby 1.9 the amount of time spent in GC profiling has been reduced.
* Know issue with Ruby 1.8.7-p334, sqlite3-ruby 1.3.0 or older, and resque 1.23.0
The Ruby Agent will not work in conjunction with Ruby 1.8.7-p334, sqlite3-ruby 1.3.3
or earlier, and resque 1.23.0. Your app will likely stop functioning. This is a known problem
with Ruby versions up to 1.8.7-p334. Upgrading to the last release of Ruby 1.8.7
is recommended. This issue has been present in every version of the agent we've tested
going back for a year.
### previous versions ###
## v3.4.2.1 ##
* Fix issue when app_name is nil
If the app_name setting ends up being nil an exception got generated and the application
wouldn't run. This would notably occur when running a Heroku app locally without the
NEW_RELIC_APP_NAME environment variable set. A nil app_name is now detected and an
error logged specifying remediation.
## v3.4.2 ##
* The RUM NRAGENT tk value gets more robustly sanitized to prevent potential XSS vulnerabilities
The code that scrubs the token used in Real User Monitoring has been enhanced to be
more robust.
* Support for Apdex T in server side configuration
For those using server side configuration the Ruby Agent now supports setting
the Apdex T value via the New Relic UI.
* Refactoring of agent config code
The code that reads the configuration information and configures the agent
got substantially reorganized, consolidated, simplified, and made more robust.
## v3.4.1 ##
#### Bug Fixes ####
* Fix edge case in RUM auto instrumentation where X-UA-Compatible meta tag is
present but </head> tag is missing.
There is a somewhat obscure edge case where RUM auto instrumentation will
crash a request. The issue seems to be triggered when the X-UA-Compatible
meta tag is present and the </head> tag is missing.
* Fixed reference to @service.request_timeout to @request_timeout in
new_relic_service.rb. (Thanks to Matthew Savage)
When a timeout occurred during connection to the collector an "undefined
method `request_timeout' for nil:NilClass'" would get raised.
* preserve visibility on traced methods.
Aliased methods now have the same visibility as the original traced method.
A couple of the esoteric methods created in the process weren't getting the
visibility set properly.
* Agent service does not connect to directed shard collector after connecting
to proxy
After connecting to collector proxy name of real collector was updated, but
ip address was not being updated causing connections to go to the proxy.
Agent now looks up ip address for real collector.
* corrupt marshal data from pipe children crashing agent
If the agent received corrupted data from the Reqsue worker child agent
it could crash the agent itself. fixed.
* should reset RubyBench GC counter between polls
On Ruby REE, the GC profiler does not reset the counter between polls. This
is only a problem if GC could happen *between* transactions, as in, for
example, out-of-band GC in Unicorn. fixed.
* Prevent the agent from resolving the collector address when disabled.
* Fix for error collector configuration that was introduced during beta.
* Preserve method visibility when methods are traced with #add_method_tracer and #add_transaction_tracer
* Major refactor of data transmission mechanism. This enabled child processes to send data to parent processes, which then send the data to the New Relic service. This should only affect Resque users, dramatically improving their experience.
* Moved Resque instrumentation from rpm_contrib to main agent. Resque users should discontinue use of rpm_contrib or upgrade to 2.1.11.
* Resolve issue with configuring the Error Collector when using server-side configuration.
* [FIX] Allow tracing of methods ending in ! and ?
* [PERF] Give up after scanning first 50k of the response in RUM
* [FIX] Don't raise when extracting metrics from SQL queries with non UTF-8 bytes.
* Replaced "Custom/DJ Locked Jobs" metric with new metrics for
monitoring DelayedJob: queue_length, failed_jobs, and locked_jobs, all under
Workers/DelayedJob. queue_length is also broken out by queue name or priority
depending on the version of DelayedJob deployed.
* Bug fix when rendering empty collection in Rails 3.1+
* Rails 3 view instrumentation
* Improved Sinatra instrumentation
* Limit the number of nodes collected in long running transactions to prevent leaking memory
* [SECURITY] fix for cookie handling by End User Monitoring instrumentation
* deployments recipe change: truncate git SHAs to 7 characters
* Fixes for obfuscation of PostgreSQL and SQLite queries
* Fix for lost database connections when using a forking framework
* Workaround for RedHat kernel bug which prevented blocking reads of /proc fs
* Do not trap signals when handling exceptions
* improved Ruby 1.8.6 support
* fix for issues with RAILS_ROOT deprecation warnings
* fixed incorrect 1.9 GC time reporting
* obfuscation for Slow SQL queries respects transaction trace config
* fix for RUM instrumentation repoting bad timing info in some cases
* refactored ActiveRecord instrumentation, no longer requires Rails
* fix for GC instrumentation when using Ruby 1.9
* new feature to correlate browser and server transaction traces
* new feature to trace slow sql statements
* fix to help cope with malformed rack responses
* do not try to instrument versions of ActiveMerchant that are too old
* Updated LICENSE
* Updated links to support docs
* Fix over-detection of mongrel and unicorn and only start the agent when
actual server is running
* Improve developer mode backtraces to support ruby 1.9.2, windows
* Fixed some cases where Memcache instrumentation was failing to load
* Ability to set log destination by NEW_RELIC_LOG env var
* Fix to mutex lib load issue
* Performance enhancements (thanks to Jeremy Kemper)
* Fix overly verbose STDOUT message (thanks to Anselm Helbig)
* Fixed some thread safety issues
* Work around for Ruby 1.8.7 Marshal crash bug
* Numerous community patches (Gabriel Horner, Bradley Harris, Diego Garcia,
Tommy Sullivan, Greg Hazel, John Thomas Marino, Paul Elliott, Pan Thomakos)
* Fixed RUM instrumentation bug
* Support for Rails 3.1 (thanks to Ben Hoskings via github)
* Support for Rubinius
* Fixed issues affecting some Delayed Job users where log files were not appearing
* Fixed an issue where some instrumentation might not get loaded in Rails apps
* Fix for memcached cas method (thanks to Andrew Long and Joseph Palermo )
* Fix for logger deprecation warning (thanks to Jonathan del Strother via github)
* Support for logging to STDOUT
* Support for Spymemcached client on jruby
* Support for aggregating data from short-running
processes to reduce reporting overhead
* Numerous bug fixes
* Increased unit test coverage
* Updated Real User Monitoring to reduce javascript size and improve
compatibility, fix a few known bugs
* Support for Real User Monitoring
* Back end work on internals to improve reliability
* added a 'log_file_name' and 'log_file_path' configuration variable to allow
setting the path and name of the agent log file
* Improve reliability of statistics calculations
* Remove some previously deprecated methods
* Remove Sequel instrumentation pending more work
* Avoid overriding methods named 'log' when including the MethodTracer module
* Ensure that all load paths for 'new_relic/agent' go through 'new_relic/control' first
* Remove some debugging output from tests
* Dependency detection framework to prevent multi-loading or early-loading
of instrumentation files
* Moved the API helper to the github newrelic_api gem.
* Revamped queue time to include server, queue, and middleware time
* Increased test coverage and stability
* Add Trinidad as a dispatcher (from Calavera, on github)
* Sequel instrumentation from Aman Gupta
* patches to 1.9 compatibility from dkastner on github
* Support for 1.9.2's garbage collection instrumentation from Justin Weiss
* On Heroku, existing queue time headers will be detected
* Fix rack constant scoping in dev mode for 1.9 (Rack != ::Rack)
* Fixes for instrumentation loading failing on Exception classes that
are not subclasses of StandardError
* Fix active record instrumentation load order for Rails 3
* Update DNS lookup code to remove hardcoded IP addresses
* Dalli instrumentation from Mike Perham (thanks Mike)
* Datamapper instrumentation from Jordan Ritter (thanks Jordan)
* Apdex now defaults to 0.5
!!! Please be aware that if you are not setting an apdex,
!!! this will cause a change in the apparent performance of your app.
* Make metric hashes threadsafe (fixes problems sending metrics in Jruby
threaded code)
* Delete obsolete links to metric docs in developer mode
* Detect gems when using Bundler
* Fix newrelic_ignore in Rails 3
* Break metric parser into a separate vendored gem
* When using Unicorn, preload_app: true is recommended to get proper
after_fork behavior.
* Remove a puts. Yes, a whole release for a puts.
* Add missing require in rails 3 framework control
* developer mode is now a rack middleware and can be used on any framework;
it is no longer supported automatically on versions of Rails prior to 2.3;
see README for details
* memcache key recording for transaction traces
* use system_timer gem if available, fall back to timeout lib
* address instability issues in JRuby 1.2
* renamed executable 'newrelic_cmd' to 'newrelic'; old name still supported
for backward compatibility
* added 'newrelic install' command to install a newrelic.yml file in the
current directory
* optimization to execution time measurement
* optimization to startup sequence
* change startup sequence so that instrumentation is installed after all
other gems and plugins have loaded
* add option to override automatic flushing of data on exit--send_data_on_exit
defaults to 'true'
* ignored errors no longer affect apdex score
* added record_transaction method to the api to allow recording
details from web and background transactions occurring outside RPM
* fixed a bug related to enabling a gold trial / upgrade not sending
transaction traces correctly
* fix regression in startup sequence
* fix for regression in Rails 2.1 inline rendering
* workaround bug found in some rubies that caused a segv and/or NoMemoryError
when deflating content for upload
* avoid creating connection thread in unicorn/passenger spawners
* fix bug in profile mode
* fix race condition in Delayed::Job instrumentation loading
* fix glassfish detection in latest glassfish gem
* support basic instrumentation for ActsAsSolr and Sunspot
* fix bug in startup when running JRuby
* fix for unicorn not reporting when the proc line had 'master' in it
* fix regression for passenger 2.0 and earlier
* fix after_fork in the shim
* republished gem without generated rdocs
* rails3 instrumentation (no developer mode support yet)
* removed the ensure_worker_thread started and instead defined an after_fork
handler that will set up the agent properly in forked processes.
* change at_exit handler so the shutdown always goes after other shutdown
* add visibility to active record db transactions in the rpm transaction
traces (thanks to jeremy kemper)
* fix regression in merb support which caused merb apps not to start
* added NewRelic::Agent.logger to the public api to write to the agent
log file.
* optimizations to background thread, controller instrumentation, memory
* add logger method to public_api
* support list notation for ignored exceptions in the newrelic.yml
* fix bug in delayed_job instrumentation that caused the job queue sampler
to run in the wrong place
* change startup sequence and code that restarts the worker loop
* detect the unicorn master and dont start the agent; hook in after_fork
* fix problem with the Authlogic metric names which caused errors in
developer mode. Authlogic metrics now adhere to the convention of
prefixing the name with 'Custom'
* allow more correct overriding of transaction trace settings in the
call to #manual_start
* simplify WorkerLoop and add better protection for concurrency
* preliminary support for rails3
* fix missing URL and referrer on some traced errors and transactions
* gather traced errors *after* executing the rescue chain in ActionController
* always load controller instrumentation
* pick up token validation from newrelic.yml
* fix bug in delayed_job instrumentation occurring when there was no DJ log
* fix incompatibility with Capistrano 2.5.16
* strip down URLs reported in transactions and errors to path only
* optimization to reduce overhead: move background samplers into foreground thread
* change default config file to ignore RoutingErrors
* moved the background task instrumentation into a separate tab in the RPM UI
* allow override of the RPM application name via NEWRELIC_APP_NAME environment variable
* revised Delayed::Job instrumentation so no manual_start is required
* send buffered data on shutdown
* expanded support for queue length and queue time
* remove calls to starts_with to fix Sinatra and non-rails deployments
* fix problem with apdex scores recording too low in some circumstances
* switch to jeweler for gem building
* minor fixes, test improvements, doc and rakefile improvements
* fix incompatibility with Hoptoad where Hoptoad was not getting errors handled by New Relic
* many other optimizations, bug fixes and documentation improvements
* beta release of 2.10
* fix bugs with Sinatra app instrumentation
* minor doc updates
* alpha release of 2.10
* rack support, including metal; ignores 404s; requires a module inclusion (see docs)
* sinatra support, displays actions named by the URI pattern matched
* add API method to abort transaction recording for in-flight transactions
* remove account management calls from newrelic_api.rb
* truncating extremely large transaction traces for efficiency
* fix error reporting in recipes; add newrelic_rails_env option to recipes to
override the rails env used to pull the app_name out of newrelic.yml
* added TorqueBox recognition (thanks Bob McWhirter)
* renamed config settings: enabled => monitor_mode; developer => developer_mode;
old names will still work in newrelic.yml
* instrumentation for DelayedJob (thanks Travis Tilley)
* added config switches to turn off certain instrumentation when you aren't
interested in the metrics, to save on overhead--see newrelic.yml for details.
* add profiling support to dev mode; very experimental!
* add 'multi_threaded' config option to indicate when the app is running
multi-threaded, so we can disable some instrumentation
* fix test failures in JRuby, REE
* improve Net::HTTP instrumentation so it's more efficient and distinguishes calls
between web and non-web transactions.
* database instrumentation notices all database commands in addition to the core commands
* add support for textmate to dev mode
* added add_transaction_tracer method to support instrumenting methods as
if they were web transactions; this will facilitate better visibility of background
tasks and eventually things like rack, metal and Sinatra
* adjusted apdex scores to reflect time spent in the mongrel queue
* fixed incompatibility with JRuby on startup
* implemented CPU measure for JRuby which reflects the cpu burn for
all controller actions (does not include background tasks)
* fixed scope issue with GC instrumentation, subtracting time from caller
* added # of GC calls to GC instrumentation
* renamed the dispatcher metric
* refactored stats_engine code for readability
* optimization: reduce wakeup times for harvest thread
* alpha release of 2.10
* support unicorn
* instrumentation of GC for REE and MRE with GC patch
* support agent restarting when changes are made to the account
* removed #newrelic_notice_error from Object class, replaced by NewRelic::Agent#notice_error
* collect histogram statistics
* add custom parameters to newrelic_notice_error call to display
extra info for errors
* add method disable_all_tracing(&block) to execute a block without
capturing metrics
* newrelic_ignore now blocks all instrumentation collection for
the specified actions
* added doc to method_tracer API and removed second arg
requirement for add_method_tracer call
* instrumentation for Net::HTTP
* remove method_tracer shim to avoid timing problems in monitoring daemons
* for non-rails daemons, look at APP_ROOT and NRCONFIG env vars for custom locations
* Disable at_exit handler for Unicorn which sometimes caused the
agent to stop reporting immediately.
* add instrumentation for Net::HTTP calls, to show up as "External"
* added support for validating agents in the cloud.
* recognize Unicorn dispatcher
* add NewRelic module definitions to ActiveRecord instrumentation
* Snow Leopard memory fix
* clamp size of data sent to server
* reset statistics for passenger when forking to avoid erroneous data
* fix problem deserializing errors from the server
* fix incompatibility with postgres introduced in 2.9.
* fix startup failure in Windows due to memory sampler
* add JRuby environment information
* change default apdex_t to 0.5 seconds
* fix bug in deployments introduced by multi_homed setting
* support overriding the log in the agent api
* fix JRuby problem using objectspace
* display custom parameters when looking at transactions in dev mode
* display count of sql statements on the list of transactions in dev mode
* fixes for merb--thanks to Carl Lerche
* add newrelic_ignore_apdex method to controller classes to allow
you to omit some actions from apdex statistics
* Add hook for Passenger shutdown events to get more timely shutdown
notices; this will help in more accurate memory readings in
* add newrelic_notice_error to Object class
* optional ability to verify SSL certificates, note that this has some
performance and reliability implications
* support multi-homed host with multiple apps running on duplicate
Noteworthy Enhancements
* give visibility to templates and partials in Rails 2.1 and later, in
dev mode and production
* change active record metrics to capture statistics in adapter log()
call, resulting in lower overhead and improved visibility into
different DB operations; only AR operations that are not hitting the
query cache will be measured to avoid overhead
* added mongrel_rpm to the gem, a standalone daemon listening for custom
metric values sent from local processes (experimental); do mongrel_rpm
* add API for system monitoring daemons (refer to KB articles); changed
API for manual starting of the agent; refer to
NewRelic::Agent.manual_start for details
* do certificate verification on ssl connections to
* support instances appearing in more than one application by allowing a
semicolon separated list of names for the newrelic.yml app_name
* combined agent logfiles into a single logfile
* use rpm server time for transaction traces rather than agent time
Developer Mode (only) Enhancements
* show partial rendering in traces
* improved formatting of metric names in traces
* added number of queries to transactions in the transaction list
* added some sorting options for the transaction list
* added a page showing the list of active threads
Compatibility Enhancements
* ruby 1.9.1 compatibility
* support concurrency when determining busy times, for 2.2 compatibility
* in jruby, use Java used heap for memory sampling if the system memory
is not accessible from an unsupported platform
* jruby will no longer start the agent now when running the console or
rake tasks
* API support for RPM as a footnote add-in
* webrick support restored
Noteworthy bugfixes
* sample memory on linux by reading /proc/#{$$}/status file
* fixed ambiguous 'View' metrics showing up in controller breakdown
* removed Numeric extensions, including round_to, and to_ms
* using a different timeout mechanism when we post data to RPM
* remove usage of Rails::Info which had a side effect of enabling
ActiveRecord even when it wasn't an active framework
* moved CPU sampler off background thread and onto the harvest thread
* tests now run cleanly in any rails app using test:newrelic or
Agent improvements to support future RPM enhancements
* add instrumentation to capture metrics on response codes; not yet
working in rails 2.3.*
* added http referrer to traced errors
* capture gem requirements from rails
* capture cpu utilization adjusted for processor count
* transaction sampling
* fix thin support with rails 2.3.2 when using script/server
* fix incompatibility with rails 2.3.2 and script/server options
* minor tweak to environment gathering for gem mode
* fix problem finding the newrelic controller in dev mode
* fix incompatibility with older versions of optparse
* fix potential jvm problem with jruby
* remove test:all task definition to avoid conflicts
* change error message about window sampler in windows not supported to a
warning message
* fix error with jruby on windows
* fix problem where webrick was being incorrectly detected causing some
problems with mongrel application assignments--had to disable webrick
for now
* fix for ssl connection hanging problems
* fix problem recognizing mongrel in rails 2.3.2
* fastcgi support in rails 2.3.2
* put back webrick support
* fix for capture_params when using file uploads in controller actions
* use pure ruby NS lookup for collector host to eliminate possibly
blocking applications
* fix reference to CommandError which was breaking some cap scripts
* fix incompatibility with Rails 2.0 in the server API
* fix problem with litespeed with Lite accounts
* fix problem when ActiveRecord is disabled
* moved merb instrumentation to Merb::Controller instead of
AbstractController to address incompatibility with MailController
* fix problem in devmode displaying sql with embedded urls
* fix bug in capistrano recipe causing cap commands to fail with error
about not finding Version class
* refactor unit tests so they will run in a generic rails environment
* require classes in advance to avoid autoloading. this is to address
incompatibilities with desert as well as more flexibility in gem
* fixed newrelic_helper.rb 1.9 incompatibility
* fix Ruby 1.9 syntax compatibility errors
* update the class loading sanity check, will notify server of errors
* fix agent output on script and rake task execution
* Convert the deployment information upload script to an executable and
put in the bin directory. When installed as a gem this command is
symlinked to /usr/bin. Usage: newrelic_cmd deployments --help
* Fix issue invoking api when host is not set in newrelic.yml
* Fix deployments api so it will work from a gem
* Fix thin incompatibility in developer mode
* add beta of api in new_relic_api.rb
* instrumented dynamic finders in ActiveRecord
* preliminary support for capturing deployment information via capistrano
* change memory sampler for solaris to use /usr/bin/ps
* allow ERB in newrelic.yml file
* merged support for merb into this version
* fix incompatibility in the developer mode with the safe_erb plugin
* fix module namespace issue causing an error accessing
NewRelic::Instrumentation modules
* fix issue where the agent sometimes failed to start up if there was a
transient network problem
* fix IgnoreSilentlyException message
* fix error when trying to serialize some kinds of Enumerable objects
* added extra debug logging
* added app_name to app mapping
* fix compatibility issue with 1.8.5 causing error with Dir.glob
* fix problem with passenger edge not being a detected environment
* fix problem with skipped dispatcher instrumentation
* Repackage to support both plugin and Gem installation
* Support passenger/litespeed/jruby application naming
* Update method for calculating dispatcher queue time
* Show stack traces in RPM Transaction Traces
* Capture error source for TemplateErrors
* Clean up error stack traces.
* Support query plans from postgres
* Performance tuning
* bugfixes
* fix error in transaction tracing causing traces not to show up
* fixes for postgres explain plan support
* bugfixes
* add agent support for rpm 1.1 features
* Fix regression error with thin support
* added 'newrelic_ignore' controller class method with :except and :only options for finer grained control
over the blocking of instrumentation in controllers.
* bugfixes
* error reporting in early access
* bugfix: initializing developer mode
* Beta support for LiteSpeed and Passenger
* bugfixes
* bugfixes
* bugfixes: pie chart data, rails 1.1 compatibility
* bugfix
* bugfix for non-mysql databases
* bugfixes
* Add enhancement for Transaction Traces early access feature
* bugfixes
+ Add support for Transaction Traces early access feature
* bugfixes
+ Add rails 2.1 support for Developer Mode
+ Changes to memory sampler: Add support for JRuby and fix Solaris support.
* Stop catching exceptions and start catching StandardError; other exception cleanup
* Add protective exception catching to the stats engine
* Improved support for thin domain sockets
* Support JRuby environments
* bugfixes
* bugfixes
* bugfixes
* bugfixes
* bugfixes
* bugfixes
* release for private beta