Install the New Relic Node.js agent on Azure App Service for Windows using the New Relic Azure Site Extension.
중요
This method is for Windows-based Azure App Service apps deployed as code only. For Linux containers on Azure, use the standard npm install method and pass NEW_RELIC_LICENSE_KEY as an app setting. For a manually deployed Linux-based application, refer to Node.js agent on Microsoft Azure App Services.
For applications running on Windows 32, full Code Level Metrics support (file path, line, column) is not available — profiling falls back to function name only.
Prerequisites
Requirement | Details |
|---|---|
New Relic account | You need a New Relic account and your . |
Azure App Service | A Node.js application running on Azure Windows App Service, deployed as code. |
App stopped | Stop the target application before installing the extension to avoid partial instrumentation. |
Install the site extension
From the Azure Home page, click App Services and select your target application.
In the left menu under Development Tools, select Extensions.
Click + Add at the top of the page, then select New Relic Node Agent from the dropdown.
Accept the legal terms and click OK.
Once installed, the extension creates:
- Agent files and dependencies at
C:\home\site\wwwroot\node_modules - An XDT transform (
applicationHost.xdt) that automatically injectsNODE_OPTIONS=-r newrelicon application startup
Configure the agent
In your application's left menu, go to Settings > Environment variables and add:
| Setting | Value |
|---|---|
NEW_RELIC_LICENSE_KEY | Your New Relic license key |
NEW_RELIC_APP_NAME | The name that will appear in New Relic |
The extension automatically sets NODE_OPTIONS to -r newrelic. Any previously defined NODE_OPTIONS will be reset. For all other configuration options, see Node.js agent configuration.
Verify data is flowing
Start your application and send at least two requests. Wait 2–3 minutes and open one.newrelic.com > APM to look for your app by name.
If the extension fails to install, check the log at:
C:\home\SiteExtensions\NewRelic.Azure.Websites.Extension.NodeAgent\install.logIf the agent is installed but data doesn't appear, check:
C:\home\site\wwwroot\newrelic_agent.log팁
App not appearing? See Troubleshooting your Node.js installation.
Related articles
- Node.js agent compatibility and requirements — Supported Node.js versions.
- Node.js agent configuration — All available configuration settings.
- Install the Node.js agent — Standard npm install method.