-
Notifications
You must be signed in to change notification settings - Fork 8
Closed
Description
I have an existing ASP.NET MVC application targeting .NET 9.0.4. Please update the application to integrate Azure Application Insights using OpenTelemetry and the .NET Profiler.
Requirements:
- Install the latest Azure.Monitor.OpenTelemetry.AspNetCore NuGet package.
- In Program.cs, import the Azure.Monitor.OpenTelemetry.AspNetCore namespace and configure OpenTelemetry with builder.Services.AddOpenTelemetry().UseAzureMonitor();.
- Also install and configure the Microsoft.ApplicationInsights.Profiler.AspNetCore NuGet package to enable the .NET Profiler.
- Add builder.Services.AddApplicationInsightsTelemetry(); and builder.Services.AddServiceProfiler(); to enable telemetry and profiling.
- Ensure the application reads the Application Insights connection string from an environment variable named APPLICATIONINSIGHTS_CONNECTION_STRING.
- Make sure logs and exceptions will go to this application insights instance.
- Ensure compatibility with containerized deployment (e.g., Docker), including profiler support.
- Follow best practices from these Microsoft docs:
Copilot
Metadata
Metadata
Assignees
Labels
No labels