cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Not a customer? Start a free trial

Click the Start a free trial link to start a 15-day SaaS trial of our product and join our community as a trial user. If you are an existing customer do not start a free trial.

AppDynamics customers and established members should click the sign in button to authenticate.

Knowledge Base

Advanced NPM Guide for the AppDynamics Node.js Agent

AppDynamics Node.js Agent native dependencies and their environments

 

The AppDynamics Node.js Agent has multiple native dependencies which are keyed to particular environments. As such, the Agent works somewhat differently than other NPM packages. 

 

For example, when downloading our package from NPM, it will request a dependency appdynamics-native which itself will in turn download an artifact to install that will work only for a particular environment. As we want to support multiple environments, we need some way to distribute multiple artifacts for each dependency; one for each unique environment.

 

The way we currently accomplish this is through a post install script for each dependency. The agent modules containing cross-platform Javascript are uploaded to NPM, but the platform-dependent portions are hosted on AppDynamics infrastructure and downloaded separately. This allows our agent to work well with lock files of package managers, while still retaining the ability to deploy platform-specific artifacts, which otherwise would change the checksum within these lock files.

 

Generally, dependency artifacts are matrixed on Node.js major version, platform, and architecture. This means that the same dependency has many different potential artifacts, depending on the automatically detected values of the Node.js version, platform, and architecture.

 

The most important operational implication of this is that users must install the agent within an environment which exactly matches the target deployment environment, otherwise they will be deploying an agent bundle that will not load properly. We see this scenario in many CI/CD pipelines, where the build server is in important ways set up differently than the deployment servers/containers, and needs to be adjusted.

Version history
Last update:
‎09-29-2020 03:12 PM
Updated by:
Labels (1)
Tags (2)


Found this article helpful? Click the Thumbs Up button.
Have an additional comment? Post it below.
By replying you agree to the Terms and Conditions of the AppDynamics Community.