Skip to content

Commit 9059630

Browse files
committed
revert and simplify
Signed-off-by: Hannah Hunter <[email protected]>
1 parent 6993981 commit 9059630

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,17 @@ In this guide, you'll:
4444
dotnet add package Microsoft.ApplicationInsights.Profiler.AspNetCore
4545
```
4646

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).
47+
1. In your preferred code editor, enable Application Insights and Profiler in `Program.cs`. [Add custom Profiler settings, if applicable](https://github.com/microsoft/ApplicationInsights-Profiler-AspNetCore/blob/main/Configurations.md).
48+
49+
For `WebAPI`:
4850

4951
```csharp
5052
// Add services to the container.
5153
builder.Services.AddApplicationInsightsTelemetry();
5254
builder.Services.AddServiceProfiler();
5355
```
5456

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):
57+
For `Worker`:
5658

5759
```csharp
5860
IHost host = Host.CreateDefaultBuilder(args)
@@ -68,7 +70,6 @@ In this guide, you'll:
6870
await host.RunAsync();
6971
```
7072

71-
7273
1. Save and commit your changes to the local repository:
7374

7475
```console

0 commit comments

Comments
 (0)