Skip to content

Commit

Permalink
docs: Added documentation and cross-link for Azure site extension
Browse files Browse the repository at this point in the history
Signed-off-by: mrickard <[email protected]>
  • Loading branch information
mrickard committed Oct 8, 2024
1 parent ec47cf3 commit fd3f776
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,14 @@ We have a few paths to install the Node.js agent, depending on what you're monit

If you have a preference for manual installation via the command line, we currently have the option for [Legacy instrumentation for Lambda monitoring](/docs/serverless-function-monitoring/aws-lambda-monitoring/enable-lambda-monitoring/enable-serverless-monitoring-aws-lambda-legacy/#node).
</Collapser>

<Collapser
id="azure"
title="Azure web app on Windows"
>
If you'd like to instrument an Azure Web App (provided that it's on Windows and deployed as code), you can easily install and configure the New Relic Node Agent with the [Azure Node Agent Site Extension](/docs/apm/agents/nodejs-agent/installation-configuration/install-nodejs-agent-azure-site-extension).

</Collapser>
</CollapserGroup>

## What's next? [#next]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
title: Install the Node.js agent with our Azure site extension
tags:
- Agents
- Nodejs agent
- Installation and configuration
- Azure Site Extension
translate:
- jp
- kr
metaDescription: Procedures and resources to install New Relic's Node.js agent for Azure web apps using the New Relic Azure Site Extension for Node.
freshnessValidatedDate: never
---

<Callout variant="important">
Azure Site Extensions are available only for Windows-based App Service apps deployed as Code.
</Callout>

g the site extension will install the New Relic Node agent.

From the Azure Home page, do the following:
- Click the App Services tile
- Click the name of the target application in the displayed list
- On the options listed on the left, scroll down to "Extensions" located under the Development Tools category
- Click on + Add at the top of the page
- From the extension drop down, select New Relic Node Agent.
- Check the box for accepting the legal terms
- Click Add on the bottom of the page. This will begin installation of the extension.

Once installed, the extension creates the following artifacts:

- Folder: `C:\home\SiteExtensions\NewRelic.Azure.Websites.Extension.NodeAgent`
- XDT: `applicationHost.xdt` that will add the necessary `NODE_OPTIONS` environment variable on application startup
- The New Relic Node agent and dependencies will be installed into `C:\home\site\wwwroot\node_modules`

If 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`.

### Compatibility note:

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.

## Configuration
The New Relic Node agent is configured with the `newrelic.js` file, or via environment variables. [See our documentation for more detailed configuration](https://docs.newrelic.com/docs/apm/agents/nodejs-agent/installation-configuration/nodejs-agent-configuration/).

Once the site extension is installed, you'll need to manually enter one configuration item before restarting your application.
- On the options listed on the left, scroll down to "Environment variables" located under the "Settings" category and add the following:
- `NEW_RELIC_LICENSE_KEY` - Your New Relic license key value

The Node agent automatically adds the `NODE_OPTIONS` environment variable with a value of `-r newrelic` which starts the agent.
- Note: Any previously `NODE_OPTIONS` will be removed and reset with `-r newrelic`.

<Callout variant="important">
We recommend installing or removing this Azure site extension while your web application is stopped.
</Callout>

0 comments on commit fd3f776

Please sign in to comment.