I would like to know how long Azure Functions was down.

Hinata Katsunori 536 Reputation points
2023-05-02T05:32:11.49+00:00

Hello.

There are Functions that work by triggering the receipt of data to the IoT Hub. Functions process the data and push it to Cosmos DB.

Compared to the number of logs left by the IoT Hub, The number of data in the Cosmos DB is about 50% of the total number of logs left by the IoT Hub.

There seems to be a period of time when Functions is down, but I don't know what time it is down.

How can I check the downtime of Functions?

Thanks In Advance.

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
2,991 questions
Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,614 questions
{count} votes

Accepted answer
  1. AnuragSingh-MSFT 21,241 Reputation points
    2023-05-03T09:02:41.5+00:00

    @Hinata Katsunori , In addition to the details shared by Sander in the answer, the following are additional resources that should help you.

    1. The metric "Function Execution Count" would show details of function execution time and instances. The detailed step to review this metric is available here - Analyzing Azure Functio App Metric.
      You may also check the following page for additional metrics which are available by default for Function App - Azure Functions specific metrics.
    2. I would also suggest looking at Azure Functions hosting options, especially to review the hosting plan being used and relevant configuration. Based on the symptoms mentioned in the question, the content under following topics should be reviewed
    • Function app timeout duration
    • Scale
    • Service limits
    1. The "Availability and Performance" option under "Diagbose and solve problems" also contains a number of scenarios and data points that should help analyze scenarios like
    • Web App Down
    • Web App Restarted
    • Function App down or reporting error etc.
      This should be a good point to cover most of the basic scenarios.
    1. Lastly, the best practices available in the following doc should serve as a guideline related to perf and reliability - Improve the performance and reliability of Azure Functions

    Hope this helps.

    If the answer did not help, please add more context/follow-up question for it, and we will help you out. Else, if the answer helped, please click Accept answer so that it can help others in the community looking for help on similar topics.


1 additional answer

Sort by: Most helpful
  1. Sander van de Velde | MVP 31,106 Reputation points MVP
    2023-05-02T18:01:01.9433333+00:00

    Hello @Hinata Katsunori ,

    The metrics page on the Azure Function gives limited access to logging information over the past 30 days.

    It's recommended to have Application Insights connected to your Azure Function so you collect detailed function information. This is a very useful UI around Log Analytics.

    Next to that, recently, support for CosmosDB as native IoT Hub telemetry export routing to is added:

    User's image

    Here is a blog post about that IoT Hub feature.


    If the response helped, do "Accept Answer". If it doesn't work, please let us know the progress. All community members with similar issues will benefit by doing so. Your contribution is highly appreciated.