0
votes

I am using Azure functions with timer that replaces on-premises Task Schedule jobs, I am looking for the following information for the each Azure function i deploy on to the azure platform.

  1. Which functions currently executing or current status of any given function
  2. Last Run time of each function
  3. Next Run Time of each function
  4. Duration the function completed executing the job
  5. Last Run result (success/failed)

I see some capabilities Azure KUDU API provides like process info, mini dumps etc, Do analytics provide all of the above info? I am planning to build a script or tool fetch the above information if available via apis..

1

1 Answers

0
votes

Azure durable function have built-in support, use timetrigger as the start trigger and use this to get the information.

Or link to application insights to get the data:

https://dev.applicationinsights.io/quickstart

Get API key:

https://dev.applicationinsights.io/documentation/Authorization/API-key-and-App-ID

This page can test the query, if the query is requests, then it will return the message of your function in table format. You need to parse the results according to your needs.

The format is like below(Duration time, Start time, Last runtime result):

enter image description here

This API can get other information(schedule to calculate the next run time, whether the function is still running.):

https://docs.microsoft.com/en-us/rest/api/appservice/webapps/getfunction

And use this to get each instance status of function(You need to do something to get the instance id.):

https://docs.microsoft.com/en-us/rest/api/appservice/webapps/getinstanceinfo#code-try-0