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

Dewa Tsukasa 40 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,365 questions
Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,192 questions
0 comments No comments
{count} votes

Accepted answer
  1. Pinaki Ghatak 5,230 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.

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Dewa Tsukasa 40 Reputation points
    2024-11-26T02:53:34.3766667+00:00

    Thank you for your reply, I was able to understand correctly.


    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.