Skip to content

Commit f6c740e

Browse files
committed
freshness pass
Signed-off-by: Hannah Hunter <[email protected]>
1 parent 362011b commit f6c740e

10 files changed

+104
-100
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: 3 additions & 3 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 configure your own storage account (Bring Your Own Storage, or 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.

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

articles/azure-monitor/profiler/profiler.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
---
22
title: Enable Profiler for Azure App Service apps | Microsoft Docs
33
description: Profile live apps on Azure App Service with Application Insights Profiler.
4-
ms.topic: conceptual
4+
ms.topic: how-to
55
ms.date: 08/15/2024
66
ms.reviewer: ryankahng
77
---
88

99
# Enable Profiler for Azure App Service apps
1010

11-
[Application Insights Profiler](./profiler-overview.md) is preinstalled as part of the Azure App Service runtime. You can run Profiler on ASP.NET and ASP.NET Core apps running on App Service by using the Basic service tier or higher. Follow these steps, even if you included the Application Insights SDK in your application at build time.
11+
[Application Insights Profiler](./profiler-overview.md) is preinstalled as part of the Azure App Service runtime. You can run Profiler on ASP.NET and ASP.NET Core apps running on App Service by using the Basic service tier or higher.
1212

1313
Codeless installation of Application Insights Profiler:
1414
- Follows [the .NET Core support policy](https://dotnet.microsoft.com/platform/support/policy/dotnet-core).
@@ -37,7 +37,9 @@ To enable Profiler on Linux, walk through the [ASP.NET Core Azure Linux web apps
3737

3838
## Enable Application Insights and Profiler
3939

40-
The following sections show you how to enable Application Insights for the same subscription or different subscriptions.
40+
You can enable Profiler either when:
41+
- [Your Application Insights resource and App Service resource are in the same subscription](#for-application-insights-and-app-service-in-the-same-subscription), or
42+
- [Your Application Insights resource and App Service resource are in separate subscriptions.](#for-application-insights-and-app-service-in-different-subscriptions)
4143

4244
### For Application Insights and App Service in the same subscription
4345

0 commit comments

Comments
 (0)