App Insights Duration vs IIS Time-Taken RRS feed

  • Question

  • Hi All,

    I am looking at App Insights logs for a web server and noticed the duration field. This is in seconds or milliseconds?

    Some values are:


    Whereas the IIS logs (with the time-taken field) have values like:


    I need to compare the IIS logs and App Insights logs to see if there are any significant differences in the times. How do I convert these so that they are the same?

    Thanks for your input.

    Friday, May 10, 2019 4:01 PM


  • Hello, Vegas577!

    The top set of values that you see in the duration field are in ms/milliseconds, and you can confirm this by looking at the performancBucket field, which groups into time ranges in milliseconds.  If you look at the Application Insights demo site, you'll typically see demo duration values between 1 and 700 milliseconds.

    The bottom set of values should be milliseconds as well according to the IIS documentation.  It's worth pointing out the following about the time-taken field:


    "When poring over my web log files, I would occasionally come across truly bizarre entries.  I would see a static javascript file that listed as taken 7 seconds.  How could the web server take that long to process a static file?

    Time-taken measures how long it took to process a request, but when does processing start, and when does it end?  Before the web application can actually start to generate a response, it has to receive all of the request headers and form variables from the client.  Then, when the response is generated, it needs to be transmitted back to the client.  The server can only send back data as fast as the client is able to accept it, so there is time spent after the response is generated waiting for transmit to complete.  Only once the client acknowledges that it has all of the data can the connection be closed.

    So, is this time included in the time-taken value?  Unfortunately, the answer is yes."

    Tuesday, May 14, 2019 1:13 AM