Is TimeGenerated the same as the timestamp generated by ILogger log.information?

Sergio Solorzano 26 Reputation points
2022-11-25T15:54:37.16+00:00

I am unclear from the document whether TimeGenerated in a Log Analytics query matches the timestamp (e.g. below generated from ILogger log.information shown in a Function app Monitor?), i.e. I can look at the timestamp of Function app Monitor and query Log Analytics to get the data for the timestamp I saw on monitor?

2022-11-25T15:33:56.381 [Information] Executed 'TelemetryListenerCalculateAlgoPostNewState' (Succeeded, Id=3343886c-90e8-4ea7-b15f-5e1a42b47ff8, Duration=130ms)  

264276-image.png

versus

264331-image.png

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,018 questions
Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,642 questions
0 comments No comments
{count} votes

Accepted answer
  1. MayankBargali-MSFT 69,991 Reputation points
    2022-11-28T04:57:44.423+00:00

    @Sergio Solorzano Thanks for reaching out. TimeGenerated property is the Record created at data source. If the data source doesn't set this value, then it will be set to the same time as _TimeReceived. For more details refer to this section.

    When you use log.Information inside the function app then the TimeGenerated property is set as the time of the log as I can see in the below test. The same is documented here.

    TimeGenerate : The timestamp (UTC) of the log.

    264612-image.png

    264613-image.png

    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Maxim Sergeev 6,566 Reputation points Microsoft Employee
    2022-11-26T06:09:58.843+00:00

    Hi there,

    It should if the data source has delivered the data to both destinations parallelly

    The TimeGenerated column contains the date and time that the record was created by the data source. See Log data ingestion time in Azure Monitor for more details.

    0 comments No comments