Azure Web Apps: Using Always On and no data appears

Problem

You installed New Relic's .NET agent through Microsoft Azure Web Apps and are using Azure's Always On setting. After waiting a few minutes for data collection to start for your app, data still does not appear in the New Relic APM user interface.

Cause

If no data appears within five minutes, Azure's Always On setting may be conflicting with New Relic. This feature is only available in Azure's Basic and Standard modes.

The Always On setting prevents the environment variable APP_POOL_ID from being set. New Relic's .NET agent needs this environment variable to get the app name. If the agent cannot determine an application name, then it won't start up.

Solution

Follow these troubleshooting procedures as applicable.

Classic Azure Portal

If you are using Microsoft's Standard or Basic tiers with the Classic Azure Portal and you have enabled the Always On setting, be sure to disable it:

  1. From the Azure sidebar, select Web Apps > (selected web app) > Configure.
  2. Set the Always On toggle to Off.
Azure Portal

If you are using Microsoft's Standard or Basic tiers with the new Azure Portal, ensure that the Always On setting is disabled.

  1. In the Azure Portal, select (your app) > Settings > Application Settings.
  2. Set the Always On toggle to Off.

Other options

Here are some other options you can try. If these do not work, you must turn off the Always On setting.

Use Kudu to name your app.

To name your application in the local newrelic.config using Kudu:

  1. From the Microsoft Azure Storefront, select (your app) > Tools > Kudu, and then select Go.
  2. Select Debug Console > CMD.
  3. Select Site > wwwroot > newrelic.
  4. Select the edit pencil icon for newrelic.config, and add:

    <application>
      <name> Your app's name </name>
    </application>
    
  5. Save and restart your application.
Use app/web.config to name your app.

This option has been found to only be a temporary fix. The .NET agent may stop reporting intermittently.

To name your application in its app/web.config file:

  1. Add the following key to appSettings:

    <appSettings>
      <add key="NewRelic.AppName" value="Your app's name" />
    </appSettings>
  2. Restart your instance.
Use New Relic Synthetics to monitor your website.

Depending on your usage of Always On, you can try using New Relic Synthetics to keep your website active.

  • If you are not using the Always On setting, you can try using the Synthetics free pinger monitor.
  • If you are using the Always On setting, New Relic Synthetics needs to be able to reach an endpoint for your worker roles. If it can't, you can try using a Synthetics scripted monitor to run on your site.

For more help

Additional documentation resources include Azure Troubleshooting (tips and procedures specific to New Relic's .NET agent and Microsoft Azure products).

Join the discussion about .NET monitoring in the New Relic Online Technical Community! The Technical Community is a public platform to discuss and troubleshoot your New Relic toolset.

If you need additional help, get support at support.newrelic.com.