Skip to content

Commit f250dfa

Browse files
authored
Merge pull request #244314 from hhunter-ms/hh-59624
[Profiler] Low engagement freshness passes
2 parents 9f84286 + 9603b29 commit f250dfa

File tree

2 files changed

+130
-126
lines changed

2 files changed

+130
-126
lines changed

articles/azure-monitor/profiler/profiler-bring-your-own-storage.md

Lines changed: 120 additions & 116 deletions
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,53 @@
11
---
22
title: Configure BYOS for Profiler and Snapshot Debugger
3-
description: Configure Bring Your Own Storage (BYOS) for Profiler and Snapshot Debugger.
3+
description: Configure Bring Your Own Storage (BYOS) for Azure Application Insights Profiler and Snapshot Debugger.
44
ms.author: hannahhunter
55
author: hhunter-ms
66
ms.reviewer: charles.weininger
77
reviewer: cweining
88
ms.topic: conceptual
9-
ms.date: 08/18/2022
10-
ms.custom: devdivchpfy22, devx-track-azurepowershell
9+
ms.date: 07/07/2023
10+
ms.custom: devdivchpfy22, devx-track-azurepowershell, engagement
1111
---
1212

1313
# Configure BYOS for Application Insights Profiler and Snapshot Debugger
1414

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:
1616

17-
## What is BYOS and why might I need it?
17+
- Processing and analysis.
18+
- Encryption-at-rest and lifetime management policies.
1819

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:
2021

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.
2824

2925
> [!NOTE]
3026
> BYOS is required if you're enabling Azure Private Link or customer-managed keys.
3127
>
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).
4030
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.
4936
5037
## Prerequisites
5138

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.
5541

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
5843

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.
6845

6946
1. Select **Access control (IAM)**.
7047

7148
1. Select **Add** > **Add role assignment** to open the **Add role assignment** page.
7249

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.
7451

7552
| Setting | Value |
7653
| --- | --- |
@@ -80,24 +57,23 @@ First, Application Insights Profiler and Snapshot Debugger must be granted acces
8057

8158
:::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.":::
8259

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.
8461
:::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).
8762

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).
8965
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
9167

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:
9569

96-
#### [PowerShell](#tab/azure-powershell)
70+
- Azure PowerShell cmdlets
71+
- The Azure CLI
72+
- Azure Resource Manager templates
9773

98-
1. Make sure you've installed Az PowerShell 4.2.0 or greater.
74+
#### [PowerShell](#tab/azure-powershell)
9975

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).
10177

10278
1. Install the Application Insights PowerShell extension.
10379

@@ -145,9 +121,7 @@ To configure BYOS for code-level diagnostics (Profiler/Snapshot Debugger), there
145121
146122
#### [Azure CLI](#tab/azure-cli)
147123
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).
151125
152126
1. Install the Application Insights CLI extension.
153127
@@ -234,7 +208,7 @@ To configure BYOS for code-level diagnostics (Profiler/Snapshot Debugger), there
234208
| Parameter | Description |
235209
|-------------------------------|--------------------------------------------------------------------------|
236210
| `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. |
238212
239213
Expected output:
240214
@@ -260,95 +234,125 @@ To configure BYOS for code-level diagnostics (Profiler/Snapshot Debugger), there
260234
DeploymentDebugLogLevel :
261235
```
262236
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**.
264238
265239
:::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.":::
266240
241+
---
242+
267243
## Troubleshooting
268244
269-
This section offers troubleshooting tips for common issues.
245+
This section offers troubleshooting tips for common issues in configuring BYOS.
270246
271-
### Template schema '{schema_uri}' isn't supported
247+
- 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).
272249
273-
* Make sure that the `$schema` property of the template is valid. It must follow this pattern:
274-
`https://schema.management.azure.com/schemas/{schema_version}/deploymentTemplate.json#`.
275-
* Make sure that the `schema_version` of the template is within valid values: `2014-04-01-preview, 2015-01-01, 2018-05-01, 2019-04-01, 2019-08-01`.
276-
277-
Error message:
250+
### Scenario: Template schema '{schema_uri}' isn't supported
278251
279-
```powershell
280-
New-AzResourceGroupDeployment : 11:53:49 AM - Error: Code=InvalidTemplate; Message=Deployment template validation failed: 'Template schema
281-
'https://schema.management.azure.com/schemas/2020-01-01/deploymentTemplate.json#' is not supported. Supported versions are
282-
'2014-04-01-preview,2015-01-01,2018-05-01,2019-04-01,2019-08-01'. Please see https://aka.ms/arm-template for usage details.'.
283-
```
252+
You've received an error similar to the following example:
284253
285-
### No registered resource provider found for location '{location}'
254+
```powershell
255+
New-AzResourceGroupDeployment : 11:53:49 AM - Error: Code=InvalidTemplate; Message=Deployment template validation failed: 'Template schema
256+
'https://schema.management.azure.com/schemas/2020-01-01/deploymentTemplate.json#' is not supported. Supported versions are
257+
'2014-04-01-preview,2015-01-01,2018-05-01,2019-04-01,2019-08-01'. Please see https://aka.ms/arm-template for usage details.'.
258+
```
286259

