Upgrade the Node.js Agent

To upgrade the APM Insight Node.js agent, follow these instructions:

  1. Stop the Node.js application.
  2. Access the node package manager (NPM).
  3. Navigate to the application root directory of the application for which you want to upgrade the agent.
  4. First, you need to uninstall the old version of the agent by entering the below command:
    $ npm uninstall apminsight
  5. Now, from the same directory, run the following command to install the new version of the agent.
    $ npm i apminsight@<version>
    Note
    1. The version refers to the number associated with the new release you are installing; for example, for version 4.9:
      Syntax:
      npm i apminsight@4.9
      You can find the latest agent version on the release notes page.
    2. Verify that the latest agent (apminsight) is installed by executing the following command from the root directory of your application (where the package.json file is located):
      npm list | grep apminsight
      Sample output:
      ├── apminsight@4.9
      
  6. Restart the Node.js application.
Note

After upgrading, you can verify the version of the agent by checking the package.json file.

Shortlink has been copied!