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).
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.
- Install the NewRelicWindowsAzure NuGet package in your app using this command:
- Follow the prompts to enter your New Relic license key and application name.
- 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:
- Sign up through the Azure Store.
- Install the NuGet package.
- 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.
- Sign in to the Windows Azure Management Portal, and select New.
- Select Store.
- In the Choose a service dialog, select New Relic, and select Next.
- In the Personalize Service dialog, select the New Relic plan that you want.
- Enter a promotion code, if applicable.
- Enter a name for how the New Relic service will appear in your Windows Azure settings, or use the default value NewRelic.
- Choose a value for the region (for example, West US), and select Next.
- 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.
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).
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.
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.
From the Package Manager command prompt, type
and press Enter.
At the license key prompt, type the license key you received from the Windows Azure Store.
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.
From the Solution Explorer, right-click your Windows Azure Cloud Service Project, and select Publish.
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:
- From the Azure portal, select Manage.
- Sign in with your New Relic account email and password.
- From the New Relic menu APM bar, select Applications > (selected app).
Your app's Monitoring > Overview dashboard automatically appears.
Using New Relic
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.
Here is a summary of known limitations you might experience when installing the .NET agent on Azure Cloud Services.
|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:
- Installing the .NET agent on Azure (overview and special pricing for using New Relic's .NET agent with Windows Azure)
- Azure Web Sites (New Relic's procedures for Azure Web Sites)
- Azure Preview Portal (Installing and using New Relic .NET agent on new Azure Portal [currently in Preview])
- Apdex: Measuring user satisfaction (overview of how Apdex measures end users' satisfaction with your application)
- Page load timing process (Overview of page load timing, sometimes referred to as real user monitoring or RUM)
- Finding help (resources available through New Relic's online Help Center)