This page covers installing the New Relic Java agent on Azure App Service for Windows using the New Relic Java Agent site extension. The extension injects the agent automatically without modifying your app's startup script.
Compatibility and requirements
Supported
- Java applications running on Azure Windows App Service
- New Relic Java agent versions compatible with Java 8 and higher (Java 7 supported on agent v6.5.4 and earlier only)
- See compatibility and requirements for supported framework and library version ranges
Not supported
- Linux containers on Azure — use the Docker install method and pass
-javaagentviaJAVA_TOOL_OPTIONS - Running alongside other APM agents — the Java agent cannot guarantee correct behavior when another APM agent is active in the same JVM
You need
- A New Relic account and
- A JVM with SHA-2 (256-bit) SSL support
- A Java application running on Azure Windows App Service
- The target application must be stopped before installing the extension to avoid partial instrumentation
Install
Install the site extension
From the Azure Home page, select App Services, then select your target application.
In the left menu, scroll to Development Tools and select Extensions.
Select + Add at the top of the page to open the extension dropdown.
Select New Relic Java Agent.
Accept the legal terms and select OK to begin installation.
Once installed, the extension creates:
Agent files at
C:\home\NewRelic\JavaAgent\newrelic\(jars, config, sources)XDT transform (
applicationHost.xdt) that automatically injects theJAVA_TOOL_OPTIONSenvironment variable on application startupIf the extension fails to install, check the log at
C:\home\SiteExtensions\NewRelic.Azure.WebSites.Extension.JavaAgent\install.log.
Configure the agent
In your application's left menu, go to Settings > Configuration.
Add the following application settings:
Setting Value NEW_RELIC_LICENSE_KEYYour New Relic license key NEW_RELIC_APP_NAMEThe name that appears in the New Relic platform You can also add any additional configuration settings as app settings to customize the agent further.
Verify your install
Start your application. Send at least two requests, then wait 2–3 minutes and your app appears in APM & services.
If no data appears after five minutes, see No data appears (Java).