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.
Improvements
- Updated remaining /api unit tests to use tap API.
- Updated @grpc/grpc-js to v1.0.3.
Fixes
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.
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.
Improvements
Added
function_versionto lambda metadata payload.This is pulled from an invocation's
context.functionVersionvalue.
Improvements
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 attributeserror.classanderror.messageare 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.
- The public api method
Added new public API methods
addCustomSpanAttributeandaddCustomSpanAttributesto add attributes to the currently executing span.Added new attributes to http outbound spans:
http.statusCodeandhttp.statusText.Updated W3C Trace Context "Known Issues and Workaround" notes with latest accurate consideration.
Converted unit tests to run via
tap. Removesmochadependency.
Fixes
- Fixed route naming when hapi's
preroute handlers share functions. - Fixed
child_processinstrumentation so that handlers can be effectively removed when attached via.once()or manually removed viaremoveListener().
Improvements
Support new http[s] get/request function signature in Node v10+
Added the following Span attributes:
http.statusCodehttp.statusText
The above attributes will be replacing the following deprecated attributes:
httpResponseCoderesponse.statusresponse.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.
Improvements
Removed calls to
OutgoingMessage.prototype._headersin favor of using publicgetHeadersAPI (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 https://docs.newrelic.com/docs/agents/nodejs-agent/getting-started/compa... 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
debuglevel 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 the12.16breakage in12.16.1.Reduced logging level of raw
x-queue-startorx-request-startheader values to avoid logging very large values at default logging levels.
Fixes
Bumped
@newrelic/aws-sdkversion tov1.1.2fromv1.1.1. https://github.com/newrelic/node-newrelic-aws-sdk/blob/master/CHANGELOG.mdNotable improvements include:
- Fixed issue where instrumentation would crash pulling
hostandportvalues whenAmazonDaxClientwas used as the service forDocumentClient.
- Fixed issue where instrumentation would crash pulling
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-enrichermodule 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.
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'straceparentandtracestateheaders when callingTransactionHandle#acceptDistributedTraceHeadersor automatically viahttpinstrumentation. When callingTransaction#insertDistributedTraceHeaders, or automatically viahttpinstrumentation, 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 usingdistributed_tracing.exclude_newrelic_header:true.Added
TransactionHandle#acceptDistributedTraceHeadersAPI for accepting both New Relic and W3C Trace Context distributed traces.Deprecated
TransactionHandle#acceptDistributedTracePayloadwhich will be removed in a future major release.Added
TransactionHandle#insertDistributedTraceHeadersAPI for adding outbound distributed trace headers. Both W3C Trace Context and New Relic formats will be included unlessdistributed_tracing.exclude_newrelic_header: true.Deprecated
TransactionHandle#createDistributedTracePayloadwhich 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.24or later before upgrading your downstream Node New Relic agents to this agent release.
Improvements
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.
Fixes
- Fixed issue where Lambda invocation errors were not noticed in Node 10 or Node 12 environments.
- Pins Node 12 CI/testing version to
v12.15to avoid breakages withv12.16.0until cause(s) resolved. - Updated publish-docs script to use
npm runinstead ofmake.
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.
Improvements
Bumped
@newrelic/aws-sdktov1.1.1fromv1.0.0. https://github.com/newrelic/node-newrelic-aws-sdk/blob/master/CHANGELOG.md 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()toShimprototype for direct usage by instrumentation. Previously,_bindPromise()was a private function in theShimmodule.Updated language in agent to be in line with New Relic Standards.
Fixes
- Fixed spelling in configuration error. Thank you to David Ray (@daaray) for the contribution.
- Fixed long-log truncation issue in Serverless mode.
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 toTransactionandTransactionHandle.This new method can be used to retrieve the sampling decision made for a given transaction. Please consult the documentation for more information.
Fixes
- Upgraded
tapto resolvehandlebarsaudit warnings.
New Features
- Added
@newrelic/aws-sdkmodule to agent for auto-include on install. - Added splitting of application name using semicolons in the env var.
- Instrumented
connection.executeformysql2.
Improvements
@newrelic/native-metricsmodule is defaulted to disabled in serverless mode.This can reduce lambda cold-start times by up to 170ms. The
native-metricsmodule 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_ENABLEDto enable/disable the native-metrics moduleAdded a test for querying poolCluster.of()
Added HTTP method to segment attributes for external requests.
Updated the
bin/ssl.shsuch 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
clearsub-command tobin/ssl.shthat 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)
Fixes
- Removed unused
mysqlbootstrap test code. - Increased timeout for
index-bad-versiontest to reduce flickers on Node 12. - Changed file modification to leverage
writeFileforwatchFiletest. 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.
Notes
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: https://docs.newrelic.com/docs/agents/nodejs-agent/getting-started/compa....
- Bumped version of
@newrelic/superagentinstrumentation tov2.0.0. - Bumped version of
@newrelic/native-metricstov5.0.0.
- Bumped version of
BREAKING Bumped version of
@newrelic/koainstrumentation tov3.0.0@newrelic/koaupdate includes changes to transaction naming in addition to dropping Node versions 6, 7, and 9. See@newrelic/koarelease notes for what was included inv2.0.0andv3.0.0updates. https://github.com/newrelic/node-newrelic-koa/blob/master/NEWS.md.BREAKING
max_samples_storedbehavior has changed to replacemax_samples_per_minute.max_samples_per_minuteis no longer a configuration parameter.The new behavior for
max_samples_storedis 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_minuteas 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
mongodbdev dependency past security warning.Fixed
mongodbversioned 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
restifyversioned tests to be less dependent on the order of asynchronous operations.Updated README to reference Pug rather than Jade.