You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Configure BYOS for Application Insights Profiler and Snapshot Debugger
14
14
15
-
This article shows you how to configure Bring Your Own Storage (BYOS) for Application Insights Profiler and Snapshot Debugger.
15
+
When you use [Application Insights Profiler](./profiler-overview.md) or [Snapshot Debugger](../snapshot-debugger/snapshot-debugger.md), artifacts generated by your application are uploaded by default into Azure Storage accounts over the public internet. For these artifacts and storage accounts, Microsoft controls and covers the cost for:
16
16
17
-
## What is BYOS and why might I need it?
17
+
- Processing and analysis.
18
+
- Encryption-at-rest and lifetime management policies.
18
19
19
-
When you use Application Insights Profiler or Snapshot Debugger, artifacts generated by your application are uploaded into Azure Storage accounts over the public internet. For these artifacts and storage accounts, Microsoft controls and covers the cost for:
20
+
Meanwhile, when you configure your own storage account (BYOS), artifacts are uploaded into a storage account that only you control and cover the cost for:
20
21
21
-
* Processing and analysis.
22
-
* Encryption-at-rest and lifetime management policies.
23
-
24
-
When you configure BYOS, artifacts are uploaded into a storage account that you control. That means you control and are responsible for the cost of:
25
-
26
-
* The encryption-at-rest policy and the Lifetime management policy.
27
-
* Network access.
22
+
- The encryption-at-rest policy and the Lifetime management policy.
23
+
- Network access.
28
24
29
25
> [!NOTE]
30
26
> BYOS is required if you're enabling Azure Private Link or customer-managed keys.
31
27
>
32
-
> *[Learn more about Private Link for Application Insights](../logs/private-link-security.md).
33
-
> *[Learn more about customer-managed keys for Application Insights](../logs/customer-managed-keys.md).
34
-
35
-
## How is my storage account accessed?
36
-
37
-
1. Agents running in your virtual machines or Azure App Service upload artifacts (profiles, snapshots, and symbols) to blob containers in your account.
38
-
39
-
This process involves contacting Profiler or Snapshot Debugger to obtain a shared access signature token to a new blob in your storage account.
28
+
> -[Learn more about Private Link for Application Insights](../logs/private-link-security.md).
29
+
> -[Learn more about customer-managed keys for Application Insights](../logs/customer-managed-keys.md).
40
30
41
-
1. Profiler or Snapshot Debugger will:
42
-
43
-
- Analyze the incoming blob.
44
-
- Write back the analysis results and log files into blob storage.
45
-
46
-
Depending on available compute capacity, this process might occur anytime after upload.
47
-
48
-
1. When you view Profiler traces or Snapshot Debugger analysis, the service fetches the analysis results from blob storage.
31
+
In this guide, you learn how to:
32
+
> [!div class="checklist"]
33
+
> - Grant Diagnostic Services access to your storage account.
34
+
> - Link your storage account with your Application Insights resource.
35
+
> - Learn how your storage account is accessed.
49
36
50
37
## Prerequisites
51
38
52
-
* Create your storage account in the same location as your Application Insights resource.
53
-
54
-
For example, if your Application Insights resource is in West US 2, your storage account must also be in West US 2.
39
+
- Verify you've created your storage account in the same location as your Application Insights resource.
40
+
- If you've enabled [Private Link](../logs/private-link-security.md), allow connection to our Trusted Microsoft Service from your virtual network.
55
41
56
-
* Grant the `Storage Blob Data Contributor` role to the Azure Active Directory (Azure AD) application named `Diagnostic Services Trusted Storage Access` via the [Access Control (IAM)](../../role-based-access-control/role-assignments-portal.md) page in your storage account.
57
-
* If Private Link is enabled, allow connection to our Trusted Microsoft Service from your virtual network.
42
+
## Grant Diagnostic Services access to your storage account
58
43
59
-
## Enable BYOS
60
-
61
-
This section shows you how to enable BYOS.
62
-
63
-
### Grant access to Diagnostic Services to your storage account
64
-
65
-
A BYOS storage account is linked to an Application Insights resource. There might be only one storage account per Application Insights resource and both must be in the same location. You might use the same storage account with more than one Application Insights resource.
66
-
67
-
First, Application Insights Profiler and Snapshot Debugger must be granted access to the storage account. To grant access, add the role `Storage Blob Data Contributor` to the Azure AD application named `Diagnostic Services Trusted Storage Access` via the **Access Control (IAM)** page in your storage account.
44
+
A BYOS storage account is linked to an Application Insights resource. Start by granting the `Storage Blob Data Contributor` role to the Azure Active Directory (Azure AD) application named `Diagnostic Services Trusted Storage Access` via the [Access Control (IAM)](../../role-based-access-control/role-assignments-portal.md) page in your storage account.
68
45
69
46
1. Select **Access control (IAM)**.
70
47
71
48
1. Select **Add** > **Add role assignment** to open the **Add role assignment** page.
72
49
73
-
1. Assign the following role. For more information, see [Assign Azure roles by using the Azure portal](../../role-based-access-control/role-assignments-portal.md).
50
+
1. Assign the following role.
74
51
75
52
| Setting | Value |
76
53
| --- | --- |
@@ -80,24 +57,23 @@ First, Application Insights Profiler and Snapshot Debugger must be granted acces
80
57
81
58
:::image type="content" source="media/profiler-bring-your-own-storage/add-role-assignment-page.png" alt-text="Screenshot that shows the Add role assignment page in the Azure portal.":::
82
59
83
-
After you add the role, it appears under the **Role assignments** section.
60
+
Once assigned, you can see the role under the **Role assignments** section.
84
61
:::image type="content" source="media/profiler-bring-your-own-storage/figure-11.png" alt-text="Screenshot that shows the IAM screen after Role assignments.":::
85
-
86
-
If you're also using Private Link, one more configuration is required to allow connection to our Trusted Microsoft Service from your virtual network. For more information, see [Storage network security documentation](../../storage/common/storage-network-security.md#trusted-microsoft-services).
87
62
88
-
### Link your storage account with your Application Insights resource
63
+
> [!NOTE]
64
+
> If you're also using Private Link, one more configuration is required to allow connection to our Trusted Microsoft Service from your virtual network. For more information, see [Storage network security documentation](../../storage/common/storage-network-security.md#trusted-microsoft-services).
89
65
90
-
To configure BYOS for code-level diagnostics (Profiler/Snapshot Debugger), there are three options:
66
+
## Link your storage account with your Application Insights resource
91
67
92
-
* Use Azure PowerShell cmdlets.
93
-
* Use the Azure CLI.
94
-
* Use Azure Resource Manager templates.
68
+
You have three options for configuring BYOS for code-level diagnostics like Profiler and Snapshot Debugger:
95
69
96
-
#### [PowerShell](#tab/azure-powershell)
70
+
- Azure PowerShell cmdlets
71
+
- The Azure CLI
72
+
- Azure Resource Manager templates
97
73
98
-
1. Make sure you've installed Az PowerShell 4.2.0 or greater.
74
+
#### [PowerShell](#tab/azure-powershell)
99
75
100
-
To install Azure PowerShell, see the [Azure PowerShell documentation](/powershell/azure/install-azure-powershell).
76
+
Before you begin, [install Azure PowerShell 4.2.0 or greater](/powershell/azure/install-azure-powershell).
101
77
102
78
1. Install the Application Insights PowerShell extension.
103
79
@@ -145,9 +121,7 @@ To configure BYOS for code-level diagnostics (Profiler/Snapshot Debugger), there
145
121
146
122
#### [Azure CLI](#tab/azure-cli)
147
123
148
-
1. Make sure you've installed the Azure CLI.
149
-
150
-
To install the Azure CLI, see the [Azure CLI documentation](/cli/azure/install-azure-cli).
124
+
Before you begin, [install the Azure CLI](/cli/azure/install-azure-cli).
151
125
152
126
1. Install the Application Insights CLI extension.
153
127
@@ -234,7 +208,7 @@ To configure BYOS for code-level diagnostics (Profiler/Snapshot Debugger), there
| `application_insights_name` | The name of the Application Insights resource to enable BYOS. |
237
-
| `storage_account_name` | The name of the storage account resource that you'll use as your BYOS. |
211
+
| `storage_account_name` | The name of the storage account resource that you use as your BYOS. |
238
212
239
213
Expected output:
240
214
@@ -260,95 +234,125 @@ To configure BYOS for code-level diagnostics (Profiler/Snapshot Debugger), there
260
234
DeploymentDebugLogLevel :
261
235
```
262
236
263
-
1. Enable code-level diagnostics (Profiler/Snapshot Debugger) on the workload of interest through the Azure portal. In this example, it's **App Service** > **Application Insights**.
237
+
1. Enable Profiler or Snapshot Debugger on the workload of interest through the Azure portal. In this example, it's **App Service** > **Application Insights**.
264
238
265
239
:::image type="content" source="media/profiler-bring-your-own-storage/figure-20.png" alt-text="Screenshot that shows the code-level diagnostics in the Azure portal.":::
266
240
241
+
---
242
+
267
243
## Troubleshooting
268
244
269
-
This section offers troubleshooting tips for common issues.
245
+
This section offers troubleshooting tips for common issues in configuring BYOS.
- For general Profiler troubleshooting, see the [Profiler troubleshooting documentation](profiler-troubleshooting.md).
248
+
- For general Snapshot Debugger troubleshooting, see the [Snapshot Debugger troubleshooting documentation](/troubleshoot/azure/azure-monitor/app-insights/snapshot-debugger-troubleshoot).
272
249
273
-
* Make sure that the `$schema` property of the template is valid. It must follow this pattern:
"message": "No registered resource provider found for location 'westus2' and API version '2020-03-01-preview' for type 'components'. The supported api-versions are '2014-04-01,
297
-
2014-08-01, 2014-12-01-preview, 2015-05-01, 2018-05-01-preview'. The supported locations are ', eastus, southcentralus, northeurope, westeurope, southeastasia, westus2, uksouth,
"message": "No registered resource provider found for location 'westus2' and API version '2020-03-01-preview' for type 'components'. The supported api-versions are '2014-04-01,
278
+
2014-08-01, 2014-12-01-preview, 2015-05-01, 2018-05-01-preview'. The supported locations are ', eastus, southcentralus, northeurope, westeurope, southeastasia, westus2, uksouth,
"message": "Storage account location should match AI component location",
299
+
"innererror": {
300
+
"trace": [
301
+
"System.ArgumentException"
302
+
]
303
+
}
304
+
}
305
+
}'
306
+
```
325
307
326
-
For general Snapshot Debugger troubleshooting, see the [Snapshot Debugger troubleshooting documentation](/troubleshoot/azure/azure-monitor/app-insights/snapshot-debugger-troubleshoot).
308
+
#### Solution
327
309
310
+
Make sure that the location of the Application Insights resource is the same as the storage account.
311
+
328
312
## Frequently asked questions
329
313
330
-
This section provides answers to common questions.
314
+
This section provides answers to common questions about configuring BYOS for Profiler and Snapshot Debugger.
331
315
332
-
### If I've enabled Profiler/Snapshot Debugger and BYOS, will my data be migrated into my storage account?
316
+
### If I've enabled Profiler/Snapshot Debugger and BYOS, is my data migrated into my storage account?
333
317
334
318
No, it won't.
335
319
336
-
### Will BYOS work with encryption-at-rest and customer-managed keys?
320
+
### Does BYOS work with encryption-at-rest and customer-managed keys?
337
321
338
322
Yes. To be precise, BYOS is a requirement to have Profiler/Snapshot Debugger enabled with customer-manager keys.
339
323
340
-
### Will BYOS work in an environment isolated from the internet?
324
+
### Does BYOS work in an environment isolated from the internet?
341
325
342
326
Yes. BYOS is a requirement for isolated network scenarios.
343
327
344
-
### Will BYOS work with both customer-managed keys and Private Link enabled?
328
+
### Does BYOS work with both customer-managed keys and Private Link enabled?
345
329
346
330
Yes, it's possible.
347
331
348
332
### If I've enabled BYOS, can I go back to using Diagnostic Services storage accounts to store my collected data?
349
333
350
334
Yes, you can, but we don't currently support data migration from your BYOS.
351
335
352
-
### After I enable BYOS, will I take over all the related costs of storage and networking?
336
+
### After I enable BYOS, do I take over all the related costs of storage and networking?
337
+
338
+
Yes.
339
+
340
+
### How is my storage account accessed?
341
+
342
+
1. Agents running in your virtual machines or Azure App Service upload artifacts (profiles, snapshots, and symbols) to blob containers in your account.
343
+
344
+
This process involves contacting Profiler or Snapshot Debugger to obtain a shared access signature token to a new blob in your storage account.
345
+
346
+
1. Profiler or Snapshot Debugger:
347
+
348
+
- Analyzes the incoming blob.
349
+
- Write back the analysis results and log files into blob storage.
350
+
351
+
Depending on available compute capacity, this process might occur anytime after upload.
352
+
353
+
1. When you view Profiler traces or Snapshot Debugger analysis, the service fetches the analysis results from blob storage.
354
+
355
+
## Next steps
353
356
354
-
Yes.
357
+
-[Learn more about Application Insights Profiler](./profiler-overview.md)
358
+
-[Learn more about Snapshot Debugger](../snapshot-debugger/snapshot-debugger.md)
0 commit comments