Azure Cloud Services

If your application runs on Microsoft's Azure Cloud platform, follow this procedure to install New Relic's .NET agent. If your application runs on the Azure Websites platform, see Azure Websites.

Caution: Before installing the NuGet package into a multi-project Visual Studio solution, make sure you have selected the correct project for your New Relic .NET application (for example, a specific website project).

Special pricing

New Relic has partnered with Microsoft to provide discounted pricing when you sign up through the Windows Azure Store. For specific pricing details, see New Relic in the Azure Store .

Note: If you install the .NET agent for your Windows Azure app directly from New Relic's website rather than through the Windows Azure Store, the special pricing offer does not apply.

Quick install: Azure Cloud Services

If you are familar with New Relic, Azure, and NuGet, this summarizes how to add New Relic to your Azure-deployed application. For more detailed instructions, see Installing New Relic on Web and Worker Roles.

Note: This procedure requires your New Relic license key. To retrieve it: From the New Relic section of the Windows Azure management portal, select Connection Info, and then copy the license key that appears.

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

  1. Install the NewRelicWindowsAzure NuGet package in your app using this command:
    Install-Package NewRelicWindowsAzure
  2. Follow the prompts to enter your New Relic license key and application name.
  3. Deploy your application to Azure.

Installing New Relic on Web and Worker Roles

Users located in the United States have access to the Windows Azure Store. To sign up for New Relic directly from the Windows Azure Store:

  1. Sign up through the Azure Store.
  2. Install the NuGet package.
  3. Check your application's performance in New Relic.

Note: Your app must receive traffic in order to view its performance in New Relic. You may need to wait a few minutes for data to start appearing.

Signing up through the Azure Store (USA users only)

To sign up, go to the New Relic in the Azure Store . When you sign up, you will be prompted to enter a name for the New Relic service. This name must be unique in your list of subscribed Windows Azure Store items.

  1. Sign in to the Windows Azure Management Portal, and select New.
  2. Select Store.
  3. In the Choose a service dialog, select New Relic, and select Next.
  4. In the Personalize Service dialog, select the New Relic plan that you want.
  5. Enter a promotion code, if applicable.
  6. Enter a name for how the New Relic service will appear in your Windows Azure settings, or use the default value NewRelic.
  7. Choose a value for the region (for example, West US), and select Next.
  8. In the Review Purchase dialog, review the plan and pricing information, and review the legal terms. If you agree to the terms, select Purchase.

After you select Purchase, your New Relic account will begin the creation process. You can monitor the status in the Windows Azure Management Portal.

Installing the NuGet package

When you install the NuGet package, you will need your New Relic license key. To retrieve it: From the New Relic section of the Windows Azure management portal, select Connection Info, and then copy the license key that appears.

  1. Open your Visual Studio solution, or create a new one by selecting File > New > Project. For multi-project solutions, make sure you have selected the correct project (for example, a specific website project).

  2. If you don't already have a Windows Azure Cloud Service Project in your solution, add one by right-clicking your app in the Solution Explorer and selecting Add Windows Azure Cloud Service Project.

  3. Open the Package Manager console by selecting Tools > Library Package Manager > Package Manager Console. Set your project as the Default Project at the top of the Package Manager Console window.

  4. From the Package Manager command prompt, type

    Install-Package NewRelicWindowsAzure

    and press Enter.

  5. At the license key prompt, type the license key you received from the Windows Azure Store.

  6. Optional: At the application name prompt, type your app's name as you want it to appear in New Relic's dashboard. Or, use your solution name as the default.

  7. From the Solution Explorer, right-click your Windows Azure Cloud Service Project, and select Publish.

  8. If this is your first time deploying this app to Azure, enter your Azure credentials.

Note: You may experience problems if your Web/Worker role is located within a Solutions Folder in the Visual Studio Project.

The current Nuget installer is not able to locate the necessary Service files to update if they are nested within a Solution Folder. This will cause issues with the agent setup which will in turn prevent the agent from reporting metrics on your Cloud Service. Our current recommendation is to place the web/worker role at the root of the solution before installing the Nuget package. Once the agent is installed, the cloud role can be moved back into the solution folder.

Checking 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. To check out your application's performance in your New Relic dashboard:

  1. From the Azure portal, select Manage.
  2. Sign in with your New Relic account email and password.
  3. From the New Relic menu APM bar, select Applications > (selected app).

Your app's Monitoring > Overview dashboard automatically appears.

Using New Relic

screen-app-overview-rpm

Applications > (selected app) > Monitoring > Overview: After you select an application from New Relic APM's Applications list, the Overview dashboard shows current app server and browser information.

After you select an application from New Relic APM's Applications list, the Overview dashboard shows current app server and browser information. For more information about using New Relic (in addition to the standard New Relic user interface and dashboard drill-down functions), see Applications Overview dashboard.

Known limitations

Here is a summary of known limitations you might experience when installing the .NET agent on Azure Cloud Services.

Known limitations Comments
Custom instrumentation recommended for Worker Roles

In order for the .NET agent to start up and attach to the application, at least one metric must be collected. If you have an external call or database call that we instrument, then your app will report data to your Applications Overview dashboard. In addition, information about external calls will appear on your app's Map dashboard.

Without custom instrumentation, Worker Roles only report database calls and external calls. (Instrumenting a Worker Role is similar to instrumenting a custom application.) To view other details, you must gather custom metrics using the .NET API and view them in a custom dashboard.

Disabling VSPerf and other profilers Be sure to disable VSPerf from Visual Studio's Azure Publish > Advanced settings. Using the VSPerf profiler (or any other profiler) will prevent the New Relic .NET agent from starting or instrumenting applications.

For more help

Additional documentation resources include:

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