DEV Community

Tobias Zimmergren
Tobias Zimmergren

Posted on • Originally published at zimmergren.net on

Upgrade Application Insights to Workspace-based Resource Mode from Classic

Upgrade Application Insights to Workspace-based Resource Mode from Classic

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:

Upgrade Application Insights to Workspace-based Resource Mode from Classic
Select the Resource Mode of Application insights when you create a new Application Insights.

If you have Application Insights instances that were created some time ago, you may want to upgrade to Workspace-based mode at some point.

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:

Upgrade Application Insights to Workspace-based Resource Mode from Classic
Switching Application Insights to workspace-based mode.

This presents you with the option to select your Log Analytics Workspace (hence the Resource Mode name "Workspace-based").

Upgrade Application Insights to Workspace-based Resource Mode from Classic
Migrate App Insights to a Log Analytics Workspace in the Workspace-based resource mode.

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.

Upgrade Application Insights to Workspace-based Resource Mode from Classic
Application Insights workspace-based resource mode. Changing the workspace.

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.

Top comments (0)