Node.js Release Notes

Thursday, October 10, 2019 - 16:00 Download

Improvements

  • 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.

Fixes

  • 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

  • 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.

Improvements

  • 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 CONTRIBUTING.md.

Fixes

  • 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.

Improvements

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

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

Fixes

  • 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.

Improvements

  • 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: https://github.com/newrelic/node-newrelic/issues/279.

Fixes

  • 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

Improvements

  • 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 THIRD_PARTY_NOTICES.md

  • 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

Improvements

  • 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.

Monday, May 6, 2019 - 15:30 Download

New Features

  • Modifies MiddlewareSpec route property to allow functions. Defers route processing and segment naming until just before needed (each middleware invocation).

Improvements

  • Fixed outdated license ref in package.json.

  • Middleware instrumentation now honors spec.appendPath for more cases and will not pop paths when it has not appended a path.

Wednesday, April 24, 2019 - 16:00 Download

New Features

  • Added getStatusName to NameState.

    Now web transactions will be named after known status code messages (404, 405, and 501).

  • Added appendPath option to MiddlewareSpec.

Improvements

  • Broke apart integration script test globs.
Tuesday, April 23, 2019 - 13:16

Fixes

  • Fixed bug where agent would stop sending data to New Relic servers when a connectivity issue was encountered.

  • The agent will no longer crash the process in the event of unexpected calls to the harvest callback.

Tuesday, April 16, 2019 - 13:00 Download

Bug fixes

  • Refactored config to log warning and disable distributed tracing if enabled in serverless mode, but missing required config setting.

  • Serverless mode no longer sets different data collection limits.

  • The agent will no longer crash the process in the event of unexpected calls to the harvest callback.

  • Updated required config values when using distributed tracing in serverless_mode to only include account_id.

Monday, April 1, 2019 - 09:47 Download

Bug fixes

  • The agent will now accurately filter out request parameters while operating under CSP or HSM.

    You can find more information about this change in the Security Bulletin.

Monday, March 25, 2019 - 14:19 Download

Improvements

  • Agent now respects attribute type restrictions on trace/segment attributes, as well as error event/trace attributes.

Bug fixes

  • Fixes potential for RangeError: Maximum call stack size exceeded error on Transaction/Trace end.

  • Custom events no longer accept attributes with invalid types.

    The only attribute types accepted by the backend are boolean, string, and number; any attribute assigned to a custom event outside these types would be dropped on ingest. The agent now filters these attributes out, and logs out a helpful message detailing the issue.

Monday, March 11, 2019 - 14:20

Fixes

  • Updated log message for not adding attributes and change the log level to debug.

  • Fixed an issue where exclusive time would be improperly calculated in some cases.

Monday, March 4, 2019 - 11:40

New features

  • Added product attribute to existing datastore instrumentations.

  • Added db.collection to datastore span event attributes.

Improvements

  • trusted_account_key, account_id, and primary_application_id may now be configured via a configuration file while in serverless mode.

  • Optimized exclusive time duration calculator.

Previously, the agent would spend a lot of time sorting redundant arrays while calculating the exclusive time for the segments of a trace. This has been refactored into a single postorder traversal over the tree which will calculate the exclusive time for all segments in the subtree rooted at a given segment.

Fixes

  • Fixed a bug where data belonging to distributed traces starting in the Node.js agent would be prioritized over data produced from traces starting in other language agents. Previously, the agent would use the same random number for both the transaction priority (used for data sampling) and the distributed tracing trace sampling decision (whether to create DT data for a given transaction). This random number reuse resulted in a bias that caused data from distributed traces started in the Node.js agent to be prioritized above data that belongs to distributed traces started in other language agents. The agent now makes individual rolls for each of these quantities (i.e. the transaction priority and trace sampling decision), eliminating the bias.

  • Prevent a split on undefined location under certain conditions in Memcached.

Tuesday, February 19, 2019 - 12:52

New features

  • Added SNS to message shim library names.

  • Added check for collect_span_events in config sent from the server on connect.

    Collection of span events can be disabled from the server configuration, but not enabled.

Improvements

  • Refactored Segment#toJSON to be more readable.

  • Added a try/catch to config initialization to safely handle invalid setting combinations.

    When an error is caught the agent is marked as disabled, which ultimately returns a stub API and keeps the process running.

  • String truncation is now done using a binary search over the byte length of the string.

    Previously this truncation was done using a linear search for the proper byte length.

  • Optimized segment and span attribute filtering.