287-
* Make sure that the `apiVersion` of the resource `microsoft.insights/components` is `2015-05-01`.
288-
* Make sure that the `apiVersion` of the resource `linkedStorageAccount` is `2020-03-01-preview`.
289-
290-
Error message:
291-
292-
```powershell
293-
New-AzResourceGroupDeployment : 6:18:03 PM - Resource microsoft.insights/components 'byos-test-westus2-ai' failed with message '{
294-
"error": {
295-
"code": "NoRegisteredProviderFound",
296-
"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,
298-
canadacentral, centralindia, japaneast, australiaeast, koreacentral, francecentral, centralus, eastus2, eastasia, westus, southafricanorth, northcentralus, brazilsouth, switzerlandnorth,
299-
australiasoutheast'."
300-
}
301-
}'
302-
```
260+
#### Solutions
303261

304-
### Storage account location should match AI component location
262+
- Make sure that the `$schema` property of the template is valid. It must follow this pattern:
263+
```
264+
https://schema.management.azure.com/schemas/{schema_version}/deploymentTemplate.json#
265+
```
305266

306-
* Make sure that the location of the Application Insights resource is the same as the storage account.
267+
- Make sure that the `schema_version` of the template is within valid values: `2014-04-01-preview, 2015-01-01, 2018-05-01, 2019-04-01, 2019-08-01`.
307268

308-
Error message:
309-
310-
```powershell
311-
New-AzResourceGroupDeployment : 1:01:12 PM - Resource microsoft.insights/components/linkedStorageAccounts 'byos-test-centralus-ai/serviceprofiler' failed with message '{
312-
"error": {
313-
"code": "BadRequest",
314-
"message": "Storage account location should match AI component location",
315-
"innererror": {
316-
"trace": [
317-
"System.ArgumentException"
318-
]
319-
}
320-
}
321-
}'
322-
```
323-
324-
For general Profiler troubleshooting, see the [Profiler troubleshooting documentation](profiler-troubleshooting.md).
269+
### Scenario: No registered resource provider found for location '{location}'
270+
271+
You've received an error similar to the following example:
272+
273+
```powershell
274+
New-AzResourceGroupDeployment : 6:18:03 PM - Resource microsoft.insights/components 'byos-test-westus2-ai' failed with message '{
275+
"error": {
276+
"code": "NoRegisteredProviderFound",
277+
"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,
279+
canadacentral, centralindia, japaneast, australiaeast, koreacentral, francecentral, centralus, eastus2, eastasia, westus, southafricanorth, northcentralus, brazilsouth, switzerlandnorth,
280+
australiasoutheast'."
281+
}
282+
}'
283+
```
284+
285+
#### Solutions
286+
287+
- Make sure that the `apiVersion` of the resource `microsoft.insights/components` is `2015-05-01`.
288+
- Make sure that the `apiVersion` of the resource `linkedStorageAccount` is `2020-03-01-preview`.
289+
290+
### Scenario: Storage account location should match Application Insights component location
291+
292+
You've received an error similar to the following example:
293+
294+
```powershell
295+
New-AzResourceGroupDeployment : 1:01:12 PM - Resource microsoft.insights/components/linkedStorageAccounts 'byos-test-centralus-ai/serviceprofiler' failed with message '{
296+
"error": {
297+
"code": "BadRequest",
298+
"message": "Storage account location should match AI component location",
299+
"innererror": {
300+
"trace": [
301+
"System.ArgumentException"
302+
]
303+
}
304+
}
305+
}'
306+
```
325307

326-
For general Snapshot Debugger troubleshooting, see the [Snapshot Debugger troubleshooting documentation](/troubleshoot/azure/azure-monitor/app-insights/snapshot-debugger-troubleshoot).
308+
#### Solution
327309

310+
Make sure that the location of the Application Insights resource is the same as the storage account.
311+
328312
## Frequently asked questions
329313

330-
This section provides answers to common questions.
314+
This section provides answers to common questions about configuring BYOS for Profiler and Snapshot Debugger.
331315

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?
333317

334318
No, it won't.
335319

336-
### Will BYOS work with encryption-at-rest and customer-managed keys?
320+
### Does BYOS work with encryption-at-rest and customer-managed keys?
337321

338322
Yes. To be precise, BYOS is a requirement to have Profiler/Snapshot Debugger enabled with customer-manager keys.
339323

340-
### Will BYOS work in an environment isolated from the internet?
324+
### Does BYOS work in an environment isolated from the internet?
341325

342326
Yes. BYOS is a requirement for isolated network scenarios.
343327

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?
345329

346330
Yes, it's possible.
347331

348332
### If I've enabled BYOS, can I go back to using Diagnostic Services storage accounts to store my collected data?
349333

350334
Yes, you can, but we don't currently support data migration from your BYOS.
351335

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
353356

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

Comments
 (0)