Welcome to the Profiling Agent Selection Guide! Profiling is an essential step in optimizing your application’s performance. This document will help you choose the best profiler agent based on your needs, environment, and specific use case.
There are 2 major profiling technologies we supported: ETW and EventPipe. ETW works only on Windows. EventPipe works wherever .NET runtime
exists.
A rule of thumb is that if you are targeting .NET Framework, use ETW profiler. If you are targeting .NET, use EventPipe.
Of course, it's not one size fit for all. There are more to consider, please find more details below.
If you are targeting .NET Framework, you will have to use ETW profiler. It can be turned on for the following Azure services. Click on the links to learn more about turning it on:
- Azure App Service
- Azure Function
- Azure Cloud Service
- Azure Service Fabric Apps
- Azure Virtual Machines and Azure Virtual Machine Scale Set
There's no code change needed for your application. The profiler runs out of proc, and the trace file is heavier.
If you are targeting .NET, .NET 8 for example, you can still choose to use ETW profiler for the environments listed above, or you can choose to use EventPipe Profiler too.
If you are planning to host your applications in Linux, or run your application inside containers, use EventPipe Profiler. Some well known host platforms like:
There are 2 flavors of the EventPipe profilers, it depends on the Application Insights SDKs you pick.
-
If you are using Azure Monitor OpenTelemetry distribution, follow the instructions to use Azure Monitor OpenTelemetry Profiler.
-
If you are using the traditional Application Insights for ASP.NET Core applications, follow the instructions to use Application Insights Profiler for ASP.NET Core
You will need to add reference to NuGet packages and redeploy your application for those Profiler Agents to work. These profiler agents runs in-proc with your application, and are lightweight.
Feel free to file an issue if you still have questions on which profiler agent to pick.