Use New Relic to monitor Mobile Services
This topic shows you how to configure the third-party New Relic add-on to work with Azure Mobile Services to provide enhanced monitoring of your mobile service.
The tutorial guides you through the following steps:
- Sign up for New Relic using the Azure Store.
- Install the New Relic module.
- Enable New Relic developer analytics for the mobile service.
- Monitor the mobile service in the New Relic dashboard.
To complete this tutorial, you must have already created a mobile service by completing either the Get started with Mobile Services or the Get started with data tutorial.
Sign up for New Relic using the Azure Store
The first step is to purchase the New Relic service. This tutorial shows you how to purchase this service from the Azure Store. Mobile Services supports New Relic subscriptions purchased outside of the Azure Store.
Log in to the Azure Management Portal.
In the lower pane of the management portal, click New.
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 Azure settings, or use the default value NewRelic. This name must be unique in your list of subscribed Azure Store items.
Choose a value for the region; for example, West US.
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 Azure management portal.
Install the New Relic module
After you have signed-up for the New Relic service, you need to install the New Relic Node.js module in your mobile service. You must have source control enabled for your mobile service to be able to upload this module.
If you haven't already done so, follow the steps in the tutorial Store server scripts in source control to enable source control for your mobile service, clone the repository, and install the Node Package Manager (NPM).
Navigate to the
.\service folder of your local Git repository, then from the command prompt run the following command:
npm install newrelic
NPM installs the New Relic module in the
Open a Git command-line tool, such as GitBash (Windows) or Bash (Unix Shell) and type the following command in the Git command prompt:
$ git add .
$ git commit -m "added newrelic module"
$ git push origin master
This uploads the new
newrelic module to your mobile service.
Next, you will enable New Relic monitoring of your mobile service in the Management Portal.
Enable New Relic developer analytics for the mobile service
In the Management Portal, select your mobile service, then click the Configure tab.
Scroll down to Developer analytics and do one of the following, depending on how you purchased your New Relic subscription:
Purchased in the Azure store:
Click Add-on, select the New Relic add-on from Choose add-on, then click Save.
Purchased directly from New Relic:
Click Custom, select the New Relic from Provider, enter your key, then click Save.
The key can be obtained from your the New Relic dashboard.
After registration is complete, you will see a new value in App settings:
Monitor the mobile service in the New Relic dashboard
Run your client app to generate read, create, update, and delete requests to your mobile service.
Wait a few minutes for the data to be processed, then navigate to the New Relic dashboard.
When your New Relic subscription was purchased as an add-on, select it in the Management Portal, and click Manage.
In New Relic, click Applications, then click your mobile service.
Click Web transactions to see recent requests you just made to your mobile service: