Skip to content

Commit 405b975

Browse files
committed
updates
1 parent 0a7eb42 commit 405b975

File tree

5 files changed

+29
-23
lines changed

5 files changed

+29
-23
lines changed
-10 KB
Loading
-9.08 KB
Loading
-16 KB
Loading
-10.2 KB
Loading

articles/azure-monitor/profiler/profiler-vm.md

Lines changed: 29 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Enable Profiler for web apps on an Azure virtual machine
33
description: Profile web apps running on an Azure virtual machine or a virtual machine scale set by using Application Insights Profiler
44
ms.topic: conceptual
5-
ms.date: 06/24/2022
5+
ms.date: 07/15/2022
66
ms.reviewer: jogrima
77
---
88

@@ -93,16 +93,13 @@ You can enable Profiler by any of the following three ways:
9393

9494
1. Deploy your application.
9595

96-
### View Profiler traces
97-
98-
1. After a few minutes, navigate to your Application Insights resource in the Azure portal.
99-
100-
1. Select **Profiler traces** to view the results from deployment.
101-
10296
# [PowerShell](#tab/powershell)
10397

10498
The following PowerShell commands are an approach for existing VMs that touch only the Azure Diagnostics extension.
10599

100+
> [!NOTE]
101+
> If you deploy the VM again, the sink will be lost. You'll need to update the config you use when deploying the VM to preserve this setting.
102+
106103
### Install Application Insights via Azure Diagnostics config
107104

108105
1. Export the currently deployed Azure Diagnostics config to a file:
@@ -153,20 +150,14 @@ If the intended application is running through [IIS](https://www.microsoft.com/w
153150
Enable-WindowsOptionalFeature -FeatureName IIS-HttpTracing -Online -All
154151
```
155152

156-
If establishing remote access is a problem, you can use the [Azure CLI](/cli/azure/get-started-with-azure-cli) to run the following command:
153+
If establishing remote access is a problem, you can use the [Azure CLI](/cli/azure/get-started-with-azure-cli) to run the following command:
157154

158-
```cli
159-
az vm run-command invoke -g MyResourceGroupName -n MyVirtualMachineName --command-id RunPowerShellScript --scripts "Enable-WindowsOptionalFeature -FeatureName IIS-HttpTracing -Online -All"
160-
```
155+
```cli
156+
az vm run-command invoke -g MyResourceGroupName -n MyVirtualMachineName --command-id RunPowerShellScript --scripts "Enable-WindowsOptionalFeature -FeatureName IIS-HttpTracing -Online -All"
157+
```
161158

162159
1. Deploy your application.
163160

164-
### View Profiler traces
165-
166-
1. After a few minutes, navigate to your Application Insights resource in the Azure portal.
167-
168-
1. Select **Profiler traces** to view the results from deployment.
169-
170161
# [Azure Resource Explorer](#tab/azure-resource-explorer)
171162

172163
### Set Profiler sink using Azure Resource Explorer
@@ -182,7 +173,8 @@ Since the Azure portal doesn't provide a way to set the Application Insights Pro
182173

183174
1. Find the VM Diagnostics extension for your VM:
184175
1. Go to [https://resources.azure.com](https://resources.azure.com).
185-
1. Expand your resource group, Microsoft.Compute virtualMachines, virtual machine name, and extensions.
176+
1. Expand **subscriptions** and find the subscription holding the resource group with your VM.
177+
1. Drill down to your VM extensions by selecting your resource group, followed by **Microsoft.Compute** > **virtualMachines** > **<your virtual machine>** > **extensions**.
186178

187179
:::image type="content" source="./media/profiler-vm/azure-resource-explorer.png" alt-text="Navigate to WAD config in Azure Resource Explorer":::
188180

@@ -194,9 +186,23 @@ Since the Azure portal doesn't provide a way to set the Application Insights Pro
194186

195187
:::image type="content" source="./media/profiler-vm/resource-explorer-sinks-config.png" alt-text="Add Application Insights Profiler sink":::
196188

197-
1. When you're done editing the config, press **Put**.
189+
```json
190+
"WadCfg": {
191+
"SinksConfig": {
192+
"Sink": [
193+
{
194+
"name": "MyApplicationInsightsProfilerSink",
195+
"ApplicationInsightsProfiler": "YOUR_APPLICATION_INSIGHTS_INSTRUMENTATION_KEY"
196+
}
197+
]
198+
}
199+
}
200+
```
201+
202+
203+
1. When you're done editing the config, press **PUT**.
198204

199-
1. If the put is successful, a green check will appear in the middle of the screen.
205+
1. If the `put` is successful, a green check will appear in the middle of the screen.
200206

201207
:::image type="content" source="./media/profiler-vm/resource-explorer-put.png" alt-text="Send put request to apply changes":::
202208

@@ -208,6 +214,6 @@ Currently, Application Insights Profiler is not supported for on-premises server
208214

209215
## Next steps
210216

211-
- Generate traffic to your application (for example, launch an [availability test](../app/monitor-web-app-availability.md)). Then, wait 10 to 15 minutes for traces to start to be sent to the Application Insights instance.
212-
- See [Profiler traces](./profiler-overview.md) in the Azure portal.
213-
- For help with troubleshooting Profiler issues, see [Profiler troubleshooting](./profiler-troubleshooting.md).
217+
Learn how to...
218+
> [!div class="nextstepaction"]
219+
> [Generate load and view Profiler traces](./profiler-data.md)

0 commit comments

Comments
 (0)