Question about the contents of the requests table in the Application Insights log query

Dewa Tsukasa 20 Reputation points
2024-11-25T06:59:27.61+00:00

There are two types of columns in the requests table: the contents of the duration column and FunctionExecutionTimeMs in the customDimensions column. I would like to know what the difference between these two is.

I am transferring the execution logs of Azure Functions to Log Analytics and analyzing them with the Application Insights log query, but there are some things in the requests table to which I cannot understand the difference.

The first is the duration column, and the second is FunctionExecutionTimeMs in the customDimensions column.

The timeout is set to 20 seconds, so the server responds with FunctionExecutionTimeMs, but when I read the duration, it records a time that exceeds 20 seconds, and the standard graph is constructed based on the Server Response Time metric based on this duration time. I am not sure about the difference between these two, so I am posting a question.

I apologize for the inconvenience, but could you please tell me?

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
3,341 questions
Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,162 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Pinaki Ghatak 4,840 Reputation points Microsoft Employee
    2024-11-25T10:50:09.7766667+00:00

    Hello @Dewa Tsukasa

    The duration column in the requests table represents the total time taken for the request to complete, including the time taken by the server to process the request and the time taken by the client to receive the response.

    On the other hand, FunctionExecutionTimeMs in the customDimensions column represents the time taken by the Azure Function to execute the code and generate the response.

    The duration column is a standard metric that is used to measure the overall performance of the application, while FunctionExecutionTimeMs is a custom metric that is specific to Azure Functions. In your case, it seems that the duration column is recording a time that exceeds the timeout of 20 seconds, which means that the request is taking longer than expected to complete.

    This could be due to various reasons such as network latency, server load, or inefficient code. On the other hand, FunctionExecutionTimeMs is recording the time taken by the Azure Function to execute the code and generate the response, which is within the timeout limit of 20 seconds.

    To summarize, duration measures the overall time taken for the request to complete, while FunctionExecutionTimeMs measures the time taken by the Azure Function to execute the code and generate the response.


    I hope that this response has addressed your query and helped you overcome your challenges. If so, please mark this response as Answered. This will not only acknowledge our efforts, but also assist other community members who may be looking for similar solutions.

    0 comments No comments

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.