In this article, you learn how to run Application Insights Profiler on your Azure virtual machine (VM) or Azure virtual machine scale set via three different methods:
Visual Studio and Azure Resource Manager
PowerShell
Azure Resource Explorer
With any of these methods, you:
Configure the Azure Diagnostics extension to run Profiler.
Install the Application Insights SDK on a VM.
Deploy your application.
View Profiler traces via the Application Insights instance in the Azure portal.
Set-AzVMDiagnosticsExtension might require the -StorageAccountName argument. If your original diagnostics configuration had the storageAccountName property in the protectedSettings section (which isn't downloadable), be sure to pass the same original value you had in this cmdlet call.
IIS Http Tracing feature
If the intended application is running through IIS, enable the IIS Http Tracing Windows feature:
Establish remote access to the environment.
Use the Add Windows features window, or run the following command in PowerShell (as administrator):
Expand subscriptions and find the subscription that holds the resource group with your VM.
Drill down to your VM extensions by selecting your resource group. Then select Microsoft.Compute > virtualMachines > [your virtual machine] > extensions.
Add the Application Insights Profiler sink to the SinksConfig node under WadCfg. If you don't already have a SinksConfig section, you might need to add one. To add the sink:
Specify the proper Application Insights iKey in your settings.
Switch the Explorer mode to Read/Write in the upper-right corner.