Skip to content

Commit 00e997e

Browse files
authored
Update create-workspace-resource.md
1 parent e405346 commit 00e997e

File tree

1 file changed

+77
-43
lines changed

1 file changed

+77
-43
lines changed

articles/azure-monitor/app/create-workspace-resource.md

Lines changed: 77 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -9,78 +9,77 @@ ms.custom: devx-track-azurepowershell, devx-track-azurecli
99

1010
# Workspace-based Application Insights resources
1111

12-
Workspace-based resources support full integration between Application Insights and Log Analytics. You can now choose to send your Application Insights telemetry to a common Log Analytics workspace, which allows you full access to all the features of Log Analytics while keeping application, infrastructure, and platform logs in a single consolidated location.
12+
Workspace-based resources support full integration between Application Insights and Log Analytics. Now you can send your Application Insights telemetry to a common Log Analytics workspace. You'll have full access to all the features of Log Analytics, while your application, infrastructure, and platform logs remain in a single consolidated location.
1313

14-
This also allows for common Azure role-based access control (Azure RBAC) across your resources, and eliminates the need for cross-app/workspace queries.
14+
This integration allows for common Azure role-based access control across your resources. It also eliminates the need for cross-app/workspace queries.
1515

1616
> [!NOTE]
17-
> Data ingestion and retention for workspace-based Application Insights resources are billed through the Log Analytics workspace where the data is located. [Learn more](../logs/cost-logs.md) about billing for workspace-based Application Insights resources.
17+
> Data ingestion and retention for workspace-based Application Insights resources are billed through the Log Analytics workspace where the data is located. To learn more about billing for workspace-based Application Insights resources, see [Azure Monitor Logs pricing details](../logs/cost-logs.md).
1818
1919
[!INCLUDE [azure-monitor-log-analytics-rebrand](../../../includes/azure-monitor-instrumentation-key-deprecation.md)]
2020

21-
2221
## New capabilities
2322

24-
Workspace-based Application Insights allows you to take advantage of the latest capabilities of Azure Monitor and Log Analytics including:
23+
With workspace-based Application Insights, you can take advantage of the latest capabilities of Azure Monitor and Log Analytics. For example:
2524

