Improvements
Implemented enforcement of
max_payload_size_in_bytes
config value.Any payload during the harvest sequence that exceeds the configured limit will be discarded.
Added JSON-formatted output to benchmarks to enable automated benchmark comparison.
Updated the benchmark runner to measure specifically userland CPU overhead.
Added DatastoreShim benchmarks.
Bug fixes
Fixed MongoDB instrumentation for driver versions greater than 3.0.6.
Mongo 3.0.6 removed metadata the Agent relied upon to instrument the driver. This fixes that by going back to the old method of manually listing all objects and methods to instrument.
Updated MySQL versioned tests to run against the latest release.
New features
Added support for distributed tracing.
Distributed tracing lets you see the path that a request takes as it travels through your distributed system. By showing the distributed activity through a unified view, you can troubleshoot and understand a complex system better than ever before.
Distributed tracing is available with an APM Pro or equivalent subscription. To see a complete distributed trace, you need to enable the feature on a set of neighboring services. Enabling distributed tracing changes the behavior of some New Relic features, so carefully consult the transition guide before you enable this feature.
To enable distributed tracing, set
distributed_tracing.enabled
totrue
in yournewrelic.js
file, or setNEW_RELIC_DISTRIBUTED_TRACING_ENABLED
in your environment.Added a warning for too-new versions of Node.js during agent startup.
Appropriately obfuscated SQL statements will now be included in all transaction traces.
Previously, the agent would only include the SQL statements if the corresponding query was sufficiently slow.
Added ability to execute instrumentation functions in the context of the segment the segment descriptor is describing.
All
record*
methods supplied by all instrumentation shim classes now allow for a function to be executed under the context of the segment the record call will produce. This may be done by supplying a function in theinContext
key for the segment descriptor passed to the record method.Reservoirs will now respect setting their size to 0.
New features
- Added full support for Node v10.
- Added instrumentation for
crypto.scrypt
. - Added instrumentation for
fs.realpath.native
. - Added instrumentation for
process.setUncaughtExceptionCaptureCallback
.
Fixes
- Updated tests to use
asyncResource.runInAsyncScope
instead ofemitBefore
andemitAfter
Fixes
- The agent will now properly remerge event data on collection failure.
Previously, the agent wouldn't observe the correct format for remerging, causing undefined events to be pushed into the reservoir.
New features
Feature flags may now be set from environment variables.
Using the naming convention
NEW_RELIC_FEATURE_FLAG_<feature flag name in upper case>
.
Improvements
Transaction events may be harvested in two payloads now.
This change reduces the occurrence of harvests being rejected due to large payloads. Payloads will only be split when they are large (greater than 1/3 the maximum).
Bug fixes
- Updated Hapi v17 instrumentation to wrap
server
export, in addition toServer
.
Improvements
- Replaced
trusted_account_ids
array withtrusted_account_key
. - Added node v10 to the test matrix.
Bug fixes
Added config
utilization
env vars to theBOOLEAN_VARS
set.This ensures that if these boolean config values are set outside of a config file, their values are respected, particularly when they are disabled.
Improvements
Added
nonce
option fornewrelic.getBrowserTimingHeader()
This allows people to pass in a string to be injected as the
nonce
property of the generated script tag. Special thanks to João Vieira (@joaovieira) for contributing this feature!Expose the External segment on the
http
request instance for outbound calls.
Fixes
Added check to mark Hapi
'onPreResponse'
extensions as error handlers.Previously, the agent was unable to mark any Hapi errors as handled, even if they were, resulting in inaccurate reporting. This change assumes that
'onPreResponse'
extensions act as error handlers, so errors are only reported if they persist to the final response.
Improvements
- Added more tests for transaction naming with Restify.
Fixes
Fixed issue with tracking external requests to default ports.
Special thanks to Ryan King for pinpointing the cause of this issue.
Added extra check for handling arrays of functions when wrapping middleware mounters.
This fixes a bug with the agent incorrectly assuming that arrays passed as the first argument in middleware would only contain route paths, causing a fatal error.
The agent now reports the total time of the transaction on transaction events.
New features
Added an option for using the
finally
method on promises for instrumentation.The promise instrumentation would use
Promise#finally
if available. This change is in response to Node v10 promises callingthen
inside theirfinally
method, which caused infinite recursion in the agent's promise instrumentation.Added seen/sent/dropped supportability metrics for all event collections.
Improvements
Refactored harvest cycle into separate class.
This refactoring eases managing harvested data and re-merging unharvested values on failure.
No longer download gcc on test suites that do not require it.
Bug fixes
Updated
WebFrameworkShim
to handle arrays of routes when wrapping middleware mounters.Previously, a transaction that hit a shared middleware (eg,
app.use(['/one', '/two'], ...)
) would always be tagged with<unknown>
in its name, due to the agent not interpreting arrays of paths. Now transaction names will include all paths for a shared middleware, comma-delimited, followed by the current route ('WebTransaction/Expressjs/GET//one,/two/one'
).
Fixes
- Make
require()
statements explicitly referencepackage.json
as a.json
file.
This solves a problem when requiring/importing newrelic
from a Typescript file.
- Check if
process.mainModule.filename
exists before using in missing config file check.
When the agent is preloaded with Node's --require
flag, mainModule
is not yet defined when the agent checks for a config file, resulting in a TypeError
in the event that no config file exists. Defaulting to the file path being executed in process.argv
ensures that the app will not crash when preloaded without a config file.
- Updated dev dependency tap to
v12.0.1
. - Fixed identification of errors with express.
Previously the call next('router')
was considered an error. This is actually valid usage of express and will no longer generate an error.
- Removed
debug.internal_metrics
configuration.
This legacy debug configuration was never used since trace-level logging provides everything this did and more.
- Upgraded optional dependency
@newrelic/native-metrics
to v3.
With this update comes pre-built binaries for Node 5 and 7. GC metrics are also now aggregated in C++ until the agent is ready to harvest them instead of hopping into JS for each event.
- Added additional checks to
uninstrumented
ensuring that files with names matching instrumented modules do not result in a false uninstrumented status.
For example, some users load config/env info before the agent. In that case, a file responsible for exporting DB config information (config/redis.js
), may result in a false uninstrumented status, because the agent would interpret redis.js
as the module itself.