Microsoft Azure's Monitor for Azure Functions is buggy - check the logs for any missing data

by Patrick Lee on 28 Jan 2023 in categories BigData tech with tags Application Insights Azure AzureFunctions

In the Azure portal, for Azure Functions, I've found that the Monitor section for individual subfunctions (go to Functions, click on the subfunction, then Monitor from the left hand menu) is not infrequently a bit buggy, in that it misses out some function runs, particularly for functions trigged by a timer.  This is something Microsoft out to fix, but haven't for many years. 

If as sometimes happens, you find gaps in the monitor's records, to check whether the function actually ran on a particular day, check the logs for the function: they are usually far more complete.

Of course if sampling is being applied to the Application Insights resource that the Azure Function is linked to, then some of your non error traces could be missing even in the logs.  If so, then you may need to either amend the settings for AppInsights (to avoid sampling being applied to particular types of traces), or you might need to pay for a more expensive AppInsights resource.