New Relic Application Performance Management on Windows Azure Web Sites
This guide describes how to add New Relic's world-class performance monitoring to your Windows Azure Web Site. We'll cover the fast and simple process to add New Relic to your application and introduce you to some of New Relic's features. For more information about using New Relic, see Using New Relic.
What is New Relic?
New Relic is a developer focused tool that monitors your production applications and provides deep insight into their performance and reliability. It is designed to save you time when identifying and diagnosing performance issues, and it puts the information you need to solve these issues at your fingertips.
New Relic tracks the load time and throughput for your web transaction, both from the server and your users' browsers. It shows how much time you spend in the database, analyzes slow queries and web requests, provides uptime monitoring and alerting, tracks application exceptions, and a whole lot more.
New Relic special pricing through the Windows Azure Store
New Relic Standard is free to Windows Azure users. New Relic Pro is offered in multiple packages based on which web site mode you are using, and the instance size if you are using reserved mode.
For pricing information see the New Relic page in the Windows Azure Store.
Pricing is only listed for up to 10 compute instances. For counts greater than 10 please contact New Relic (firstname.lastname@example.org) for volume pricing.
Windows Azure customers receive a 2 week trial subscription of New Relic Pro when they deploy the New Relic agent.
Sign up for New Relic using the Windows Azure Store
New Relic integrates seamlessly with Windows Azure Web Roles, Worker roles and Web Sites.
To sign up for New Relic directly from the Windows Azure Store, follow these four easy steps.
Step 1. Sign up through the Windows Azure Store
- Log in to the Windows Azure Management Portal.
- In the lower pane of the management portal, click New.
- Click Store.
- In the Choose an Add-on dialog, select New Relic and click Next.
- In the Personalize Add-on dialog, select the New Relic plan that you want.
- Enter a name for how the New Relic service will appear in your Windows Azure settings, or use the default value NewRelic. This name must be unique in your list of subscribed Windows Azure Store items.
- Choose a value for the region; for example, West US.
- Click Next.
- In the Review Purchase dialog, review the plan and pricing information, and review the legal terms. If you agree to the terms, click Purchase.
- After you click Purchase, your New Relic account will begin the creation process. You can monitor the status in the Windows Azure management portal.
- To retrieve your New Relic license key, click the Add-On you just created and then click Connection Info.
- Copy the license key that appears. You will need to enter it when you install the New Relic Nuget package.
Step 2. Install the New Relic package
The New Relic Web Sites Agent is distributed as a NuGet package, which can be added to your Web Site using either Visual Studio or WebMatrix. If you are unfamiliar with using Visual Studio or WebMatrix with a Windows Azure Web Site, see Deploying an ASP.NET Web Application to a Windows Azure Web Site using Visual Studio or Develop and deploy a web site with Microsoft WebMatrix.
Perform the following steps for the specific development environment you are using:
Open your Visual Studio Web Site solution.
Open the Package Manager console by selecting Tools > Library Package Manager > Package Manager Console. Set your project to be the Default Project at the top of the Package Manager Console window.
On the Package Manager command prompt, use the following command to install the package:
At the license key prompt, enter the license key you received from the Windows Azure Store.
Open your Web Site using WebMatrix.
On the Home tab of the ribbon, select NuGet.
In the NuGet Gallery, set the source to NuGet Official Package Source and then search for NewRelic.Azure.WebSites.
Select the New Relic for Windows Azure Web Sites entry, and then click Install.
After installing the package, your site will now contain a folder named newrelic. Expand this folder and open the newrelic.config file. In this file, replace the value REPLACE_WITH_LICENSE_KEY with the license key you received from the Windows Azure Store.
After adding the license key information, save the changes to the newrelic.config file.
Step 3. Configure the Web Site and publish the application.
The New Relic package added to your application in the previous step is configured by App Settings added to your Windows Azure Web Site. Perform the following steps to add these settings.
Sign in to the Windows Azure management portal and navigate to your Web Site.
From your Web Site, select Configure. In the Developer Analytics section, select either Add-on or Custom. Either method produces the same output, but requires slightly different input. Add-on lists your current New-Relic licenses and allows you to select one, while Custom requires you to manually specify the license key.
If you selected Add-on, use the choose add-on field to select your your New-Relic license.
If you selected Custom, use select New-Relic as the Provider, and then enter your license in the Provider Key field.
After specifying license in Developer Analytics, click Save. Once the save operation has completed, the following values will have been added to the App Settings section of the page to support New-Relic:
|Key ||Value |
|NEWRELIC_LICENSEKEY||Your license key |
It may take up to 30 seconds for the new App Settings to take effect. To force the settings to take effect immediately, restart the web site.
Using Visual Studio or WebMatrix, publish your application.
Step 4. Check out your application's performance in New Relic.
To view your New Relic dashboard:
- From the Windows Azure portal, click the Manage button.
- Sign in with your New Relic account email and password.
From the New Relic menu bar, select Applications > (application's name).
The Monitoring > Overview dashboard automatically appears.
After you select an app from the list on your Applications menu, the Overview dashboard shows current app server and browser information.
Using New Relic
After you select your app from the list on the Applications menu, the Overview dashboard shows current app server and browser information. To toggle between the two views, click the App server or Browser button.
In addition to the standard New Relic UI and dashboard drill-down functions, the Applications Overview dashboard has additional functions.
|If you want to... ||Do this... |
|Show dashboard information for the selected app's server or browser ||Click the App Server or Browser button. |
|View threshold levels for your app's Apdex score ||Point to the Apdex score ? icon. |
|View worldwide Apdex details ||From the Overview's Browser view, point anywhere on the Global Apdex map. |
Tip: To go directly to the selected app's Geographydashboard, click the Global Apdex title, or click anywhere on the Global Apdex map.
|View the Web Transactions dashboard ||Click the Web Transactions table on the Applications Overview dashboard. Or, to view details about a specific web transaction (including Key Transactions), click its name. |
|View the Errors dashboard ||Click the Error rate chart's title on the Applications Overview dashboard. |
Tip: You can also view the Errors dashboard from Applications > (your app) > Events > Errors.
|View the app's server details || |
Do any of the following:
- Toggle between a table view of the hosts or breakout metric details of each host.
- Click an individual server's name.
- Point to an individual server's Apdex score.
- Click an individual server's CPU usage or Memory.
Below is an example of the Applications Overview dashboard when you select the Browser view.
Check out these additional resources for more information: