Node.js release notes

Tuesday, November 28, 2017 - 12:28 Download

Improvements

  • Added promise benchmarks to test non-async_hooks instrumentation.

  • Added logging for external calls made outside of a transaction.

  • Added logging for when unhandledRejection is noticed.

  • Improved performance of creating and merging metrics.

  • Improved performance of tracer.bindFunction.

  • Removed try-catch around internal property setting on older versions of Node.

Bug fixes

  • Moved require calls for vendor metadata to module-level.
Wednesday, November 15, 2017 - 10:21 Download

New features

  • Instrumentation will now only modify the arity of wrapped functions when needed.

    This can be controlled with the matchArity property on a WrapSpec. Disabling arity matching has a significant, positive impact on the performance of instrumentation.

Improvements

  • Added benchmarks for shimmer methods.

  • Pinned hapi tests at v16 due to incompatibility in hapi v17 with Node.js versions <8.

  • The agent's parsed queries will now only hold onto the stack that the query was made at, instead of an error object instance.

    Previously, the parsed query objects would hold onto an error instance, which would in turn hold onto references to all the functions in the stack when the error was created. This could cause memory issues if the functions were holding onto references to other pieces of data.

Bug fixes

  • Revert wrapping of https for Node ^8.9.1.

    The original cause for this problem was reverted by Node.

Thursday, November 2, 2017 - 10:20 Download

Improvements

  • Added Node 9 to test suite.

  • Removed problematic tests for ancient version of Hapi (7.1).

  • Document purpose of throw in tracer to prevent developer confusion.

  • Added script for running agent micro benchmarks.

  • Added benchmarks for all the Shim and Tracer methods.

Bug fixes

  • Fixed a bug with Node >=8.9 that prevented https externals from being recorded.
Tuesday, October 24, 2017 - 10:20 Download

Improvements

  • Agent will attempt to reconnect to the collector forever after backing off to 5 minute delays.

Bug fixes

  • Refactored environment scan to improve startup time and fix cyclical symlink resolving.
Monday, October 16, 2017 - 12:56 Download

New features

Improvements

  • Added benchmark for performance of function wrapping.

  • Added Garbage Collection information to async_hooks benchmark.

  • Improved trace-level logging for capturing queries.

  • Added cases for omitting the agent with and without async hooks to the async hooks microbenchmark.

Bug fixes

  • Pinned version of Mocha to 3.x due to the incompatibility of Mocha v4 and Node v0.10 and v0.12.
Tuesday, September 26, 2017 - 14:45 Download

Bug fixes

  • Hapi handlers will now preserve the defaults associated with them.

    Previously when wrapping handlers, the agent would drop the associated defaults on the ground, these are now properly forwarded to the wrapper. Big thanks to Sean Parmelee (@seanparmelee) for finding the root cause of this bug and reporting it!

  • Fixed starting the agent with an invalid process version.

  • Pinned request version for testing old versions of Node.

  • Added tests for feature flags created at agent initialization.

Monday, September 11, 2017 - 13:40 Download

Improvements

  • Added metrics for enabled/disabled feature flags.

Bug fixes

  • Fixed transaction naming for Hapi plugins.

Thanks to Marc Höffl (@KeKs0r) for providing a reproduction!

Wednesday, August 23, 2017 - 11:17 Download

New features

  • Added support for ignoring ranges of status codes.

    The configuration error_collector.ignore_status_codes can now take ranges of numbers. For example, ignore_status_codes: ['400-404'] would ignore 400, 401, 402, 403, and 404.

  • Experimental instrumentation for async/await

    This is experimental instrumentation and has not yet been tested in a wide array of production environments. The feature is currently off by default behind a feature flag. To enable this experimental instrumentation, add await_support: true to the feature_flag setting in your agent config file.

Improvements

  • Updated examples and documentation regarding custom transaction creation.

    All examples and documentation now point at the newrelic.start*Transaction methods.

  • Transaction state is now maintained in ChildProcess event listeners.

  • Reducing logging verbosity in the SQL query obfuscator.

Bug fixes

  • Fixed a bug when a custom collector port was provided in the configuration that prevented redirected connections from working.

  • Fixed a bug in Shim#record that could cause an exception when trying to create a new segment as part of an ended/inactive transaction.

  • Fixed issue with custom Hapi handlers causing an error.

    Previously custom Hapi handlers defined using the server.handler() method were causing the Hapi server to return a 500 error. Now they are correctly handled and recorded as middleware functions.

Tuesday, August 8, 2017 - 11:28 Download

Improvements

  • Improved metadata collection for AWS, Azure, GCE, and Pivotal Cloud Foundry.

Bug fixes

  • Fixed a bug in PG query obfuscation for $ placeholders.

    The agent used to mis-detect $1 value placeholders as unmatched dollar-quoted strings causing the whole query to be obfuscated to just ?. These placeholders are now correctly detected and obfuscated.

Tuesday, August 1, 2017 - 13:01 Download

Improvements

  • Improved documentation for newrelic.start*Transaction and TransactionHandle.

    Formatting for the startWebTransaction and startBackgroundTransaction methods was fixed and documentation for the TransactionHandle class which getTransaction returns was added.

Bug fixes

  • Fixed parsing the table name from SQL queries.

    Quotes around the table name are now stripped after parsing the query and before constructing the metrics.

  • Fixed unhandled rejection error caused by ioredis instrumentation.

Tuesday, July 25, 2017 - 14:34 Download

Bug fixes

  • Fixed issue with transaction events not including correct duration values.

    This issue was introduced in v2.0.0, and it has affected web transactions histogram and percentile charts.

  • Fixed issue with Redis instrumentation causing the agent to crash in some cases.

    Previously, the Redis instrumentation would crash the agent when Redis commands were called without a callback and after the transaction has ended.

  • Fixed issue with the agent crashing on Node v4.0-4.4 and v5.0-5.9.

    This issue was caused by incorrect shim for Buffer.from(), and it affected older minor versions of Node v4 and v5.

Tuesday, July 18, 2017 - 01:00 Download

Notes

  • The New Relic Node Agent v2 is here!

    This release contains major changes to the agent instrumentation API, making it easier to create and distribute your own instrumentation for third party modules. Check out Upgrade the Node agent or the Migration Guide for more information on upgrading your application to this version.

  • BREAKING: Reversed naming and ignore rules.

    Naming rules are now applied in the order they are defined.

  • BREAKING: De-duplicated HTTP request transactions.

    Only one transaction is created per request event emitted by an HTTP server. Previously this was one transaction per listener per event emitted.

  • BREAKING: Stopped swallowing outbound request errors.

    Errors emitted by outbound HTTP requests will no longer be swallowed by the agent.

  • BREAKING: Node v0.8 is no longer supported. Minimum version is now v0.10.

    The v1 agent will continue to support Node 0.8 but will no longer receive updates.

  • BREAKING: npm v1 is no longer supported. Minimum version is now v2.0.0.

New features

  • Added API for writing messaging framework instrumentation.

    Introduced new MessageShim class for writing instrumentation. This shim can be accessed using the newrelic.instrumentMessages() API method.

  • Added amqplib instrumentation.

    Applications driven by amqplib consumers will now have transactions automatically created for consumed messages. See Troubleshoot message consumers for more information on this instrumentation and its limitations.

  • Advanced instrumentation API is now generally available.

    New methods for instrumenting common modules were introduced during the Agent v2 beta. These APIs are now available to everyone:

    • newrelic.instrument()/Shim: This method can be used to instrument generic modules, such as connection pooling libraries, task schedulers, or anything else not covered by a specialized class.

    • newrelic.instrumentDatastore()/DatastoreShim: This method is good for instrumenting datastore modules such as mongodb, mysql, or pg.

    • newrelic.instrumentWebframework()/WebFrameworkShim: This method is used for instrumenting web frameworks like restify or express.

    Documentation and tutorials for the new API can be found on our GitHub documentation page: http://newrelic.github.io/node-newrelic/docs/

Improvements

  • Rewrote built-in instrumentation using the new Shim classes.

    The following instrumentations have been rewritten:

    • Datastores
      • cassandra-driver
      • ioredis
      • memcached
      • mongodb
      • mysql
      • node-cassandra-cql
      • pg
      • redis
    • Web frameworks
      • director
      • express
      • hapi
      • restify
  • The @newrelic/native-metrics module is now included as an optional dependency.

    This module will be installed automatically with Agent v2. If it fails to install the agent will still function.

Wednesday, June 7, 2017 - 11:00 Download

New features

  • Node v8 is officially supported with the exception of async/await.

    Support for the new async/await keywords is coming in a future release. Until this support is added, New Relic does not support and highly discourages using the Node.js agent with applications that utilize async/await, as it could result in transaction state loss and data being mixed between transactions.

Fixes

  • Fixed issues related to changes in the core networking modules that resulted in transaction state loss. Also instrumented new asynchronous API methods in crypto and inspector.
Thursday, May 11, 2017 - 14:15 Download

Bug fixes

  • Fixed a transaction state loss introduced in Node 7.10.0 when using net.createConnection.

    Added a new segment for net.connect, net.createConnection, and http.Agent#createConnection. Sockets created within a transaction also have their emit bound to the segment.

  • Fixed a typo about the name of the default configuration file. Thanks Jacob LeGrone (@jlegrone)!

Wednesday, May 3, 2017 - 13:57 Download

Notes

  • Dropped support for Express <4.6.

New features

  • Improved API for writing web framework instrumentation.

    Introduced a new WebFrameworkShim class for writing instrumentation. This shim can be accessed using the newrelic.instrumentWebframework API method.

Improvements

  • Incorporated fixes and features from 1.38.0, 1.38.1, and 1.38.2.

  • Only one transaction is created for each request emitted by a server.

    Previously we created a transaction for each listener on the request event.

  • Fixed the beta sign up link in the README.md.

  • Rewrote instrumentation for Connect, Director, Express, Hapi, and Restify.

    These instrumentations were rewritten using the new WebFrameworkShim. As a consequence of this rewrite, all our instrumentations now have feature parity, meaning every instrumentation will create Middleware metrics for your server.

    Tutorials on using the new instrumentation shim can be found on our API docs: http://newrelic.github.io/node-newrelic/docs/.

  • Removed express_segments feature flag.

    This configuration previously controlled the creation of middleware metrics in our Express instrumentation. With the move to the WebFrameworkShim this was dropped.

Tuesday, May 2, 2017 - 15:01 Download

New features

  • Error messages are redacted in High Security Mode now.

  • New configurations were added for disabling some New Relic API methods. These default to enabled and are all disabled in High Security Mode.

    • api.custom_parameters_enabled controls newrelic.addCustomParameters()
    • api.custom_events_enabled controls newrelic.recordCustomEvent()
    • api.notice_error_enabled controls newrelic.noticeError()
  • Updated the default value for transaction_tracer.record_sql to obfuscated.

    This value was previously off by default. This change brings the New Relic Node Agent defaults in line with other New Relic Agents.

Bug fixes

  • Our when instrumentation better detects when a module is actually when.

    Thanks to Pasi Eronen (@pasieronen) for the contribution!

  • Quiet a warning in our native promise instrumentation on Node 0.10.

  • Fixed a bug in the generic pool instrumentation affecting version 3.

Thursday, March 30, 2017 - 12:05 Download

Bug fixes

  • When.js hooks similar to Promise.onPotentiallyUnhandledRejection now function as intended.

    Previously, hooks like Promise.onPotentiallyUnhandledRejection would not work due to the way the agent wraps the promise constructor. When.js expects these handles to be assigned directly onto the promise constructor, and our wrapper was intercepting the assignment. The wrapper will now properly proxy these values and assign them onto the original constructor, restoring the proper behavior.

  • Express route parameters will now be properly attached to the corresponding transaction.

    Previously, our express instrumentation would read the route parameters and place them on the segment responsible for matching the parameters. This behavior did not place the parameters on the transaction that the segments belonged to, causing the parameters to not show up properly on transaction traces and transaction events.

Friday, March 17, 2017 - 16:50 Download

Bug fixes

  • Fixed issue with when.js instrumentation not preserving all properties on wrapped Promise constructor.

    Previously, the when.js instrumentation would cause an unhandled exception when private methods on the Promise constructor were called (e.g. when adapting functions that do not use promises).

Thursday, March 16, 2017 - 14:30 Download

Improvements

  • We're excited to announce the addition of a new Node VMs page to the UI that provides a curated view of the cpu, memory, garbage collection, and event loop metrics that we have added over the past several releases of the node agent and native-metrics module.

    For more information, see our documentation.

  • Added instrumentation of When.js promise library.

    Previously, the transaction state could get lost when multiple promises resolved close to each other.

  • Fixed name of environment variable in error message when configuration file cannot be found. Thanks to @Maubic for the contribution!

  • Updated tests to work with the latest version of Node 7.

Wednesday, February 22, 2017 - 14:54 Download

New Features

  • Added support for recording interfaces that return promises instead of taking callbacks. See RecorderSpec.promise for more details.

    Thanks to Gert Sallaerts (@Gertt) for this contribution.

Improvements

  • Incorporated fixes and features from 1.36.2, 1.37.0, and 1.37.1.

  • Domains are no longer preemptively instrumented, thus applications that do not use domains will not load the domain module.

    Including the domain module causes a small amount of extra overhead in other core libraries that must keep the domain state set correctly.

Pages