azure-functionsazure-application-insights

IPM Functions what is the time unit for the duration field in the logs


I have an azure functions application running through several thousand images a day and I'm trying to monitor the performance of that application using Azure Insights. However I have no idea what the duration property refers to in the Logging.

I believe it is refers to the duration it takes to run the function once. However I'm unsure what unit of time its referring to.

You can see my specific query here:

requests
| project
    timestamp,
    operation_Name,
    duration,
    cloud_RoleName
| where timestamp > ago(7d)
| where cloud_RoleName =~ 'FUNCTION-PROJECT' and operation_Name =~ 'FUNCTION'
| summarize avgRequestDuration=avg(duration) by bin(timestamp, 1h)
| render timechart

Solution

  • Thanks for the comment @PeterBons.

    Duration refers to the amount of time an operation i.e., Azure Function execution, request or dependency took to complete, or the time servers took to process the request, refer MSDOC.

    However I'm unsure what unit of time its referring to.

    As mentioned in MSDOC, unit of measure for duration is Milliseconds. The request duration is in the format DD.HH:MM:SS.MMMMMM

    I have created an Azure function and ran the below query in Azure Application logs to monitor the function logs.

    requests
    | project
        timestamp,
        operation_Name,
        duration,
        cloud_RoleName
    

    enter image description here