Want to start monitoring your Node.js application with New Relic right away? Use this guide to find the best path to start sending your application data to New Relic.
Is your application running on a Kubernetes cluster? Try out our installation method using the Kubernetes APM auto-attach.
We have a few paths to install the Node.js agent, depending on what you're monitoring.
To install the agent in a Docker container, follow these self-guided steps using the command line.
This process walks you through adding the agent to package.json, then requiring New Relic on the app-level. By the end, you'll add your license key and app name to docker run so the agent runs with your Docker app.
We've got a few different options for apps hosted on a server.
Our guided install breaks down the installation into steps. It requires some interaction with the command line.
For apps that use the PM2 process manager, follow the guided install. If you're using a process manager that isn't PM2, then choose either the guided or manual install option.
When you're ready to monitor your app, add -r newrelic to your app's startup command to require the agent before other modules, for example node -r newrelic your-program.js. This is especially important if you don't have root access to your app.
To install an agent for your AWS Lambda functions, our self-guided steps provide a setup script that automatically configures AWS for you.
If you'd like to instrument an Azure web app for your apps deployed as code in a Windows environment, you can easily install and configure the New Relic Node Agent with the Azure Node Agent Site Extension.
What's next?
So you've instrumented your app and want next steps. You might consider: