Parse the .diagsession produced by the Azure profiler?

emilio incerto 0 Reputation points
2023-08-30T13:26:36.59+00:00

Dear all, I have a .Net web application hosted on Azure with the Azure profiler enabled. I can see the collected traces on the Azure web portal, but I would like to download and parse them for doing some analysis.

I noticed that a trace can be downloaded in a .diagsession file, but I can't figure out how I can analyze this file. I tried with Visual Studio community edition but without success. I have also tried to unzip the file and work on the individual .etl file with Microsoft WPA, but I get a trace that is different from what the Azure web portal shows. How can I parse the .diagsession file for creating a call tree similar to what is reported on the Azure portal?

Azure Static Web Apps
Azure Static Web Apps
An Azure service that provides streamlined full-stack web app development.
1,181 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. brtrach-MSFT 17,741 Reputation points Microsoft Employee Moderator
    2023-09-01T02:25:40.0433333+00:00

    @emilio incerto To parse the .diagsession file produced by the Azure profiler, you can use the PerfView tool. PerfView is a performance analysis tool that can be used to analyze .NET applications. You can download PerfView from the Microsoft Download Center.

    Once you have downloaded PerfView, you can use it to open the .diagsession file. To do this, launch PerfView and select "Open" from the "File" menu. In the "Open" dialog box, select the .diagsession file that you want to analyze.

    PerfView will then load the .diagsession file and display the profiling data in a tree view. You can use the tree view to navigate the profiling data and identify performance bottlenecks in your application.

    If you want to create a call tree similar to what is reported on the Azure portal, you can use the "Call Tree" view in PerfView. The "Call Tree" view displays a hierarchical view of the call stack for each method in your application. You can use this view to identify the methods that are taking the most time in your application.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.