Search code examples
asp.netazureiisinstrumentationweb-performance

Log Azure / IIS based website response time on the server side


I want to log the time it takes my website to respond to requests from the moment that the request is received to the moment that the request is served. Is there a built-in log mechanism (IIS logs, ETW provider or other) that already instruments this time? If not how can I do it, so that I can measure the time it took for each different URL?

For example

http://mysite/action1.aspx   500ms
http://mysite/action2.aspx   1500ms
http://mysite/action3.aspx   1000ms
http://mysite/action1.aspx   450ms
etc...

I am not interested in the time it takes to reach the client due to bandwidth, network latency or other factors. I am just interested in the time the server spent serving that request.


Solution

  • I believe the IIS logs contain a "Time-Taken" column. You can access the raw logs by visiting the KUDU interface (https://yourwebsitename.scm.azurewebsites.net) and clicking on debug powershell, then navigating to the RawLogs folder.