26-
* [Customer-Managed Keys (CMK)](../logs/customer-managed-keys.md) provides encryption at rest for your data with encryption keys to which only you have access.
27-
* [Azure Private Link](../logs/private-link-security.md) allows you to securely link Azure PaaS services to your virtual network using private endpoints.
28-
* [Bring Your Own Storage (BYOS) for Profiler and Snapshot Debugger](./profiler-bring-your-own-storage.md) gives you full control over the encryption-at-rest policy, the lifetime management policy, and network access for all data associated with Application Insights Profiler and Snapshot Debugger.
29-
* [Commitment Tiers](../logs/cost-logs.md#commitment-tiers) enable you to save as much as 30% compared to the Pay-As-You-Go price.
30-
* Faster data ingestion via Log Analytics streaming ingestion.
25+
* [Customer-managed key](../logs/customer-managed-keys.md) provides encryption at rest for your data with encryption keys to which only you have access.
26+
* [Azure Private Link](../logs/private-link-security.md) allows you to securely link Azure platform as a service (PaaS) services to your virtual network by using private endpoints.
27+
* [Bring your own storage (BYOS) for Profiler and Snapshot Debugger](./profiler-bring-your-own-storage.md) gives you full control over the encryption-at-rest policy, the lifetime management policy, and network access for all data associated with Application Insights Profiler and Snapshot Debugger.
28+
* [Commitment tiers](../logs/cost-logs.md#commitment-tiers) enable you to save as much as 30% compared to the pay-as-you-go price.
29+
* Log Analytics streaming ingests data faster.
3130

32-
## Create workspace-based resource
31+
## Create a workspace-based resource
3332

34-
Sign in to the [Azure portal](https://portal.azure.com), and create an Application Insights resource:
33+
Sign in to the [Azure portal](https://portal.azure.com), and create an Application Insights resource.
3534

3635
> [!div class="mx-imgBorder"]
37-
> ![Workspace-based Application Insights resource](./media/create-workspace-resource/create-workspace-based.png)
36+
> ![Screenshot that shows a workspace-based Application Insights resource.](./media/create-workspace-resource/create-workspace-based.png)
3837
39-
If you don't already have an existing Log Analytics Workspace, [consult the Log Analytics workspace creation documentation](../logs/quick-create-workspace.md).
38+
If you don't have an existing Log Analytics workspace, see the [Log Analytics workspace creation documentation](../logs/quick-create-workspace.md).
4039

41-
**Workspace-based resources are currently available in all commercial regions and Azure Government**
40+
*Workspace-based resources are currently available in all commercial regions and Azure Government.*
4241

43-
Once your resource is created, you will see the corresponding workspace info in the **Overview** pane:
42+
After you create your resource, you'll see corresponding workspace information in the **Overview** pane.
4443

45-
![Workspace Name](./media/create-workspace-resource/workspace-name.png)
44+
![Screenshot that shows a workspace name.](./media/create-workspace-resource/workspace-name.png)
4645

47-
Clicking the blue link text will take you to the associated Log Analytics workspace where you can take advantage of the new unified workspace query environment.
46+
Select the blue link text to go to the associated Log Analytics workspace where you can take advantage of the new unified workspace query environment.
4847

4948
> [!NOTE]
50-
> We still provide full backwards compatibility for your Application Insights classic resource queries, workbooks, and log-based alerts within the Application Insights experience. To query/view against the [new workspace-based table structure/schema](convert-classic-resource.md#workspace-based-resource-changes) you must first navigate to your Log Analytics workspace. Selecting **Logs (Analytics)** from within the Application Insights panes will give you access to the classic Application Insights query experience.
49+
> We still provide full backward compatibility for your Application Insights classic resource queries, workbooks, and log-based alerts. To query or view the [new workspace-based table structure or schema](convert-classic-resource.md#workspace-based-resource-changes), you must first go to your Log Analytics workspace. Select **Logs (Analytics)** in the **Application Insights** panes for access to the classic Application Insights query experience.
5150
5251
## Copy the connection string
5352

54-
The [connection string](./sdk-connection-string.md?tabs=net) identifies the resource that you want to associate your telemetry data with. It also allows you to modify the endpoints your resource will use as a destination for your telemetry. You will need to copy the connection string and add it to your application's code or to an environment variable.
53+
The [connection string](./sdk-connection-string.md?tabs=net) identifies the resource that you want to associate your telemetry data with. You can also use it to modify the endpoints your resource will use as a destination for your telemetry. You must copy the connection string and add it to your application's code or to an environment variable.
5554

56-
## Monitoring configuration
55+
## Configure monitoring
5756

58-
Once a workspace-based Application Insights resource has been created, configuring monitoring is relatively straightforward.
57+
After you've created a workspace-based Application Insights resource, you configure monitoring.
5958

6059
### Code-based application monitoring
6160

62-
For code-based application monitoring, you would just install the appropriate Application Insights SDK and point it to the instrumentation key or connection string to your newly created resource.
61+
For code-based application monitoring, you install the appropriate Application Insights SDK and point the instrumentation key or connection string to your newly created resource.
6362

64-
For detailed documentation on setting up an Application Insights SDK for code-based monitoring consult the language/framework specific documentation:
63+
For information on how to set up an Application Insights SDK for code-based monitoring, see the following documentation specific to the language or framework:
6564

6665
- [ASP.NET](./asp-net.md)
6766
- [ASP.NET Core](./asp-net-core.md)
68-
- [Background tasks & modern console applications (.NET/.NET Core)](./worker-service.md)
69-
- [Classic console applications (.NET)](./console.md)
67+
- [Background tasks and modern console applications (.NET/.NET Core)](./worker-service.md)
68+
- [Classic console applications (.NET)](./console.md)
7069
- [Java](./java-in-process-agent.md)
7170
- [JavaScript](./javascript.md)
7271
- [Node.js](./nodejs.md)
7372
- [Python](./opencensus-python.md)
7473

7574
### Codeless monitoring and Visual Studio resource creation
7675

77-
For codeless monitoring of services like Azure Functions and Azure App Services, you will also need to first create your workspace-based Application Insights resource and then point to that resource during the monitoring configuration phase.
76+
For codeless monitoring of services like Azure Functions and Azure App Services, you first create your workspace-based Application Insights resource. Then you point to that resource when you configure monitoring.
7877

79-
While these services offer the option to create a new Application Insights resource within their own resource creation process, resources created via these UI options are currently restricted to the classic Application Insights experience.
78+
These services offer the option to create a new Application Insights resource within their own resource creation process. But resources created via these UI options are currently restricted to the classic Application Insights experience.
8079

81-
The same applies to the Application Insights resource creation experience in Visual Studio for ASP.NET and ASP.NET Core. You must select an existing workspace-based resource from with the Visual Studio monitoring enablement UI. Selecting create new resource from within Visual Studio will limit you to creating a classic Application Insights resource.
80+
The same restriction applies to the Application Insights resource creation experience in Visual Studio for ASP.NET and ASP.NET Core. You must select an existing workspace-based resource in the Visual Studio UI where you enable monitoring. Selecting **Create new resource** in Visual Studio limits you to creating a classic Application Insights resource.
8281

83-
## Creating a resource automatically
82+
## Create a resource automatically
8483

8584
### Azure CLI
8685

@@ -90,9 +89,9 @@ To access the preview Application Insights Azure CLI commands, you first need to
9089
az extension add -n application-insights
9190
```
9291

93-
If you don't run the `az extension add` command, you will see an error message that states: `az : ERROR: az monitor: 'app-insights' is not in the 'az monitor' command group. See 'az monitor --help'.`
92+
If you don't run the `az extension add` command, you'll see an error message that states `az : ERROR: az monitor: 'app-insights' is not in the 'az monitor' command group. See 'az monitor --help'`.
9493

95-
Now you can run the following to create your Application Insights resource:
94+
Now you can run the following code to create your Application Insights resource:
9695

9796
```azurecli
9897
az monitor app-insights component create --app
@@ -113,14 +112,49 @@ az monitor app-insights component create --app
113112
az monitor app-insights component create --app demoApp --location eastus --kind web -g my_resource_group --workspace "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test1234/providers/microsoft.operationalinsights/workspaces/test1234555"
114113
```
115114

116-
For the full Azure CLI documentation for this command, consult the [Azure CLI documentation](/cli/azure/monitor/app-insights/component#az-monitor-app-insights-component-create).
115+
For the full Azure CLI documentation for this command, see the [Azure CLI documentation](/cli/azure/monitor/app-insights/component#az-monitor-app-insights-component-create).
117116

118117
### Azure PowerShell
119118

120-
The `New-AzApplicationInsights` PowerShell command does not currently support creating a workspace-based Application Insights resource. To create a workspace-based resource with PowerShell, you can use the Azure Resource Manager templates below and deploy with PowerShell.
119+
Create a new workspace-based Application Insights resource.
120+
121+
```powershell
122+
New-AzApplicationInsights -Name <String> -ResourceGroupName <String> -Location <String> -WorkspaceResourceId <String>
123+
[-SubscriptionId <String>]
124+
[-ApplicationType <ApplicationType>]
125+
[-DisableIPMasking]
126+
[-DisableLocalAuth]
127+
[-Etag <String>]
128+
[-FlowType <FlowType>]
129+
[-ForceCustomerStorageForProfiler]
130+
[-HockeyAppId <String>]
131+
[-ImmediatePurgeDataOn30Day]
132+
[-IngestionMode <IngestionMode>]
133+
[-Kind <String>]
134+
[-PublicNetworkAccessForIngestion <PublicNetworkAccessType>]
135+
[-PublicNetworkAccessForQuery <PublicNetworkAccessType>]
136+
[-RequestSource <RequestSource>]
137+
[-RetentionInDays <Int32>]
138+
[-SamplingPercentage <Double>]
139+
[-Tag <Hashtable>]
140+
[-DefaultProfile <PSObject>]
141+
[-Confirm]
142+
[-WhatIf]
143+
[<CommonParameters>]
144+
```
145+
146+
#### Example
147+
148+
```powershell
149+
New-AzApplicationInsights -Kind java -ResourceGroupName testgroup -Name test1027 -location eastus -WorkspaceResourceId "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test1234/providers/microsoft.operationalinsights/workspaces/test1234555"
150+
```
151+
152+
For the full PowerShell documentation for this cmdlet, and to learn how to retrieve the instrumentation key, see the [Azure PowerShell documentation](/powershell/module/az.applicationinsights/new-azapplicationinsights).
121153

122154
### Azure Resource Manager templates
123155

156+
To create a workspace-based resource, use the following Azure Resource Manager templates and deploy them with PowerShell.
157+
124158
#### Template file
125159

126160
```json
@@ -167,8 +201,8 @@ The `New-AzApplicationInsights` PowerShell command does not currently support cr
167201
```
168202

169203
> [!NOTE]
170-
> * For more information on resource properties, see [Property values](/azure/templates/microsoft.insights/components?tabs=bicep#property-values)
171-
> * Flow_Type and Request_Source are not used, but are included in this sample for completeness.
204+
> For more information on resource properties, see [Property values](/azure/templates/microsoft.insights/components?tabs=bicep#property-values).
205+
> `Flow_Type` and `Request_Source` aren't used but are included in this sample for completeness.
172206
173207
#### Parameters file
174208

@@ -200,21 +234,21 @@ The `New-AzApplicationInsights` PowerShell command does not currently support cr
200234

201235
```
202236

203-
## Modifying the associated workspace
237+
## Modify the associated workspace
204238

205-
Once a workspace-based Application Insights resource has been created, you can modify the associated Log Analytics Workspace.
239+
After you've created a workspace-based Application Insights resource, you can modify the associated Log Analytics workspace.
206240

207-
From within the Application Insights resource pane, select **Properties** > **Change Workspace** > **Log Analytics Workspaces**
241+
In the Application Insights resource pane, select **Properties** > **Change Workspace** > **Log Analytics Workspaces**.
208242

209243
## Export telemetry
210244

211-
The legacy continuous export functionality is not supported for workspace-based resources. Instead, select **Diagnostic settings** > **add diagnostic setting** from within your Application Insights resource. You can select all tables, or a subset of tables to archive to a storage account, or to stream to an Azure Event Hub.
245+
The legacy continuous export functionality isn't supported for workspace-based resources. Instead, select **Diagnostic settings** > **Add diagnostic setting** in your Application Insights resource. You can select all tables, or a subset of tables, to archive to a storage account. You can also stream to an Azure event hub.
212246

213247
> [!NOTE]
214-
> * Diagnostic settings export may increase costs. ([more information](export-telemetry.md#diagnostic-settings-based-export))
215-
> * Pricing information for this feature will be available on the [Azure Monitor pricing page](https://azure.microsoft.com/pricing/details/monitor/). Prior to the start of billing, notifications will be sent. Should you choose to continue using telemetry export after the notice period, you will be billed at the applicable rate.
248+
> Diagnostic settings export might increase costs. For more information, see [Export telemetry from Application Insights](export-telemetry.md#diagnostic-settings-based-export).
249+
> For pricing information for this feature, see the [Azure Monitor pricing page](https://azure.microsoft.com/pricing/details/monitor/). Prior to the start of billing, notifications will be sent. If you continue to use telemetry export after the notice period, you'll be billed at the applicable rate.
216250
217251
## Next steps
218252

219253
* [Explore metrics](../essentials/metrics-charts.md)
220-
* [Write Analytics queries](../logs/log-query-overview.md)
254+
* [Write Log Analytics queries](../logs/log-query-overview.md)

0 commit comments

Comments
 (0)