Enable Change Analysis
Important
Change Analysis is moving to Azure Resource Graph and is currently in preview as an Azure Resource Graph offering. Learn more about the future of Change Analysis.
The Change Analysis service:
- Computes and aggregates change data from the data sources mentioned earlier.
- Provides a set of analytics for users to:
- Easily navigate through all resource changes.
- Identify relevant changes in the troubleshooting or monitoring context.
Register the Microsoft.ChangeAnalysis
resource provider with an Azure Resource Manager subscription to make the resource properties and configuration change data available. The Microsoft.ChangeAnalysis
resource provider is automatically registered as you either:
- Enter any UI entry point, like the Web App Diagnose and Solve Problems tool, or
- Bring up the Change Analysis standalone tab.
In this guide, you learn the two ways to enable Change Analysis for Azure Functions and web app in-guest changes:
- For one or a few Azure Functions or web apps, enable Change Analysis via the UI.
- For a large number of web apps (for example, 50+ web apps), enable Change Analysis using the provided PowerShell script.
Note
Slot-level enablement for Azure Functions or web app is not supported at the moment.
Enable Azure Functions and web app in-guest change collection via the Change Analysis portal
For web app in-guest changes, separate enablement is required for scanning code files within a web app. For more information, see Change Analysis in the Diagnose and solve problems tool section.
Note
You may not immediately see web app in-guest file changes and configuration changes. Prepare for downtime and restart your web app to view changes within 30 minutes. If you still can't see changes, refer to the troubleshooting guide.
Navigate to Azure Monitor's Change Analysis UI in the portal.
Enable web app in-guest change tracking by either:
Selecting Enable Now in the banner, or
Selecting Configure from the top menu.
Toggle on Change Analysis status and select Save.
The tool displays all web apps under an App Service plan, which you can toggle on and off individually.
Enable Change Analysis at scale using PowerShell
If your subscription includes several web apps, run the following script to enable all web apps in your subscription.
Prerequisites
PowerShell Az Module. Follow instructions at Install the Azure PowerShell module
Run the following script:
# Log in to your Azure subscription
Connect-AzAccount
# Get subscription Id
$SubscriptionId = Read-Host -Prompt 'Input your subscription Id'
# Make Feature Flag visible to the subscription
Set-AzContext -SubscriptionId $SubscriptionId
# Register resource provider
Register-AzResourceProvider -ProviderNamespace "Microsoft.ChangeAnalysis"
# Enable each web app
$webapp_list = Get-AzWebApp | Where-Object {$_.kind -eq 'app'}
foreach ($webapp in $webapp_list)
{
$tags = $webapp.Tags
$tags["hidden-related:diagnostics/changeAnalysisScanEnabled"]=$true
Set-AzResource -ResourceId $webapp.Id -Tag $tags -Force
}
Frequently asked questions
This section provides answers to common questions.
How can I enable Change Analysis for a web application?
Enable Change Analysis for web application in guest changes by using the Diagnose and solve problems tool.
Next steps
- Learn about visualizations in Change Analysis
- Learn how to troubleshoot problems in Change Analysis
- Enable Application Insights for Azure web apps.
- Enable Application Insights for Azure VM and Azure virtual machine scale set IIS-hosted apps.