Learn to use Visual Studio, Visual Studio Online, Application Insights and Team Foundation Server to decrease rework, increase transparency into your application and increase the rate at which you can ship high quality software throughout the application lifecycle
We are excited to announce that there is an updated version of Microsoft Monitoring Agent (MMA) available now. Performance counter collection frequency was reduced from 5 minutes to 1 minute for standard and custom counters so you’ll see trends more granularly and faster. There are also improvements in our log collection feature and bug fixes improving agent stability. This agent version standardizes on a single way to configure Application Insights (both agent and SDKs) driven through Visual Studio using our Application Insights Tools for Visual Studio. The best part is this Application Insights configuration file is now part of the application so deploying a new app to a server that has MMA installed is all that’s needed to enable monitoring of a new application. We strongly encourage all customers to update the agent in your environment to start getting all the benefits. Older versions of agent will be deprecated soon.
The latest version of the agent is available here and the best way to check the current version running today is by looking at the Overview \ Servers view. Ensure the Agent Version column shows: 7.1.11115.0. Follow the steps below to update. Note: latest Java agent is 220.127.116.11.
Three different scenarios:
1. My application is installed on a VM (including hosted in Azure) or a physical server and I do have the ability to update the project file and deployment through latest Application Insights VSIX (recommended)
a. Install or double check you are running the latest Application Insights VSIX (version 1.2)
b. Open the Solution that includes your application project
c. Right click the application project and choose “Add Application Insights Telemetry”
d. IMPORTANT: Make sure to choose “Configure Settings” and select the component name that this application uses today so data is still routed to the same Application.
e. On the server where the application is installed uninstall MMA
f. Delete the Monitoring.CollectionPlan.config if specified and merge the content/settings you still need into the ApplicationInsights.config file created by step c. Setting names or meanings have not changed.
g. install the latest MMA agent. Available directly from here and restart IIS.
h. Deploy your application and make sure the ApplicationInsights.config file is included in the deployment (should be in the same directory as web.config).
i. If the application is running on more than 1 server make sure to update MMA and your application on each.
j. Back on VS Online Application Insights\Overview\Servers ensure the agent version is 7.1.11115.0 and all servers updated have recent Last server reported times. On the same page choose “filter by application” and ensure there is a recent “Last app reporting time” as well. Trouble shooting steps: 1. Ensure MMA services are running (named Microsoft Monitoring Agent and Microsoft Monitoring Agent MMA) 2. Ensure there is some load or requests on the application 3. Check the Operations Manager event log on the server
k. Redo steps b-h for each application that needs an updated MMA
2. My application is installed on a VM (including hosted in Azure) or a physical server and I do not have the ability to update the project file and deployment through latest Application Insights VSIX
a. Create a new application in your VS online account
b. Navigate to the Server Performance page (Performance -> Server Performance)
c. Make sure the Application drop down selector is showing the newly created Application
d. Download the ApplicationInsights.config file.
e. Manually change these 2 settings in the file to match the Application you are updating the agent on.
i. <ComponentID> </ComponentID>
1. This is the ID used by the SDKs and is unique per application
2. This key can be obtained by going to the Application Insights Admin pages (setup icon top right). Then go to the Keys and Downloads page and ensure the drop down now shows the Application you want to update the agent on (it shouldn’t show the App you just created as the keys will already be set to that)
1. This is the current Display Name used by the MMA agent for the application that needs an updated agent. the default is the name of your Website if not specified through agent config already.
2. Note: It is not possible to have 2 applications on the same server to share the same ComponentName.
f. If you have customized the MMA settings already in a collectionplan update these settings in ApplicationInsights.config – this includes windows performance counter collection. Setting names or meanings have not changed.
g. Download the latest MMA agent. Available directly from here
h. Uninstall the current version of the MMA agent.
i. Delete the Monitoring.CollectionPlan.config
j. Place the updated ApplicationInsights.config file in your applications root folder (same folder as web.config)
k. Install the new version of MMA agent and then restart iis.
l. Redo this on each server that is reporting for the same application name
m. Back on VS Online Application Insights\Overview\Servers ensure the agent version is 7.1.11115.0 and all servers updated have recent Last server reported times. On the same page choose “filter by application” and ensure there is a recent “Last app reporting time” as well. Trouble shooting steps: 1. Ensure MMA services are running (named Microsoft Monitoring Agent and Microsoft Monitoring Agent MMA) 2. Ensure there is some load or requests on the application 3. Check the Operations Manager event log on the server
n. Redo steps e-l for each application that needs an updated MMA
3. My application is running in an Azure Cloud service
c. For each WebRole (Coming soon: worker Roles) Right click the Web role project and choose “Add Application Insights Telemetry”
d. IMPORTANT: Make sure to choose “Configure Settings” and select the component name that this application uses today so data is still routed to the same name.
e. Delete the Monitoring.CollectionPlan.config in the azure cloud VS project (if you have it specified) and merge the content/settings you still need into the ApplicationInsights.config file created by step c. Setting names or meanings have not changed.
f. Remove ApplicationInsights settings from CSCFG as they are specified in ApplicationInsights.config file now (see advanced settings below for ways to override).
g. Modify ServiceDefinition.csdef to update the Application Insights startup task definition to be:
i. <Task commandLine="AppInsightsAgent\UnifiedBootstrap.bat" executionContext="elevated" taskType="simple"></Task>
h. Ensure your project includes a AppInsightsAgent folder and contains 2 files: UnifiedBootstrap.bat & UnifiedBootstrap.ps1
i. Should be set to “Copy if newer”
ii. They can be downloaded from here
i. Rebuild your cloud project, package for the deployment and deploy it to the Azure. If you're doing an in-place upgrade you'll need to reimage your role after.
k. Redo steps above for each application/web role that needs an updated MMA
l. Advanced Settings:
i. These settings can still be controlled from CSCFG if the same deployment is used in multiple environments such as QA, PROD.
1. <Setting name="Microsoft.AppInsights.AccountId" value="accountgui>"/>
2. <Setting name="Microsoft.AppInsights.InstrumentationKey" value="instrumentationkey” />
3. <Setting name="Microsoft.AppInsights.DisplayName" value="displayname" />
4. <Setting name="Microsoft.AppInsights.EnableMonitoring" value="true" />
If you have any questions or run into issues post them at http://aka.ms/AIForum
After installing the latest MMA Agent, I am unable to see all the parameters for Start-WebApplicationMonitoring command. Any reason why?
I am not using System Centre Operation Manager, I am running in stand-alone mode.
Copies the specified collection plan file into ApplicationInsights.config before reading it to configure
monitoring. The path can be absolute or relative to the current folder.
Monitor the specified application and send the data to Application Insights. You must specify either Cloud or
Save data locally in an IntelliTrace file. You must specify either Cloud or Local.
The name of the web application to monitor. To discover the running application names, use get-website. Valid
formats for this parameter are:
Do not start monitoring until IIS is restarted, and do not restart IIS now. Monitoring will begin the next
time you restart IIS.
Prompts you for confirmation before performing the command.
Describes the effect of the command, but does not actually perform it.
As you can see, -Mode parameter is missing.
I am trying to monitor a SharePoint application and I need to set -Mode to 'Trace'. Any help?
You said "Coming soon: worker Roles"
I'm still waiting ;) Do you know how soon is "soon" ?
@Guillaume - follow the steps here:
to use the core SDK for an azure worker role. Vitaly . Gorbenko @ Microsoft . com is working on a blog article to share how to enable the runtime instrumentation agent so you can learn about your code dependencies.
@VladJ I tried to log uncaught exceptions of my worker role but don't see them in the portal. Maybe the buffer is not sent before the application is stopped. There is no easy way to clear the buffer... (Thread.Sleep but that's ugly and unreliable).