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
description: In this quickstart, learn how to set up client/browser-side website monitoring with Azure Monitor Application Insights.
4
4
ms.topic: quickstart
5
5
ms.date: 07/15/2019
6
6
@@ -20,28 +20,26 @@ With Azure Monitor Application Insights, you can easily monitor your website for
20
20
21
21
## Enable Application Insights
22
22
23
-
Application Insights can gather telemetry data from any internet-connected application, running on-premises or in the cloud. Use the following steps to start viewing this data.
23
+
Application Insights can gather telemetry data from any internet-connected application that's running on-premises or in the cloud. Use the following steps to view this data:
24
24
25
25
1. Sign in to the [Azure portal](https://portal.azure.com/).
>If this is your first time creating an Application Insights resource you can learn more by visiting the [Create an Application Insights Resource](https://docs.microsoft.com/azure/azure-monitor/app/create-new-resource) article.
30
-
31
-
A configuration box appears; use the following table to fill out the input fields.
29
+
>If this is your first time creating an Application Insights resource, see [Create an Application Insights resource](https://docs.microsoft.com/azure/azure-monitor/app/create-new-resource).
30
+
1. When the configuration box appears, use the following table to complete the input fields:
32
31
33
32
| Settings | Value | Description |
34
33
| ------------- |:-------------|:-----|
35
-
|**Name**| Globally Unique Value | Name that identifies the app you're monitoring |
36
-
|**Resource Group**| myResourceGroup | Name for the new resource group to host Application Insights data. You can create a new resource group or use an existing one. |
37
-
|**Location**| East US | Choose a location near you, or near where your app is hosted |
38
-
39
-
3. Click **Create**.
34
+
|**Name**| Globally Unique Value | The name that identifies the app you're monitoring. |
35
+
|**Resource Group**| myResourceGroup | The name for the new resource group to host Application Insights data. You can create a new resource group or use an existing one. |
36
+
|**Location**| East US | Choose a location near you, or near where your app is hosted. |
37
+
1. Select **Create**.
40
38
41
39
## Create an HTML file
42
40
43
-
1. On your local computer, create a file called ``hello_world.html``. For this examplethe file will be placed on the root of the C: drive at``C:\hello_world.html``.
44
-
2. Copy the script below into ``hello_world.html``:
41
+
1. On your local computer, create a file called ``hello_world.html``. For this example, create the file on the root of drive C so that it looks like``C:\hello_world.html``.
42
+
1. Copy and paste the following script into ``hello_world.html``:
45
43
46
44
```html
47
45
<!DOCTYPE html>
@@ -51,18 +49,18 @@ Application Insights can gather telemetry data from any internet-connected appli
<p>You can use the Application Insights JavaScript SDK to perform client/browser-side monitoring of your website. To learn about more advanced JavaScript SDK configurations visit the <ahref="https://github.com/Microsoft/ApplicationInsights-JS/blob/master/API-reference.md"title="API Reference">API reference</a>.</p>
52
+
<p>You can use the Application Insights JavaScript SDK to perform client/browser-side monitoring of your website. To learn about more advanced JavaScript SDK configurations, visit the <ahref="https://github.com/Microsoft/ApplicationInsights-JS/blob/master/API-reference.md"title="API Reference">API reference</a>.</p>
2. Add the following script to your ``hello_world.html`` before the closing ``</head>`` tag:
63
+
1. Add the following script to your ``hello_world.html`` file before the closing ``</head>`` tag:
66
64
67
65
```javascript
68
66
<scripttype="text/javascript">
@@ -74,15 +72,17 @@ Application Insights can gather telemetry data from any internet-connected appli
74
72
</script>
75
73
```
76
74
77
-
3. Edit ``hello_world.html`` and add your instrumentation key.
75
+
1. Edit ``hello_world.html`` and add your instrumentation key.
76
+
77
+
1. Open ``hello_world.html`` in a local browser session. This action creates a single page view. You can refresh your browser to generate multiple test-page views.
78
78
79
-
4. Open ``hello_world.html`` in a local browser session. This action creates a single pageview. You can refresh your browser to generate multiple test page views.
79
+
## Monitor your website in the Azure portal
80
80
81
-
## Start monitoring in the Azure portal
81
+
1. Reopen the Application Insights **Overview** page in the Azure portal to view details of your currently running application. The **Overview** page is where you retrieved your instrumentation key.
82
82
83
-
1. You can now reopen the Application Insights **Overview** page in the Azure portal to view details about your currently running application. The **Overview** page is where you retrieved your instrumentation key. The four default charts on the overview page are scoped to server-side application data. Since we're instrumenting the client/browser-side interactions with the JavaScript SDK, this particular view doesn't apply unless we also have a server-side SDK installed.
83
+
The four default charts on the overview page are scoped to server-side application data. Because we're instrumenting the client/browser-side interactions with the JavaScript SDK, this particular view doesn't apply unless we also have a server-side SDK installed.
84
84
85
-
2. Click on**Analytics**. This action opens **Analytics**, which provides a rich query language for analyzing all data collected by Application Insights. To view data related to the client-side browser requests run the following query:
85
+
1. Select **Analytics**. This action opens **Analytics**, which provides a rich query language for analyzing all data collected by Application Insights. To view data related to the client-side browser requests, run the following query:
86
86
87
87
```kusto
88
88
// average pageView duration by name
@@ -101,29 +101,29 @@ Application Insights can gather telemetry data from any internet-connected appli
101
101
102
102

103
103
104
-
3. Go back to the **Overview** page. Click on **Browser** from under the **Investigate** header, then select **Performance** Here you find metrics related to the performance of your website. There's also a corresponding view for analyzing failures and exceptions in your website. You can click **Samples** to drill into individual transaction details. From here, you can access the [end-to-end transaction details](../../azure-monitor/app/transaction-diagnostics.md) experience.
104
+
1. Go back to the **Overview** page. Under the **Investigate** header, select **Browser**, and then select **Performance**. Metrics related to the performance of your website appear. There's a corresponding view for analyzing failures and exceptions in your website. You can select **Samples** to access the [end-to-end transaction details](../../azure-monitor/app/transaction-diagnostics.md).
4. To begin exploring the [user behavior analytics tools](../../azure-monitor/app/usage-overview.md), from the main Application Insights menu select [**Users**](../../azure-monitor/app/usage-segmentation.md) under the **Usage** header. Since we're testing from a single machine, we'll only see data for one user. For a live website, the distribution of users might look as follows:
108
+
1. On the main Application Insights menu, under the **Usage** header, select [**Users**](../../azure-monitor/app/usage-segmentation.md) to begin exploring the [user behavior analytics tools](../../azure-monitor/app/usage-overview.md). Because we're testing from a single machine, we'll only see data for one user. For a live website, the distribution of users might look like this:
5. If we had instrumented a more complex website with multiple pages, another useful tool is [**User Flows**](../../azure-monitor/app/usage-flows.md). With **User Flows** you can track the pathway visitors takes through the various parts of your website.
112
+
1. For a more complex website with multiple pages, you can use the [**User Flows**](../../azure-monitor/app/usage-flows.md) tool to track the pathway that visitors take through the various parts of your website.
To learn more advanced configurations for monitoring websites, check out the [JavaScript SDK API reference](https://github.com/Microsoft/ApplicationInsights-JS/blob/master/API-reference.md).
116
+
To learn more advanced configurations for monitoring websites, see the [JavaScript SDK API reference](https://github.com/Microsoft/ApplicationInsights-JS/blob/master/API-reference.md).
117
117
118
118
## Clean up resources
119
119
120
-
If you plan to continue on to work with additional quickstarts or with the tutorials, don't clean up the resources created in this quickstart. Otherwise, if you don't plan to continue, use the following steps to delete all resources created by this quickstart in the Azure portal.
120
+
If you plan to continue working with additional quickstarts or tutorials, don't clean up the resources created in this quickstart. Otherwise, use the following steps to delete all resources created by this quickstart in the Azure portal.
121
121
122
122
> [!NOTE]
123
-
> If you used an existing resource group the instructions below will not work and you will need to just delete the individual Application Insights resource. Keep in mind anytime you delete a resource group all underyling resources that are members of that group will be deleted.
123
+
> If you used an existing resource group, the following instructions won't work. Instead, you can just delete the individual Application Insights resource. Keep in mind that when you delete a resource group, all underyling resources that are members of that group are deleted too.
124
124
125
-
1. In the left menu in the Azure portal, click **Resource groups**, and then click **myResourceGroup** or the name of your temporary resource group.
126
-
2. On your resource group page, click **Delete**, type **myResourceGroup** in the text box, and then click **Delete**.
125
+
1. On the left menu on the Azure portal, select **Resource groups**, and then select **myResourceGroup** or the name of your temporary resource group.
126
+
1. On your resource group page, select **Delete**, enter **myResourceGroup** in the text box, and then select **Delete**.
0 commit comments