Install .NET Framework agent

Use any of the following methods to add the New Relic .NET Framework agent to your Azure-deployed web app. The best option depends on your role, environment, deployments, etc. For example:

For developer teams, best practice may be to use NuGet.

For operations teams that need to monitor the app, best practice may be to use the extension.

For multi-project solutions, make sure you have selected the correct project (for example, a specific web app project) before installing the NuGet package.

If you are upgrading the .NET Framework agent using NuGet, any changes you made in the newrelic.config will be overwritten. To preserve any changes, save your newrelic.config outside of your project, then restore it after upgrading.

Choose an application package based on how your application is published. For more information about configuring your application to use the 64-bit version of .NET Core in Azure, review Microsoft's documentation on 64-bit ASP.NET Core on Azure App Service.

Apps that are not self-contained

These applications must use the x86 package of the agent. This is because apps published to Azure App Services that are not self-contained utilize the x86 version of .NET Core that is pre-installed. This is true regardless of the server architecture you choose.

Self-contained apps or apps deployed with their own 64-bit runtime

These applications must use the x64 package of the agent. This is because apps published to Azure App Services with an x64 RuntimeIdentifier for self-contained publish run as x64 applications.

Add New Relic settings to Azure App Services (.NET Core)

Make sure you have your license key before adding the New Relic .NET agent's app settings.

Open the web app you want to monitor, then select Settings > Application settings.

From App settings, add these key/value pairs:

Key

Value

CORECLR_ENABLE_PROFILING

1

CORECLR_PROFILER

{36032161-FFC0-4B61-B559-F6C5D41BAE5A}

CORECLR_PROFILER_PATH

D:\Home\site\wwwroot\newrelic\NewRelic.Profiler.dll

CORECLR_NEWRELIC_HOME

D:\Home\site\wwwroot\newrelic

NEW_RELIC_LICENSE_KEY

YOUR_LICENSE_KEY

NEW_RELIC_APP_NAME

YOUR_APP_NAME

Save and restart your web app.

View your app's performance

Your application must receive traffic in order for you to view its performance in New Relic. You may need to wait a few minutes for data to start appearing. If no data appears, see the troubleshooting procedures for Azure Web Apps.

If you created your New Relic app prior to October 2017, you can use the Azure Portal to select the New Relic account blade. You will be automatically logged in with SAML Single Sign-on (SSO) to New Relic APM. You can also view your application's error rate and throughput data in the Azure Portal by going to New Relic Accounts > (select your app).

Troubleshooting

If no data appears after installing the agent, generating traffic for your app, and waiting a few minutes, try these troubleshooting steps:

Make sure that all files in the newrelic directory at the root of your app got published to Azure.