Fixes

  • Fixed issue where shim.createSegment() could result in modifying the parent when opaque.

  • Fixed issue where http-outbound would modify parent segments when parent is opaque.

  • Moved processing of exclusive time attribute out of toJSON and into finalize to only be calculated once.

    Previously, serializing a segment would result in calculating and caching exclusive time which could result in issues if serialized prior to ending.

Monday, February 11, 2019 - 16:26

New features

  • Added span_events and transaction_segments attribute destinations.

    Span event and segment attributes can now be filtered using the same include/exclude config rules as other types. See agent attribute configuration for more details.

  • Added metadata field to connect payload, for collecting NEW_RELIC_METADATA_-prefixed environment variables.

  • Added DynamoDB to datastores.

  • Added opaque option to datastore operation spec.

  • Added Kubernetes utilization detection.

  • Upgraded concat-stream and readable-stream to next major version.

    These modules had previously been held back due to support for Node <6. Since v5.0.0 we dropped that support thus enabling these updates.

  • Added SQS as a supported messaging library name.

  • Enabled tracking of callback via message-shim.recordConsume when no messageHandler provided.

Improvements

  • Replaced make rules with npm scripts.

Bug fixes

  • The agent will now consistently harvest in all response cases when in serverless mode.

    Previously, the agent's harvest was in a race with process suspension in the event of an uncaught exception, or responding without calling a callback. A synchronous harvesting process is now used to circumvent this racing issue.

  • Fixed issue with socket connection errors causing the agent to stop attempting to connect at startup.

  • Fixed opaque segment functionality for message-shim.recordProduce.

  • Fixed opaque segment functionality for message-shim.recordConsume.

Tuesday, January 29, 2019 - 10:26 Download

Improvements

  • Removed installation of Oracle container test scripts.

  • Replaced explicit config.high_security === true checks with general truthiness checks.

    The agent will now treat any truthy value in the high_security config setting as if it is enabled.

Bug fixes

  • Fixed bug where agent would stop sending data to New Relic servers when a connectivity issue was encountered.

  • Fixed unit test with incorrect usage of cross application tracing.

Wednesday, January 23, 2019 - 11:11 Download

New features

  • Added Neptune to the known database names.

Improvements

  • Updated log messages for missing configuration files to point at the base configuration.

    Previously the log messages pointed at an internal file defining default values for every configuration.

  • Upgraded to @newrelic/native-metrics v4.

  • Removed outdated config files.

  • Removed old, outdated examples.

Bug fixes

  • Fixed an issue where old CAT headers would be injected while distributed tracing was enabled.

    This would happen if both cross_application_tracing.enabled and distributed_tracing.enabled were set to true and an instrumentation disabled tracing for an outbound request.

  • Fixed access to ConglomerateShim in shimmer.

Thursday, January 17, 2019 - 10:32 Download

New features

  • Added new shim type: ConglomerateShim

    This shim class is useful for instrumenting modules which implement several service interfaces of different types.

Improvements

  • Disabled logging by default when serverless_mode is enabled. Please note serverless/lambda monitoring is not yet officially released.

  • null trace attribute values are no longer sent to New Relic.

    This change brings the Node agent in alignment with the behavior of other language agents.

Tuesday, January 8, 2019 - 14:46

Notes

  • Dropped support for Node versions less than 6.

  • Agent no longer creates transactions when in a stopped, stopping or errored state.

  • Removed public API methods that have been deprecated since Agent v2: createTracer, createWebTransaction, createBackgroundTransaction, and addCustomParameter/(s). See the Migration Guide for more information.

  • Flagged API#setIgnoreTransaction as deprecated; TransactionHandle#ignore should be used instead.

  • Released several feature flags. These flags are no longer used:

    • feature_flag.custom_instrumentation
    • feature_flag.custom_metrics
    • feature_flag.synthetics
    • feature_flag.native_metrics
  • Added plugins.native_metrics.enabled configuration value.

    This configuration value controls the use of the @newrelic/native-metrics module. When set to false the agent will not attempt to load that module.

  • Custom metrics recorded via recordMetric and incrementMetric API calls now automatically have the name prepended with 'Custom/'. Usages of these APIs that manually prepend with 'Custom/' will need to remove the manually specified one or will end up with metrics prepended with 'Custom/Custom/'.

  • Dropped support for node-cassandra-cql.

  • Removed from ignore_server_configuration config setting.

  • Removed deprecated configuration settings capture_params and ignored_params.

https://source.datanerd.us/NodeJS-agent/nodejs_agent/pull/1656

  • The agent will no longer cause a stack overflow when logging at trace level to stdout.

    Previously, the agent would inadvertently trigger a trace level log from its trace level log (through wrapping a nextTick call), causing a stack overflow. The agent now detects this case and aborts the nested call.

Pages