About Node.js Agent Node Identity

You configure the identify of a Node.js application instance using the node name setting. By default, the agent uses the value configured for nodeName as a prefix and adds a dash and number as a suffix. For example, given the following setting:

nodeName=MyNode

The first node to start with this configuration would be named MyNode-0. Auto-numbered suffixes on node names are most useful for machines with more than one worker process.

If you are not running multiple worker processes, you can prevent auto-numbering in node names by setting noNodeNameSuffix to true. In the following example, the node would be named MyNode.

nodeName=MyNode
noNodeNameSuffix=true

If you are instrumenting worker processes on different machines, keep in mind that each application and node name combination must be unique. Therefore, be sure to specify different node name prefixes for each server, for example, by configuring nodeName=Server1 for the first server and nodeName=Server2 for the second server.

If you are instrumenting a Node.js application that uses the PM2 process manager, set the node suffix name to process.env.pm_id.