I have 2 simple pipelines in Azure Iot Edge. Now, I am interested in accessing the timestamps added to an iot message at each step/node in the pipeline. For example the 'enqueuingTime' at IoTHub and ASA and 'processedTime' from IoTHub and ASA etc. The following are the pipelines:
IoT Edge Device (input data source) -> IoTHub -> Custom Endpoint to Azure Storage + Route -> Azure Blob
So far, I have found that each iot message is appended to a blob file with a property
EnqueuedTimeUtc
andSystemProperties.enqueuedTime
, in the header. Also, both displays same value. Is this the time when the message is received in the IoTHub or the time when it is internally processed in the IoTHub?Moreover, if I use a custom endpoint into Azure storage, messages are batched into a single blob file. Is it possible to access the timestamp when a single message leaves the IotHub and also when it is written to the blob file? (i.e. I want to get something like a IoTHub-Processed-Timestamp or a Blob-Insertion-Timestamp of individual messages.)
IoT Edge Device (input data source) -> IoTHub -> Azure Stream Analytics -> Azure SQL Database
In this case, when I am defining the ASA query, the input is the IoTHub endpoint
Messaging
. In theSelect
statement, I can access the whole message header and so, I can also accessEventEnqueuedUtcTime
andEventProcessedUtcTime
, which are the timestamps of message enqueue and process completion inside the Stream Analytics job. Further I can accessIoTHub.EnqueuedTime
, which I assume gives the timestamp when the message is enqueued in the IoTHub. Is there a way to obtain the timestamp when a message enters from ASA and gets inserted into SQL DB? So far, I am usingGETDATE()
to automatically attach a time stamp during insertion of a record. Is this a good idea?Can anybody please let me know if I have a correct understanding of Azure Iot timestamps? Are there any documentations on how to access all such timestamps?