Capture and review .Net Profiler Traces on App Service (Windows)

  • Thread starter Thread starter Kunal_KV
  • Start date Start date
K

Kunal_KV

This blog emphasizes the process of gathering profiler traces for application hosted on App Service that is experiencing slowness. It also provides guidance on how to review these collected traces to pinpoint the root cause and take steps towards resolving it.



  • Access the Azure Portal and navigate to the desired App Service.
  • Navigate to "Diagnose and Solve Problems" -> "Diagnostic Tools"

large?v=v2&px=999.png



  • Choose "Collect .NET Profiler Trace" option.
  • Configure the trace options to gather data from the specific application instance, including thread details.

large?v=v2&px=999.png



  • Reproduce the issue at step 2.

medium?v=v2&px=400.png



  • Access and examine the generated report.

large?v=v2&px=999.png



  • In the demo application, a delay of approximately 20 seconds was observed. Refer to the browser network traces provided below.

large?v=v2&px=999.png



  • Analyze the profiler traces to pinpoint the cause of the reported delay.

large?v=v2&px=999.png



  • After examining the demo app's code, it was evident that a deliberate 20-second delay was introduced in the Privacy method within the Home Controller.

medium?v=v2&px=400.png



  • Note: Default profiler log collection time is 60 seconds and it is possible to increase the default profiling duration by setting an application setting IIS_PROFILING_TIMEOUT_IN_SECONDS with a maximum value of 900 (i.e. 15 minutes).

Continue reading...
 
Back
Top