Skip to content

Commit 6397a35

Browse files
Merge pull request #284956 from hhunter-ms/hh-297521
[Profiler] Freshness pass
2 parents 4d1a362 + c441677 commit 6397a35

10 files changed

+113
-109
lines changed

articles/azure-monitor/profiler/profiler-aspnetcore-linux.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Learn how to enable Profiler on your ASP.NET Core web application h
44
ms.topic: how-to
55
ms.devlang: csharp
66
ms.custom: devx-track-csharp, linux-related-content
7-
ms.date: 09/22/2023
7+
ms.date: 08/19/2024
88
ms.reviewer: charles.weininger
99
# Customer Intent: As a .NET developer, I'd like to enable Application Insights Profiler for my .NET web application hosted in Linux
1010
---
@@ -14,9 +14,9 @@ ms.reviewer: charles.weininger
1414
By using Profiler, you can track how much time is spent in each method of your live ASP.NET Core web apps that are hosted in Linux on Azure App Service. This article focuses on web apps hosted in Linux. You can also experiment by using Linux, Windows, and Mac development environments.
1515

1616
In this article, you:
17-
18-
- Set up and deploy an ASP.NET Core web application hosted on Linux.
19-
- Add Application Insights Profiler to the ASP.NET Core web application.
17+
> [!div class="checklist"]
18+
> - Set up and deploy an ASP.NET Core web application hosted on Linux.
19+
> - Add Application Insights Profiler to the ASP.NET Core web application.
2020
2121
## Prerequisites
2222

articles/azure-monitor/profiler/profiler-azure-functions.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
2-
title: Profile Azure Functions app with Application Insights Profiler
2+
title: Enable Profiler for Azure Functions apps
33
description: Enable Application Insights Profiler for Azure Functions app.
44
ms.contributor: charles.weininger
5-
ms.topic: conceptual
6-
ms.date: 09/22/2023
5+
ms.topic: how-to
6+
ms.date: 08/16/2024
77
ms.reviewer: ryankahng
88
---
99

10-
# Profile live Azure Functions app with Application Insights
10+
# Enable Profiler for Azure Functions apps
1111

1212
In this article, you'll use the Azure portal to:
1313
- View the current app settings for your Functions app.
@@ -67,7 +67,7 @@ From your Functions app overview page in the Azure portal:
6767

6868
The app settings now show up in the table:
6969

70-
:::image type="content" source="./media/profiler-azure-functions/app-settings-table.png" alt-text="Screenshot showing the two new app settings in the table on the configuration pane.":::
70+
:::image type="content" source="./media/profiler-azure-functions/app-settings-table.png" alt-text="Screenshot showing the two new app settings in the table on the configuration pane.":::
7171

7272

7373
> [!NOTE]

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

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ ms.author: hannahhunter
55
author: hhunter-ms
66
ms.reviewer: charles.weininger
77
reviewer: cweining
8-
ms.topic: conceptual
9-
ms.date: 09/22/2023
8+
ms.topic: how-to
9+
ms.date: 08/19/2024
1010
ms.custom: devdivchpfy22, devx-track-azurepowershell, engagement
1111
---
1212

