Upgrade to v1.x

edit

The following is a guide on upgrading your Node.js agent from version 0.x to version 1.x.

Overview

edit

Version 1.x of the Node.js agent requires version 6.2 of the APM Server or higher.

The term "trace" was previously used to describe a small piece of work instrumented by the agent during a transaction. To align with modern APM vendors, we now refer to this as a "span"

The term "app" was previously used to describe your Node.js application in relation to Elastic APM. To be more specific, we now refer to this as a "service".

Config options

edit

The following config options have been removed in version 1.0.0:

Name

Note

logBody

Use captureBody instead. Note that this option is not a boolean

The following config options have been renamed between version 0.x and 1.x.

The associated environment variable for each renamed config option have been renamed accordingly as well.

Old name

New name

Note

appName

serviceName

Renamed to align with new naming conventions

appVersion

serviceVersion

Renamed to align with new naming conventions

captureTraceStackTrace

captureSpanStackTraces

Renamed to align with new naming conventions

sourceContextErrorAppFrames

sourceLinesErrorAppFrames

Renamed to align with other agents

sourceContextSpanAppFrames

sourceLinesSpanAppFrames

Renamed to align with other agents

sourceContextErrorLibraryFrames

sourceLinesErrorLibraryFrames

Renamed to align with other agents

sourceContextSpanLibraryFrames

sourceLinesSpanLibraryFrames

Renamed to align with other agents

validateServerCert

verifyServerCert

Renamed to align with other agents

Agent API

edit

The following functions have been renamed between version 0.x and 1.x:

Old name

New name

Note

buildTrace()

buildSpan()

Renamed to align with new naming conventions