cloud-tooling/azure-site-extension/Content/README.md
This project creates an Azure site extension that automatically installs the New Relic Node Agent. This extension is designed for Node applications running on Azure Windows compute resources. The site extensions follow semantic versioning conventions. You can expect to find artifacts in Nuget.
Applying the site extension will install the New Relic Node agent.
From the Azure Home page, do the following:
Once installed, the extension creates the following artifacts:
C:\home\SiteExtensions\NewRelic.Azure.Websites.Extension.NodeAgentapplicationHost.xdt that will add the necessary NODE_OPTIONS environment variable on application startupC:\home\site\wwwroot\node_modulesIf the extension fails to install, a log file is created at C:\home\SiteExtensions\NewRelic.Azure.Websites.Extension.NodeAgent\install.log.
If the New Relic agent has been installed successfully and logging has been enabled, the agent will append its logs to a file at C:\home\site\wwwroot\newrelic_agent.log.
For applications running on Win 32, full Code Level Metrics support (file path, line, column) is not available, and profiling will fall back to function name only.
The New Relic Node agent is configured with the newrelic.js file, or via environment variables. See our documentation for more detailed configuration.
Once the site extension is installed, you'll need to manually enter one configuration item before restarting your application.
NEW_RELIC_LICENSE_KEY - Your New Relic license key valueThe Node agent automatically adds the NODE_OPTIONS environment variable with a value of -r newrelic which starts the agent.
NODE_OPTIONS will be removed and reset with -r newrelic.Below is a description of the files that make up the extension. This can be helpful for future maintenance on the extension or for the creation of another Site Extension.
README.md - This fileNewRelic.Azure.WebSites.Extension.NodeAgent.nuspec - Contains the metadata about the target extension: Name, authors, copyright, etc. Nuspec FormatContent/applicationHost.xdt - XDT transformation to add the necessary agent startup environment variable to the app config when the app starts upContent/install.cmd - Simple batch file that wraps a call to the Powershell install.ps1 scriptContent/install.ps1 - Powershell script that moves/installs the agent bundle to the proper location on the hostContent/uninstall.cmd - Simple batch file that will remove the Node installation artifacts when the extension is removedNote: We recommend installing or removing this Azure site extension while your web application is stopped.