Presently sponsored by: ScriptRunner - Get your free PowerShell Cheat Sheet!
Recently, Microsoft introduced a new option when creating Application Insight instances. A selection to help us choose between the Classic approach, or the modern Workspace-based mode.
In the Azure Portal, it can look like this when we create a new Application Insights today:
If you have Application Insights instances that were created some time ago, you may want to upgrade to Workspace-based mode at some point.
Note: Classic Application Insights will be retired on in February 2024, which indicates that using Workspace-based Application Insights is the way forward.
Based on the docs, this comes with enhanced new capabilities:
- Customer Managed Keys. You can encrypt all data with encryption keys that you have access to.
- Private Link support.
- Capacity Reservation tiers help save on cost.
- Faster data ingestion with Log Analytics streaming ingestion.
Read more about the new capabilities in Microsoft Docs.
A recent use case for me, for example, is to run cross-resource queries. This means I can request data from many App Insights resources from a single query. For Application Insights to support cross-resource queries, we need to be on the latest incarnation of the service.
Since the Workspace-based approach is targeting a Log Analytics Workspace, we get all the querying power from that. I like.
Migrate to Workspace-based resource mode
NOTE! Before you do this, please be advised that this is a one-way trip. You cannot revert this change.
Please also read the changes in schemas, which is important if you have a lot of queries depending on your App Insights.
Read: App Insights and Log Analytics Schema Differences
In the Azure Portal, this is fairly straight forward. Navigate to your Application Insights - Properties -> Switch to Workspace-based:
This presents you with the option to select your Log Analytics Workspace (hence the Resource Mode name "Workspace-based").
With that, we can easily migrate a single App Insights to the Workspace-based resource mode. Great success.
We can see the new workspace, and if we want, we can change it later.
If you, like me, have a lot of resources to manage and maintain - there are more ways to migrate to the Workspace-based mode.
Read more about how to do it from the API's below.