Skip to content

Commit 6993981

Browse files
committed
update per saar
Signed-off-by: Hannah Hunter <[email protected]>
1 parent 82c8e25 commit 6993981

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

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

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ In this guide, you'll:
2222

2323
- Install the [latest and greatest .NET Core SDK](https://dotnet.microsoft.com/download/dotnet).
2424
- Install Git by following the instructions at [Getting Started - Installing Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git).
25+
- Review the following samples for context:
26+
- [Enable Service Profiler for containerized ASP.NET Core Application (.NET 6)](https://github.com/microsoft/ApplicationInsights-Profiler-AspNetCore/tree/main/examples/EnableServiceProfilerForContainerAppNet6)
27+
- [Application Insights Profiler for Worker Service Example](https://github.com/microsoft/ApplicationInsights-Profiler-AspNetCore/tree/main/examples/ServiceProfilerInWorkerNet6)
2528

2629
## Set up the project locally
2730

@@ -41,22 +44,17 @@ In this guide, you'll:
4144
dotnet add package Microsoft.ApplicationInsights.Profiler.AspNetCore
4245
```
4346

44-
1. In your preferred code editor, enable Application Insights and Profiler in `Program.cs` for `WebAPI`:
47+
1. In your preferred code editor, enable Application Insights and Profiler in `Program.cs` for the `WebAPI` class. [Add custom Profiler settings, if applicable](https://github.com/microsoft/ApplicationInsights-Profiler-AspNetCore/blob/main/Configurations.md).
4548

4649
```csharp
4750
// Add services to the container.
4851
builder.Services.AddApplicationInsightsTelemetry();
49-
builder.Services.AddServiceProfiler(profilerSettings =>
50-
{
51-
profilerSettings.Duration = TimeSpan.FromMinutes(1);
52-
});
52+
builder.Services.AddServiceProfiler();
5353
```
5454

55-
You can also enable Application Insights and Profiler for `Worker`. Update the `Program.cs` file for the `Worker` with the following:
55+
1. **Optional:** You can also enable Application Insights and Profiler by [creating and configuring a `Worker` class](https://github.com/microsoft/ApplicationInsights-Profiler-AspNetCore/blob/main/examples/ServiceProfilerInWorkerNet6/Worker.cs). If you do use a `Worker` class, [add code like the following to your project's `Program.cs`](https://github.com/microsoft/ApplicationInsights-Profiler-AspNetCore/blob/main/examples/ServiceProfilerInWorkerNet6/Program.cs):
5656
5757
```csharp
58-
using ServiceProfilerInWorkerNet6;
59-
6058
IHost host = Host.CreateDefaultBuilder(args)
6159
.ConfigureServices(services =>
6260
{

0 commit comments

Comments
 (0)