You develop and add several functions to an Azure Function app that uses the latest runtime host.
The functions contain several REST API endpoints secured by using SSL.
The Azure Function app runs in a Consumption plan.
You must send an alert when any of the function endpoints are unavailable or responding too slowly.
You need to monitor the availability and responsiveness of the functions.
What should you do?
Click on the arrows to vote for the correct answer
A. B. C. D.B.
You can create an Azure Function with TrackAvailability() that will run periodically according to the configuration given in TimerTrigger function with your own business logic.
The results of this test will be sent to your Application Insights resource, where you will be able to query for and alert on the availability results data.
This allows you to create customized tests similar to what you can do via Availability Monitoring in the portal.
Customized tests will allow you to write more complex availability tests than is possible using the portal UI, monitor an app inside of your Azure VNET, change the endpoint address, or create an availability test even if this feature is not available in your region.
https://docs.microsoft.com/en-us/azure/azure-monitor/app/availability-azure-functionsTo monitor the availability and responsiveness of the Azure Function app's REST API endpoints, there are multiple ways to achieve it. However, some options might be more effective or efficient than others depending on the specific scenario. Here is a detailed explanation of each answer choice:
A. Create a URL ping test This option involves creating an external service that periodically sends a request to the REST API endpoints of the Azure Function app and checks the response time or status code. If any endpoint is unavailable or responds too slowly, the external service can send an alert or trigger an action.
Pros:
Cons:
B. Create a timer-triggered function that calls TrackAvailability() and sends the results to Application Insights This option involves adding a new function to the Azure Function app that periodically sends requests to the REST API endpoints and measures the response time or status code. The function can use the TrackAvailability() method of the Application Insights SDK to log the results and set up alerts based on predefined thresholds.
Pros:
Cons:
C. Create a timer-triggered function that calls GetMetric("Request Size") and sends the results to Application Insights This option involves adding a new function to the Azure Function app that periodically retrieves a specific metric, such as the request size, from the Azure Functions platform and sends it to Application Insights. By monitoring this metric, the function can detect issues that may affect the availability and responsiveness of the REST API endpoints.
Pros:
Cons:
D. Add a new diagnostic setting to the Azure Function app. Enable the FunctionAppLogs and Send to Log Analytics options. This option involves configuring the Azure Function app to send its logs and metrics to a central location, such as Azure Log Analytics. By analyzing the logs and metrics, operators can monitor the availability and responsiveness of the REST API endpoints and set up alerts based on predefined rules.
Pros:
Cons: