Node.js release notes

Monday, June 22, 2020 - 15:38 Download

New Features

  • Additional Transaction Information applied to Span Events
    • When Distributed Tracing and/or Infinite Tracing are enabled, the Agent will now incorporate additional information from the Transaction Event on to the currently available Span Event of the transaction.
      • The following items are affected:
        • aws-lambda related attributes
        • error.message
        • error.class
        • error.expected
        • http.statusCode
        • http.statusText
        • message.*
        • parent.type
        • parent.account
        • parent.transportType
        • parent.transportDuration
        • Request Parameters request.parameters.*
        • request.header.*
        • request.method
        • request.uri
    • Custom Attributes
      • Custom transaction attributes added via API.addCustomAttribute or API.addCustomAttributes will now be propagated to the currently active span, if available.
    • Security Recommendation:
      • Review your Transaction Event attributes configuration. Any attribute include or exclude setting specific to Transaction Events should be applied to your Span Attributes configuration or global attributes configuration. Please see Node.js agent attributes for more on how to configure.


  • Upgraded @grpc/grpc-js from 1.0.3 to 1.0.4
  • Modified redis callback-less versioned test to use commandQueueLength as indicator redis command has completed and test can continue. This is in effort to further reduce these test flickers. Additionally, added wait for client 'ready' before moving on to tests.
  • Updated force secret test runs to run on branch pushes to the main repository.
Monday, June 8, 2020 - 11:50 Download

New Features

  • Added AWS API Gateway V2 support to Lambda instrumentation.

  • Added '' intrinsic to active span at time transaction name is finalized.

    This enables finding transaction name for traces that may not have a matching transaction event.

  • Added 'error.expected' attribute to span active at time expected error was noticed.


  • Dropped errors earlier during collection when error collection is disabled.

    Error attributes will no longer show up on spans when error collection has been disabled. Other unnecessary work will also be avoided.

  • Removed allocation of logging-only objects used by transaction naming when those log levels are disabled.

  • Upgraded escodegen from 1.12.0 to 1.14.1.

  • Upgraded readable-stream from 3.4.0 to 3.6.0.

  • Upgraded @grpc/proto-loader from 0.5.3 to 0.5.4.

  • Converted facts unit test to use tap API.

  • Converted transaction 'finalizeName...' unit tests to use tap API.

  • Added several items to .npmignore to prevent accidental publishing.

  • Fixed Redis client w/o callback versioned test flicker.

    Doesn't end transaction until error encountered. Increases wait time for first operation which has to complete for the second operation to be successful.

Thursday, May 21, 2020 - 15:15 Download

New Features

  • Bumped @newrelic/native-metrics to ^5.1.0.

    Upgraded nan to ^2.14.1 to resolve 'GetContents' deprecation warning with Node 14. This version of the native metrics module is tested against Node 14 and includes a pre-built binary download backup for Node 14.


  • Added whitespace trimming of license key configuration values.

    Previously, when a license key was entered with leading or trailing whitespace, it would be used as-is and result in a validation failure. This most commonly occurred with environment variable based configuration.

  • Moved to GitHub actions for CI.

  • Updated PR template and added initial issue templates.

  • Converted most of the collector API unit tests to use the tap API. Split larger test groupings into their own test files.

Thursday, May 14, 2020 - 12:30 Download


  • Added synthetics headers to transaction event intrinsics for Distributed Tracing

  • Fixed stale comment documentation with regards to segment recording

Thursday, May 7, 2020 - 10:30 Download

New Features

  • Added a configurable-length span queue to Infinite Tracing: infinite_tracing.span_events.queue_size.

    The queue length can be modified to balance the needs of keeping full traces against trade-off of memory usage and CPU overhead in a high-throughput application.


  • Updated remaining /api unit tests to use tap API.

  • Updated @grpc/grpc-js to v1.0.3.


  • Fixed issue where API.instrumentLoadedModule could throw an exception when it failed.

    Error details will now be caught and logged.

  • Resolved non-proxy minimist security warnings by bumping dependencies.

    These updates only impact development dependencies. Thank you to @devfreddy for the contribution.

    • Updated minimist sub-deps to resolve most related security warnings.
    • Updated tap to resolve remaining tap security warnings.
    • Updated @newrelic/proxy.
Monday, April 20, 2020 - 18:30 Download

New Features

  • Added support for Infinite Tracing on New Relic Edge.

    Infinite Tracing observes 100% of your distributed traces and provides visualizations for the most actionable data so you have the examples of errors and long-running traces so you can better diagnose and troubleshoot your systems.

    You configure your agent to send traces to a trace observer in New Relic Edge. You view your distributed traces through the New Relic’s UI. There is no need to install a collector on your network.

    Infinite Tracing is currently available on a sign-up basis. If you would like to participate, please contact your sales representative.


  • Added function_version to lambda metadata payload.

    This is pulled from an invocation's context.functionVersion value.

Thursday, March 19, 2020 - 11:15 Download


  • Added error attributes to spans.

    • The public api method noticeError() now attaches exception details to the currently executing span. Spans with error details are now highlighted red in the Distributed Tracing UI. Also, the attributes error.class and error.message are added to the span. If multiple errors are recorded for a single span, only the final error's attributes will be added to the span.

    • Added ID of the span in which an error occurred to the corresponding transaction error event.

  • Added new public API methods addCustomSpanAttribute and addCustomSpanAttributes to add attributes to the currently executing span.

  • Added new attributes to http outbound spans: http.statusCode and http.statusText.

  • Updated W3C Trace Context "Known Issues and Workaround" notes with latest accurate consideration.

  • Converted unit tests to run via tap. Removes mocha dependency.


  • Fixed route naming when hapi's pre route handlers share functions.

  • Fixed child_process instrumentation so that handlers can be effectively removed when attached via .once() or manually removed via removeListener().

Thursday, February 27, 2020 - 14:00 Download


  • Support new http[s] get/request function signature in Node v10+

  • Added the following Span attributes:

    • http.statusCode
    • http.statusText

    The above attributes will be replacing the following deprecated attributes:

    • httpResponseCode
    • response.status
    • response.statusMessage

    The deprecated attributes will be removed with the next major release of the agent.

  • Updates version check to be in alignment with our stated support policy and the version constraints in package.json

  • Redacts individual certificate configuration values before sending to server settings. When configured, these values will now appear like: {certificates.0: ****}.

Known issues and workarounds

  • If a .NET agent is initiating distributed traces as the root service, you must update that .NET agent to version 8.24 or later before upgrading your downstream New Relic Node agents to this agent release.
Thursday, February 20, 2020 - 14:00 Download


  • Removed calls to OutgoingMessage.prototype._headers in favor of using public getHeaders API (thanks to @adityasabnis for bringing this to our attention).

  • Removed engine upper-bound to enable easier experimentation of newer Node versions with the agent for customers.

    Please see for officially supported versions. Incompatibilities are expected for odd-numbered releases, which are not supported, and even-numbered releases before "official" support has been released.

  • Reduced "... Aggregator data send." log messages to debug level to reduce noise of default logs.

  • Prevented passing CI with .only() in mocha tests.

  • Removed CI restriction for Node 12.15. Node shipped a fix for the 12.16 breakage in 12.16.1.

  • Reduced logging level of raw x-queue-start or x-request-start header values to avoid logging very large values at default logging levels.


  • Bumped @newrelic/aws-sdk version to v1.1.2 from v1.1.1.

    Notable improvements include:

    • Fixed issue where instrumentation would crash pulling host and port values when AmazonDaxClient was used as the service for DocumentClient.
  • Fixed issue where disabled agent would return an empty string instead of an empty object from API getLinkingMetadata().

    This issue would cause the @newrelic/winston-enricher module to crash when attempting to inject log metatdata.

Known issues and workarounds

  • If a .NET agent is initiating distributed traces as the root service, you must update that .NET agent to version 8.24 or later before upgrading your downstream New Relic Node agents to this agent release.
Wednesday, February 12, 2020 - 15:00 Download

New Features

  • Added support for W3C Trace Context, with easy upgrade from New Relic trace context.

    • Distributed tracing now supports W3C Trace Context headers for HTTP protocols when distributed tracing is enabled. Our implementation can accept and emit both the W3C trace header format and the New Relic trace header format. This simplifies agent upgrades, allowing trace context to be propagated between services with older and newer releases of New Relic agents. W3C trace header format will always be accepted and emitted. New Relic trace header format will be accepted, and you can optionally disable emission of the New Relic trace header format.

    • When distributed tracing is enabled with distributed_tracing.enabled: true, the Node agent will now accept W3C's traceparent and tracestate headers when calling TransactionHandle#acceptDistributedTraceHeaders or automatically via http instrumentation. When calling Transaction#insertDistributedTraceHeaders, or automatically via http instrumentation, the Node agent will include the W3C headers along with the New Relic distributed tracing header, unless the New Relic trace header format is disabled using distributed_tracing.exclude_newrelic_header:true.

    • Added TransactionHandle#acceptDistributedTraceHeaders API for accepting both New Relic and W3C Trace Context distributed traces.

      Deprecated TransactionHandle#acceptDistributedTracePayload which will be removed in a future major release.

    • Added TransactionHandle#insertDistributedTraceHeaders API for adding outbound distributed trace headers. Both W3C Trace Context and New Relic formats will be included unless distributed_tracing.exclude_newrelic_header: true.

      Deprecated TransactionHandle#createDistributedTracePayload which will be removed in a future major release.

    Known issues and workarounds

    • If a .NET agent is initiating distributed traces as the root service, you must update that .NET agent to version 8.24 or later before upgrading your downstream Node New Relic agents to this agent release.


  • Improved transaction and trace ID generation.

  • AWS Lambda

    • Added collection of additional AWS Lambda event source meta data.
    • Added event type detection for Lambda invocation events.
    • Expanded ARN harvest to include ALB and CloudWatch.


  • Fixed issue where Lambda invocation errors were not noticed in Node 10 or Node 12 environments.

  • Pins Node 12 CI/testing version to v12.15 to avoid breakages with v12.16.0 until cause(s) resolved.

  • Updated publish-docs script to use npm run instead of make.

Known issues and workarounds

  • If a .NET agent is initiating distributed traces as the root service, you must update that .NET agent to version 8.24 or later before upgrading your downstream New Relic Node agents to this agent release.
Monday, January 27, 2020 - 13:45 Download


  • Bumped @newrelic/aws-sdk to v1.1.1 from v1.0.0. Notable improvements include:

    • Added official support for API promise calls, fixing two critical bugs.
    • Added check before applying instrumentation to avoid breaking for very old versions.
  • Added bindPromise() to Shim prototype for direct usage by instrumentation. Previously, _bindPromise() was a private function in the Shim module.

  • Updated language in agent to be in line with New Relic Standards.


  • Fixed spelling in configuration error. Thank you to David Ray (@daaray) for the contribution.

  • Fixed long-log truncation issue in Serverless mode.

Monday, November 25, 2019 - 14:30 Download

New Features

  • Added getLinkingMetadata() method to the API.

    This new method can be used to retrieve the identifying information for the agent and current active span and trace. Please consult the documentation for more information.

  • Added getTraceMetadata() to the agent API.

    This new method can be used to retrieve the current active Distributed Tracing span and trace ids. Please consult the documentation for more information.

  • Added an isSampled() method to Transaction and TransactionHandle.

    This new method can be used to retrieve the sampling decision made for a given transaction. Please consult the documentation for more information.


  • Upgraded tap to resolve handlebars audit warnings.
Tuesday, November 5, 2019 - 15:00 Download

New Features

  • Added @newrelic/aws-sdk module to agent for auto-include on install.

  • Added splitting of application name using semicolons in the env var.

  • Instrumented connection.execute for mysql2.


  • @newrelic/native-metrics module is defaulted to disabled in serverless mode.

    This can reduce lambda cold-start times by up to 170ms. The native-metrics module can rarely load in serverless environments due to differences from build environment to deployed environment and offers little value in a serverless environment.

  • Added env var NEW_RELIC_NATIVE_METRICS_ENABLED to enable/disable the native-metrics module

  • Added a test for querying poolCluster.of()

  • Added HTTP method to segment attributes for external requests.

  • Updated the bin/ such that it uses verbose output, will exit on first error code, and will refuse to proceed with LibreSSL (which can't generate certs).

  • Added a clear sub-command to bin/ that will allow developers to quickly remove generated ssl/cert files and regenerate (useful is switch between platforms via containers/docker and certs needs to be regenerated)


  • Removed unused mysql bootstrap test code.

  • Increased timeout for index-bad-version test to reduce flickers on Node 12.

  • Changed file modification to leverage writeFile for watchFile test. This triggers the watcher in a reasonable amount of time much more consistently.

  • Removed testing of Bluebird 3.7 on Node v10 until they fix the segfault issue.

Tuesday, October 29, 2019 - 16:30 Download


  • Added official parity support for Node 12.

    • Exception: Errors resulting in unhandled rejections will no longer be scoped to the transaction that was active when the rejected promise was created.

      As of Node 12, the promise responsible for triggering the init async hook will no longer be passed through on the promise wrap instance. This breaks the linkage used to relate a given promise rejection to the transaction it was scheduled in.

  • BREAKING Removed support for Node 6, 7, and 9.

    The minimum supported version is now Node v8. For further information on our support policy, see:

    • Bumped version of @newrelic/superagent instrumentation to v2.0.0.
    • Bumped version of @newrelic/native-metrics to v5.0.0.
  • BREAKING Bumped version of @newrelic/koa instrumentation to v3.0.0 @newrelic/koa update includes changes to transaction naming in addition to dropping Node versions 6, 7, and 9. See @newrelic/koarelease notes for what was included in v2.0.0 and v3.0.0 updates.

  • BREAKING max_samples_stored behavior has changed to replace max_samples_per_minute. max_samples_per_minute is no longer a configuration parameter.

    The new behavior for max_samples_stored is as follows: "The agent will collect all events up to this number per minute. If there are more than that, a statistical sampling will be collected." This usage of the configuration is consistent with other New Relic APM agents.

    If your application has previously used max_samples_per_minute as an upper bound, you may need to lower the threshold to a valid maximum to avoid data being dropped on the server. No larger than 10k is recommended.

  • Updated utilization callback test to point to a host that can't represent a valid provider. Previously, location where CI provider runs tests could cause test to fail.

  • Added support for Promise.allSettled() method in Bluebird 3.7.

  • Bumped mongodb dev dependency past security warning.

  • Fixed mongodb versioned tests so they are self-contained by using version under test for setup/teardown instead of agent dev-dependency version.

  • Forced filename resolution if not already cached on module load. This should not occur in normal/non-test scenarios but provides a fall-back to maintain functionality.

  • Refactored restify versioned tests to be less dependent on the order of asynchronous operations.

  • Updated README to reference Pug rather than Jade.

Thursday, October 10, 2019 - 16:00 Download


  • Added diagnostic code injector.

    The agent may now be configured to make transaction state checks via code injection. This may be turned on by setting code_injector.diagnostics.enabled to true. While this option is enabled, code around async boundaries will be added to track transactions, and log a message when they are not properly reinstated.

  • Added back generation of entity stats logging and uninstrumented support metric generation on metric harvests.

  • Removed legacy harvest code from main agent.

  • Upgraded tap to latest version

  • Upgraded mocha to latest version.

  • Adds --exit flag to mocha test runs to prevent infinite runs on CI.


  • primary_application_id now defaults to 'Unknown' in serverless mode to allow Distributed Tracing to function correctly when NEW_RELIC_PRIMARY_APPLICATION_ID is not defined.

  • Updated https-proxy-agent to v3 for security fix.

    Shoutout to @asturur for the contribution.

  • Fixed bug where API.shutdown() would not properly harvest when configured to.

  • Fixed bug where multiple agent restarts would cause the number of 'stopped' listeners to exceed limit.

  • Fixed inconsistent async return from collector API.

    This could result in an infinite loop due to attempting to merge before clearing. This bug should not have impacted normal agent runs but was uncovered for certain test cases.

  • Fixed tests that leave work scheduled on the event loop.

  • Fixed issue that could result in vendor utilization detection failure. As a part of this fix, the request that hits the timeout will immediately abort instead of hanging around for the default timeout.

Tuesday, October 1, 2019 - 16:00 Download

New Features

  • Support for Real Time Streaming

    • Event data is now sent to New Relic every five seconds, instead of every minute. As a result, transaction, error, and custom events will now be available in New Relic One and Insights dashboards in near real time. For more information on how to view your events with a five-second refresh, see the real time streaming documentation.

    • Note that the overall limits on how many events can be sent per minute have not changed. Also, span events, metrics, and trace data is unaffected, and will still be sent every minute.

  • Now supports Restify 7 and 8.

  • Distributed Tracing is now enabled by default in serverless mode.

  • HTTPS connections to New Relic now use a keep alive HTTP-Agent.


  • Maximum event limits are now enforced by the server. This includes a new maximum of 10000 transaction events per minute.

  • Harvesting is now completed by individually scheduled harvesters per data type.

  • Drops old odd-numbered node versions that are no longer supported by node from travis testing matrix

  • Updated Mocha and Docker links in


  • Bumps tap version to move beyond handlebars audit warning.

  • Bumps Restify dev dependency past audit warning.

  • Fixed bug where segment reference on the outbound request was enumerable.

  • Fixed bug where incorrect config information was sent to New Relic.

  • The agent will now end/serialize transactions in the event of an uncaught exception while operating in serverless mode.

Wednesday, July 31, 2019 - 01:30 Download

New Features

  • Implements Expected and Ignored Errors functionality

  • Adds support for scoped package name introduced in hapi v18 (@hapi/hapi).

    This will provide functionality at parity with instrumentation for hapi v17. Any new features may not yet be supported.


  • Bumps jsdoc and lodash dev dependency to avoid upstream vulnerability warning.

  • Adds detailed logging through harvest/collector code to increase supportability.


  • Fixed bug where agent would count errors towards error metrics even if they were dropped due to the error collector being disabled.

  • The agent will now properly track cached paths to files in loaded modules on Node versions >10.

    As of Node v11, the path to a file in a module being loaded will only be resolved on the first load; subsequent resolution of that file will use a cached value. The agent records this resolved path and uses it for relative file look ups in order to deep link into modules using Shim#require. Since the agent couldn't reliably get at the path on the subsequent calls to require, it now replicates the caching logic and hold onto the resolved path for a given file.

Wednesday, June 12, 2019 - 09:45 Download

New Features

  • Enables ability to migrate to Configurable Security Policies (CSP) on a per agent basis for accounts already using High Security Mode (HSM).

    When both HSM and CSP are enabled for an account, an agent (this version or later) can successfully connect with either high_security: true or the appropriate security_policies_token configured. high_security has been added as part of the preconnect payload.


  • The agent now allows installation on node v11 and v12.

    This change relaxes the engines restriction to include Node v11 and v12. This does not constitute official support for those versions, and users on those versions may run into subtle incompatibilities. For those users who are interested in experimenting with the agent on v11 and v12, we are tracking relevant issues here:


  • Lambda invocations ended with promises will now be recorded properly.

    Previously, the lambda instrumentation was not intercepting the promise resolution/rejection returned from a lambda handler. The instrumentation now properly observes the promise, and ends the transaction when the promise has finished.

  • Lambda invocations will only attempt to end the related transaction a single time.

    In the event of two lambda response events (e.g. callback called, and a promise returned), the agent would attempt to end the transaction twice, producing an extraneous empty payload. The agent now limits itself to a single end call for a given transaction.

  • The agent will now properly end transactions in the face of uncaught exceptions while in serverless mode.

Tuesday, May 28, 2019 - 16:00 Download


  • Shim#require will now operate as expected.

    Previously, the module interception code made the faulty assumption that a module's filepath would be resolved before the module load call was invoked. This caused the wrap filepath to be attributed to the modules being instrumented. This meant that attempted relative require calls using Shim#require would resolved from the incorrect path. The logic has been changed to keep a stack of the resolved filepaths, resolving the issue.

  • Shim#wrapReturn now uses ES6 proxies to wrap its methods.

    This will accurately propagate look up and assignment onto the underlying wrapped function, while maintaining all previous functionality.

  • Updated versioned test configurations to reflect current engine support.

  • Moved third party notices to

  • Updates error message for license check to indicate all places that need to be updated.

Monday, May 20, 2019 - 15:30 Download

New Features

  • serverless_mode feature flag is now enabled by default.

  • Added instrumentLoadedModule method to the API, allowing end-users to manually apply an instrumentation to a loaded module. Useful for cases where some module needs to be loaded before newrelic


  • Removed older versions of Cassandra from versioned tests

  • For debug/test runs, shimmer will now cleanup the __NR_shim property on instrumented methods. This leftover property did not result in any negative behaviors but cleaning up for thoroughness and to prevent potential confusion.

  • Fixes recordMiddleware promise parenting for certain cases where child segments are created within resolving middleware next() promises.