Once you deploy your Azure Functions on Azure, you need to monitor them to check when something goes wrong.
The signature of an Azure Function Run method provides the instance of ILogger that you can use to log information about your code.
Using ILogger, you can collect information from your code execution to monitor and triage errors and exceptions.
The Azure Functions platform offers built-in integration with Azure Application Insights. Using Application Insights, you can easily collect and log performance and error data, and Application Insights gives you powerful analytic tools to aggregate log traces to have a better diagnostic experience.
Enabling Application Insights for your function is very easy: just put the Application Insights instrumentation key in the function app settings with the key APPINSIGHTS_INSTRUMENTATIONKEY, as shown in the following...