Azure Functions not showing all executions under Monitoring

Azure Functions Monitoring

I recently deployed a very simple Azure Functions 2.0 project from Visual Studio 2019 that contained a single timer triggered function. The function had a daily timer trigger and I noticed that there were gaps in the executions in the monitoring tab in the Azure portal.

I went looking in the associated storage account tables and in the AzureWebJobsHostLogs201905 table I could see entries with a partitionkey of “R2” that seemed to show that the executions were happening, but nothing was showing in monitoring.

I checked the Data Sampling in the associated Application Insights app in the Usage and estimated costs blade but it was set to 100%.

After lodging a support ticket with Microsoft, it seems that you also need to explicitly disable sampling in your hosts.json file for the Function App. The logging snippet below needs to be added to your hosts.json file prior to deployment. After adding this and re-deploying, all executions of this function have appeared.

{
  "version": "2.0",
  "logging": {
    "applicationInsights": {
      "samplingSettings": {
        "isEnabled": false
      }
    }
  }
}

ABOUT THE AUTHOR

I’m the Technical Director at Expeed Technology in Adelaide, South Australia. In my day job I work on both Windows and Linux web hosting technologies and Windows and Web .NET development. In my spare time I tinker with video production, photograpy, and all things Azure, including IAAS, PAAS and Serverless. You can find me on Twitter over at @simonholman

Share

Share on facebook
Facebook
Share on twitter
Twitter
Share on linkedin
LinkedIn

Related

Comment

Leave a Comment

Your email address will not be published. Required fields are marked *

Do NOT follow this link or you will be banned from the site! Scroll to Top