@@ -17,7 +17,7 @@ When you use [Application Insights Profiler](./profiler-overview.md) or [Snapsho
1717
- Processing and analysis.
1818
- Encryption-at-rest and lifetime management policies.
1919

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+
Meanwhile, when you "bring your own storage" (BYOS), artifacts are uploaded into a storage account that only you control and cover the cost for:
2121

2222
- The encryption-at-rest policy and the Lifetime management policy.
2323
- Network access.
@@ -36,8 +36,8 @@ In this guide, you learn how to:
3636
3737
## Prerequisites
3838

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.
39+
- Verify you created your storage account in the same location as your Application Insights resource.
40+
- If you enabled [Private Link](../logs/private-link-security.md), allow connection to our Trusted Microsoft Service from your virtual network.
4141

4242
## Grant Diagnostic Services access to your storage account
4343

@@ -55,7 +55,7 @@ A BYOS storage account is linked to an Application Insights resource. Start by g
5555
| Assign access to | User, group, or service principal |
5656
| Members | Diagnostic Services Trusted Storage Access |
5757

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.":::
58+
:::image type="content" source="media/profiler-bring-your-own-storage/add-role-assignment-page.png" alt-text="Screenshot that shows the role assignment page in the Azure portal.":::
5959

6060
Once assigned, you can see the role under the **Role assignments** section.
6161
:::image type="content" source="media/profiler-bring-your-own-storage/figure-11.png" alt-text="Screenshot that shows the IAM screen after Role assignments.":::
@@ -242,14 +242,14 @@ Before you begin, [install the Azure CLI](/cli/azure/install-azure-cli).
242242
243243
## Troubleshooting
244244
245-
This section offers troubleshooting tips for common issues in configuring BYOS.
245+
Troubleshoot common issues in configuring BYOS.
246246
247247
- For general Profiler troubleshooting, see the [Profiler troubleshooting documentation](profiler-troubleshooting.md).
248248
- For general Snapshot Debugger troubleshooting, see the [Snapshot Debugger troubleshooting documentation](/troubleshoot/azure/azure-monitor/app-insights/snapshot-debugger-troubleshoot).
249249
250250
### Scenario: Template schema '{schema_uri}' isn't supported
251251
252-
You've received an error similar to the following example:
252+
You received an error similar to the following example:
253253
254254
```powershell
255255
New-AzResourceGroupDeployment : 11:53:49 AM - Error: Code=InvalidTemplate; Message=Deployment template validation failed: 'Template schema
@@ -268,7 +268,7 @@ New-AzResourceGroupDeployment : 11:53:49 AM - Error: Code=InvalidTemplate; Messa
268268

269269
### Scenario: No registered resource provider found for location '{location}'
270270

271-
You've received an error similar to the following example:
271+
You received an error similar to the following example:
272272

273273
```powershell
274274
New-AzResourceGroupDeployment : 6:18:03 PM - Resource microsoft.insights/components 'byos-test-westus2-ai' failed with message '{
@@ -289,7 +289,7 @@ australiasoutheast'."
289289

290290
### Scenario: Storage account location should match Application Insights component location
291291

292-
You've received an error similar to the following example:
292+
You received an error similar to the following example:
293293

294294
```powershell
295295
New-AzResourceGroupDeployment : 1:01:12 PM - Resource microsoft.insights/components/linkedStorageAccounts 'byos-test-centralus-ai/serviceprofiler' failed with message '{
@@ -313,7 +313,7 @@ Make sure that the location of the Application Insights resource is the same as
313313

314314
This section provides answers to common questions about configuring BYOS for Profiler and Snapshot Debugger.
315315

316-
### If I've enabled Profiler/Snapshot Debugger and BYOS, is my data migrated into my storage account?
316+
### If I enabled Profiler/Snapshot Debugger and BYOS, is my data migrated into my storage account?
317317

318318
No, it won't.
319319

@@ -329,7 +329,7 @@ This section provides answers to common questions about configuring BYOS for Pro
329329

330330
Yes, it's possible.
331331

332-
### If I've enabled BYOS, can I go back to using Diagnostic Services storage accounts to store my collected data?
332+
### If I enabled BYOS, can I go back to using Diagnostic Services storage accounts to store my collected data?
333333

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

articles/azure-monitor/profiler/profiler-cloudservice.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
2-
title: Enable Profiler for Azure Cloud Services | Microsoft Docs
2+
title: Enable Profiler for Azure Cloud Services
33
description: Profile Azure Cloud Services in real time with Application Insights Profiler.
4-
ms.topic: conceptual
4+
ms.topic: how-to
55
ms.custom: engagement
6-
ms.date: 09/22/2023
6+
ms.date: 08/16/2024
77
---
88

99
# Enable Profiler for Azure Cloud Services

articles/azure-monitor/profiler/profiler-containers.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Profile Azure containers with Application Insights Profiler
33
description: Learn how to enable the Application Insights Profiler for your ASP.NET Core application running in Azure containers.
44
ms.contributor: charles.weininger
55
ms.topic: how-to
6-
ms.date: 09/22/2023
6+
ms.date: 08/19/2024
77
ms.reviewer: ryankahng
88
# Customer Intent: As a .NET developer, I'd like to learn how to enable Profiler on my ASP.NET Core application running in my container.
99
---
@@ -17,10 +17,10 @@ You can enable the Application Insights Profiler for ASP.NET Core application ru
1717
- Set up the Application Insights instrumentation key.
1818

1919
In this article, you learn about the various ways that you can:
20-
21-
- Install the NuGet package in the project.
22-
- Set the environment variable via the orchestrator (like Kubernetes).
23-
- Learn security considerations around production deployment, like protecting your Application Insights instrumentation key.
20+
> [!div class="checklist"]
21+
> - Install the NuGet package in the project.
22+
> - Set the environment variable via the orchestrator (like Kubernetes).
23+
> - Learn security considerations around production deployment, like protecting your Application Insights instrumentation key.
2424
2525
## Prerequisites
2626

articles/azure-monitor/profiler/profiler-servicefabric.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
---
22
title: Enable Profiler for Azure Service Fabric applications
33
description: Profile live Azure Service Fabric apps with Application Insights.
4-
ms.topic: conceptual
4+
ms.topic: how-to
55
ms.custom:
6-
ms.date: 09/22/2023
6+
ms.date: 08/16/2024
77
---
88

99
# Enable Profiler for Azure Service Fabric applications
1010

1111
Application Insights Profiler is included with Azure Diagnostics. You can install the Azure Diagnostics extension by using an Azure Resource Manager template (ARM template) for your Azure Service Fabric cluster. Get a [template that installs Azure Diagnostics on a Service Fabric cluster](https://github.com/Azure/azure-docs-json-samples/blob/master/application-insights/ServiceFabricCluster.json).
1212

13-
In this article, you:
14-
15-
- Add the Application Insights Profiler property to your ARM template.
16-
- Deploy your Service Fabric cluster with the Application Insights Profiler instrumentation key.
17-
- Enable Application Insights on your Service Fabric application.
18-
- Redeploy your Service Fabric cluster to enable Profiler.
13+
In this guide, you learn how to:
14+
> [!div class="checklist"]
15+
> - Add the Application Insights Profiler property to your ARM template.
16+
> - Deploy your Service Fabric cluster with the Application Insights Profiler instrumentation key.
17+
> - Enable Application Insights on your Service Fabric application.
18+
> - Redeploy your Service Fabric cluster to enable Profiler.
1919
2020
## Prerequisites
2121

articles/azure-monitor/profiler/profiler-trackrequests.md

Lines changed: 61 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
22
title: Write code to track requests with Application Insights | Microsoft Docs
33
description: Write code to track requests with Application Insights so you can get profiles for your requests.
4-
ms.topic: conceptual
4+
ms.topic: how-to
55
ms.custom: devx-track-csharp
6-
ms.date: 09/22/2023
6+
ms.date: 08/19/2024
77
ms.reviewer: charles.weininger
88
---
99

@@ -15,71 +15,71 @@ For other applications (like Azure Cloud Services worker roles and Azure Service
1515

1616
To manually track requests:
1717

18-
1. Early in the application lifetime, add the following code:
18+
1. Early in the application lifetime, add the following code:
1919

20-
```csharp
21-
using Microsoft.ApplicationInsights.Extensibility;
22-
...
23-
// Replace with your own Application Insights instrumentation key.
24-
TelemetryConfiguration.Active.InstrumentationKey = "00000000-0000-0000-0000-000000000000";
25-
```
20+
```csharp
21+
using Microsoft.ApplicationInsights.Extensibility;
22+
...
23+
// Replace with your own Application Insights instrumentation key.
24+
TelemetryConfiguration.Active.InstrumentationKey = "00000000-0000-0000-0000-000000000000";
25+
```
2626

27-
For more information about this global instrumentation key configuration, see [Use Service Fabric with Application Insights](https://github.com/Azure-Samples/service-fabric-dotnet-getting-started/blob/dev/appinsights/ApplicationInsights.md).
27+
For more information about this global instrumentation key configuration, see [Use Service Fabric with Application Insights](https://github.com/Azure-Samples/service-fabric-dotnet-getting-started/blob/dev/appinsights/ApplicationInsights.md).
2828

29-
1. For any piece of code that you want to instrument, add a `StartOperation<RequestTelemetry>` **using** statement around it, as shown in the following example:
29+
1. For any piece of code that you want to instrument, add a `StartOperation<RequestTelemetry>` **using** statement around it, as shown in the following example:
3030

31-
```csharp
32-
using Microsoft.ApplicationInsights;
33-
using Microsoft.ApplicationInsights.DataContracts;
34-
...
35-
var client = new TelemetryClient();
36-
...
37-
using (var operation = client.StartOperation<RequestTelemetry>("Insert_Your_Custom_Event_Unique_Name"))
38-
{
39-
// ... Code I want to profile.
40-
}
41-
```
31+
```csharp
32+
using Microsoft.ApplicationInsights;
33+
using Microsoft.ApplicationInsights.DataContracts;
34+
...
35+
var client = new TelemetryClient();
36+
...
37+
using (var operation = client.StartOperation<RequestTelemetry>("Insert_Your_Custom_Event_Unique_Name"))
38+
{
39+
// ... Code I want to profile.
40+
}
41+
```
4242

43-
Calling `StartOperation<RequestTelemetry>` within another `StartOperation<RequestTelemetry>` scope isn't supported. You can use `StartOperation<DependencyTelemetry>` in the nested scope instead. For example:
43+
1. Calling `StartOperation<RequestTelemetry>` within another `StartOperation<RequestTelemetry>` scope isn't supported. You can use `StartOperation<DependencyTelemetry>` in the nested scope instead. For example:
4444

45-
```csharp
46-
using (var getDetailsOperation = client.StartOperation<RequestTelemetry>("GetProductDetails"))
47-
{
48-
try
49-
{
50-
ProductDetail details = new ProductDetail() { Id = productId };
51-
getDetailsOperation.Telemetry.Properties["ProductId"] = productId.ToString();
52-
53-
// By using DependencyTelemetry, 'GetProductPrice' is correctly linked as part of the 'GetProductDetails' request.
54-
using (var getPriceOperation = client.StartOperation<DependencyTelemetry>("GetProductPrice"))
55-
{
56-
double price = await _priceDataBase.GetAsync(productId);
57-
if (IsTooCheap(price))
58-
{
59-
throw new PriceTooLowException(productId);
60-
}
61-
details.Price = price;
62-
}
63-
64-
// Similarly, note how 'GetProductReviews' doesn't establish another RequestTelemetry.
65-
using (var getReviewsOperation = client.StartOperation<DependencyTelemetry>("GetProductReviews"))
66-
{
67-
details.Reviews = await _reviewDataBase.GetAsync(productId);
68-
}
69-
70-
getDetailsOperation.Telemetry.Success = true;
71-
return details;
72-
}
73-
catch(Exception ex)
74-
{
75-
getDetailsOperation.Telemetry.Success = false;
76-
77-
// This exception gets linked to the 'GetProductDetails' request telemetry.
78-
client.TrackException(ex);
79-
throw;
80-
}
81-
}
82-
```
45+
```csharp
46+
using (var getDetailsOperation = client.Operation<RequestTelemetry>("GetProductDetails"))
47+
{
48+
try
49+
{
50+
ProductDetail details = new ProductDetail() { Id = productId };
51+
getDetailsOperation.Telemetry.Properties["ProductId"] = productId.ToString();
52+
53+
// By using DependencyTelemetry, 'GetProductPrice' is correctly linked as part of the 'GetProductDetails' request.
54+
using (var getPriceOperation = client.StartOperation<DependencyTelemetry>("GetProductPrice"))
55+
{
56+
double price = await _priceDataBase.GetAsync(productId);
57+
if (IsTooCheap(price))
58+
{
59+
throw new PriceTooLowException(productId);
60+
}
61+
details.Price = price;
62+
}
63+
64+
// Similarly, note how 'GetProductReviews' doesn't establish another RequestTelemetry.
65+
using (var getReviewsOperation = client.StartOperation<DependencyTelemetry>("GetProductReviews"))
66+
{
67+
details.Reviews = await _reviewDataBase.GetAsync(productId);
68+
}
69+
70+
getDetailsOperation.Telemetry.Success = true;
71+
return details;
72+
}
73+
catch(Exception ex)
74+
{
75+
getDetailsOperation.Telemetry.Success = false;
76+
77+
// This exception gets linked to the 'GetProductDetails' request telemetry.
78+
client.TrackException(ex);
79+
throw;
80+
}
81+
}
82+
```
8383

8484
[!INCLUDE [azure-monitor-log-analytics-rebrand](~/reusable-content/ce-skilling/azure/includes/azure-monitor-instrumentation-key-deprecation.md)]
8585

articles/azure-monitor/profiler/profiler-troubleshooting.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Troubleshoot Application Insights Profiler
33
description: Walk through troubleshooting steps and information to enable and use Application Insights Profiler.
44
ms.topic: conceptual
5-
ms.date: 07/10/2023
5+
ms.date: 08/19/2024
66
ms.reviewer: charles.weininger
77
---
88

articles/azure-monitor/profiler/profiler-vm.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
title: Enable Profiler for web apps on an Azure virtual machine
33
description: Profile web apps running on an Azure virtual machine or a virtual machine scale set by using Application Insights Profiler
4-
ms.topic: conceptual
5-
ms.date: 09/22/2023
4+
ms.topic: how-to
5+
ms.date: 08/19/2024
66
ms.reviewer: charles.weininger
77
---
88

@@ -16,12 +16,14 @@ In this article, you learn how to run Application Insights Profiler on your Azur
1616
- PowerShell
1717
- Azure Resource Explorer
1818

19-
With any of these methods, you:
19+
Select your preferred method tab to:
2020

21-
- Configure the Azure Diagnostics extension to run Profiler.
22-
- Install the Application Insights SDK on a VM.
23-
- Deploy your application.
24-
- View Profiler traces via the Application Insights instance in the Azure portal.
21+
In this guide, you learn how to:
22+
> [!div class="checklist"]
23+
> - Configure the Azure Diagnostics extension to run Profiler.
24+
> - Install the Application Insights SDK on a VM.
25+
> - Deploy your application.
26+
> - View Profiler traces via the Application Insights instance in the Azure portal.
2527
2628
## Prerequisites
2729

0 commit comments

Comments
 (0)