The following is a guide on upgrading your Node.js agent from version 1.x to version 2.x.
Version 2.0.0 of the Node.js agent requires version 6.5 of the APM Server or higher and makes use of the new HTTP intake API.
The new agent supports Node.js 6, 8, and 10+.
The format of the error ID’s have changed from a UUID4 to a hex formatted random 128 bit number. Likewise, the format of the transaction ID’s have changed from a UUID4 to a hex formatted random 64 bit number.
The Node.js agent can be configured using a combination of inline config options, environment variables, and a config file. Many config options also have default values. The order in which these are applied has changed in 2.0.0.
In 1.x the order in which config options overruled each other was (higher overwrites lower):
The new order in 2.0.0 is (higher overwrites lower):
the config option
abortedErrorThreshold expected a millisecond value.
In 2.0.0 the default time unit is seconds.
If you’d like to keep using milliseconds,
you need to specify the unit,
all boolean config options could be configured using the strings
1, etc., to mean
true with similar values representing
In 2.0.0 this has been restricted,
and only the strings
false will be interpreted as the boolean equivalent.
The following config options have been removed in version 2.0.0:
agent.addFilter() callback is called with a different payload in 2.0.0 (see docs for details).
The previously undocumented method
span.offsetTime() has been removed in 2.0.0.
The previously undocumented
transaction.buildSpan() method has been replaced with
transaction.startSpan(name, type) in 2.0.0.
agent.buildSpan(name, type) and
span.start(name, type) methods have been removed in 2.0.0.
They have been replaced by