You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/cloud-services/cloud-services-dotnet-diagnostics-applicationinsights.md
+27-25Lines changed: 27 additions & 25 deletions
Original file line number
Diff line number
Diff line change
@@ -13,59 +13,61 @@ ms.devlang: na
13
13
ms.topic: article
14
14
ms.tgt_pltfrm: na
15
15
ms.workload: na
16
-
ms.date: 12/15/2015
16
+
ms.date: 05/23/2017
17
17
ms.author: saurabh
18
18
19
19
---
20
20
# Troubleshoot Cloud Services using Application Insights
21
-
With [Azure SDK 2.8](https://azure.microsoft.com/downloads/) and Azure diagnostics extension 1.5 you can now send your Azure Diagnostics data for your Cloud Service directly to Application Insights. The various types of logs collected by Azure Diagnosticsincluding application logs, windows event logs, ETW logs and performance counterscan now be sent to Application Insights and visualized in the Application Insights portal UI. When used along with the Application Insights SDK you can now get insights into metrics and logs coming from your application as well as the system and infrastructurelevel data coming from Azure Diagnostics.
21
+
With [Azure SDK 2.8](https://azure.microsoft.com/downloads/) and Azure diagnostics extension 1.5, you can send Azure Diagnostics data for your Cloud Service directly to Application Insights. The logs collected by Azure Diagnostics—including application logs, Windows Event Logs, ETW Logs, and performance counters—can be sent to Application Insights. You can then visualize this information in the Application Insights portal UI. You can then use the Application Insights SDK to get insights into metrics and logs that come from your application, as well as the system and infrastructure-level data that comes from Azure Diagnostics.
22
22
23
23
## Configure Azure Diagnostics to send data to Application Insights
24
-
Follow these steps to setup your cloud service project to send Azure Diagnostics data to Application Insights.
24
+
Follow these steps to set up your cloud service project to send Azure Diagnostics data to Application Insights.
25
25
26
-
1) In Visual Studio Solution Explorer right-click on a role and select **properties** to open the Role designer
26
+
1. In Visual Studio Solution Explorer, right-click a role and select **Properties** to open the Role designer.
27
27
28
-
![Solution Explorer Role Properties][1]
28
+
![Solution Explorer Role Properties][1]
29
29
30
-
2) In Role designer under the diagnostics section select the check box to **Send diagnostics data to Application Insights**
30
+
2. In the **Diagnostics** section of the Role designer, select the **Send diagnostics data to Application Insights** option.
31
31
32
-
![Role designer send diagnostics data to application insights][2]
32
+
![Role designer send diagnostics data to application insights][2]
33
33
34
-
3) In the dialog that pops up select the Application Insights Resource that you would like to send the Azure diagnostics data to. The dialog allows you to select an existing Application Insights resource from your subscription or manually specify an instrumentation key for an Application Insights resource. If you don't have an existing Application Insights resource then you can create on by clicking on the **Create a new resource** link which will open a browser window to the Azure classic portal where you can create an Application Insights Resource. For more information on creating an Application Insights resource see [Create a new Application Insights resource](../application-insights/app-insights-create-new-resource.md)
34
+
3. In the dialog box that pops up, select the Application Insights resource that you want to send the Azure diagnostics data to. The dialog box allows you to select an existing Application Insights resource from your subscription or to manually specify an instrumentation key for an Application Insights resource. For more information on creating an Application Insights resource, see [Create a new Application Insights resource](../application-insights/app-insights-create-new-resource.md).
35
35
36
-
![select application insights resource][3]
36
+
![select application insights resource][3]
37
37
38
-
4)Once you have added the Application Insights resource, the instrumentation key for that resource is stored as a service configuration setting with the name **APPINSIGHTS_INSTRUMENTATIONKEY**. You can change this configuration setting for each service configuration or environment by selecting a different configuration from the Service configuration drop down and specifying a new instrumentation key for that configuration.
38
+
Once you have added the Application Insights resource, the instrumentation key for that resource is stored as a service configuration setting with the name **APPINSIGHTS_INSTRUMENTATIONKEY**. You can change this configuration setting for each service configuration or environment. To do so, select a different configuration from the **Service Configuration** list and specify a new instrumentation key for that configuration.
39
39
40
-
![select service configuration][4]
40
+
![select service configuration][4]
41
41
42
-
The **APPINSIGHTS_INSTRUMENTATIONKEY** configuration setting is used by Visual Studio to configure the diagnostics extension with the appropriate Application Insights resource information during publishing. The configuration setting is a convenient way of defining different instrumentation keys for different service configurations. Visual Studio will translate that setting and insert it into the diagnostics extension public configuration when publishing. To simplify the process of configuring the diagnostics extension with PowerShell, the package output from Visual Studio also contains the public configuration XML with the appropriate Application Insights instrumentation key included. The public config files are created in the Extensions folder and follow the pattern PaaSDiagnostics.<RoleName>.PubConfig.xml. Any PowerShellbased deployments can use this pattern to map each configuration to a Role.
42
+
The **APPINSIGHTS_INSTRUMENTATIONKEY** configuration setting is used by Visual Studio to configure the diagnostics extension with the appropriate Application Insights resource information during publishing. The configuration setting is a convenient way of defining different instrumentation keys for different service configurations. Visual Studio will translate that setting and insert it into the diagnostics extension public configuration during the publish process. To simplify the process of configuring the diagnostics extension with PowerShell, the package output from Visual Studio also contains the public configuration XML with the appropriate Application Insights instrumentation key. The public config files are created in the Extensions folder and follow the pattern *PaaSDiagnostics.<RoleName>.PubConfig.xml*. Any PowerShell-based deployments can use this pattern to map each configuration to a role.
43
43
44
-
5) Enabling the **Send diagnostics data to Application Insights** will automatically configure Azure diagnostics to send all performance counters and errorlevel logs that are being collected by the Azure diagnostics agent to Application Insights. If you want to further configure what data is sent to Application Insights then you need to manually edit the *diagnostics.wadcfgx* file for each role. See [Configure Azure Diagnostics to send data to Application Insights](#configure-azure-diagnostics-to-send-data-to-application-insights) to learn more about manually updating the configuration.
44
+
4) To configure Azure diagnostics to send all performance counters and error-level logs collected by the Azure diagnostics agent to Application Insights, enable the **Send diagnostics data to Application Insights** option.
45
45
46
-
Once the Cloud Service is configured to send Azure diagnostics data to application insights you can deploy it to Azure like you normally would making sure the Azure diagnostics extension is enabled. See [Publishing a Cloud Service using Visual Studio](../vs-azure-tools-publishing-a-cloud-service.md).
46
+
If you want to further configure what data is sent to Application Insights, you must manually edit the *diagnostics.wadcfgx* file for each role. See [Configure Azure Diagnostics to send data to Application Insights](#configure-azure-diagnostics-to-send-data-to-application-insights) to learn more about manually updating the configuration.
47
+
48
+
When the cloud service is configured to send Azure diagnostics data to application insights, you can deploy it to Azure normally, making sure the Azure diagnostics extension is enabled. For more information, see [Publishing a Cloud Service using Visual Studio](../vs-azure-tools-publishing-a-cloud-service.md).
47
49
48
50
## Viewing Azure diagnostics data in Application Insights
49
-
The Azure diagnostic telemetry will show up in the Application Insights resource configured for your cloud service.
51
+
The Azure diagnostic telemetry shows up in the Application Insights resource configured for your cloud service.
50
52
51
-
The following is how the various Azure diagnostics log types map to Application Insights concepts:
53
+
Azure diagnostics log types map to Application Insights concepts in these ways:
52
54
53
-
* Performance Counters are displayed as Custom Metrics in Application Insights
54
-
* Windows Event Logs are shown as Traces and Custom Events in Application Insights
55
-
* Application Logs, ETW Logs and any Diagnostics Infrastructure logs are shown as Traces in Application Insights.
55
+
* Performance counters are displayed as Custom Metrics in Application Insights.
56
+
* Windows Event Logs are shown as Traces and Custom Events in Application Insights.
57
+
* Application logs, ETW logs, and any Diagnostics Infrastructure logs are shown as Traces in Application Insights.
56
58
57
-
To view Azure diagnostics data in Application Insights:
59
+
To view Azure diagnostics data in Application Insights, do one of the following:
58
60
59
-
* Use [Metrics explorer](../application-insights/app-insights-metrics-explorer.md) to visualize any custom performance counters or counts of different types of windows event log events.
61
+
* Use [Metrics explorer](../application-insights/app-insights-metrics-explorer.md) to visualize any custom performance counters or counts of different types of Windows Event Log events.
60
62
61
-
![Custom Metrics in Metrics Explorer][5]
63
+
![Custom Metrics in Metrics Explorer][5]
62
64
63
-
* Use [Search](../application-insights/app-insights-diagnostic-search.md) to search across the various trace logs sent by Azure Diagnostics. For example if you had an unhandled exception in a Role which caused the Role to crash and recycle that information would show up in the *Application* channel of *Windows Event Log*. You can use the Search functionality to look at the Windows Event Log error and get the full stack trace for the exception enabling you to find the root cause of the issue.
65
+
* Use [Search](../application-insights/app-insights-diagnostic-search.md) to search across the trace logs sent by Azure Diagnostics. For example, if an unhandled exception has caused the role to crash and recycle, information about the exception shows up in the *Application* channel of *Windows Event Log*. You can use search to look at the Windows Event Log error and get the full stack trace for the exception to help find the cause of the issue.
64
66
65
-
![Search Traces][6]
67
+
![Search Traces][6]
66
68
67
69
## Next Steps
68
-
*[Add the Application Insights SDK to your cloud service](../application-insights/app-insights-cloudservices.md) to send data about requests, exceptions, dependencies, and any custom telemetry from your application. Combined with the Azure Diagnostics datayou can get a complete view of your application and system all in the same Application Insight resource.
70
+
*[Add the Application Insights SDK to your cloud service](../application-insights/app-insights-cloudservices.md) to send data about requests, exceptions, dependencies, and any custom telemetry from your application. When combined with the Azure Diagnostics data, this information you can get a complete view of your application and system, all in the same Application Insight resource.
0 commit comments