Search code examples
azureazure-functionsazure-application-insights

Strategy with app insights for dealing with multiple functions


I have a Resource Group with more then 15 Function Apps in Azure. At the beginning I created one App Insights for each Function App. So if I want to know what´s going on, I can go to a specific Function App's App Insights (or the monitor) and see what´s going on.

It works well but as these functions act as distributed message based services, sometimes it´s hard to know where the problem occurs. So I would like to know the best strategy recommended to deal with this situation.

  1. Create a single Application Insights for all the functions?

  2. Create some custom dashboard in Azure Monitor to track all theses Application Insights inside one dashboard (I tried to find how to do that but actually cannot find it).


Solution

  • Best practice is to include all the resources in your process in a single App Insights instance. That should simplify tracking down issues.

    If you do decide to stick with multiple instances, then mapping should help you track the system as a whole as ZakiMa mentioned. There is some basic troubleshooting in the documentation. Depending on how your system is configured, it may require a little manual dependency tracking.

    Also if you decide to keep them separate, the Azure Monitor syntax for cross resource queries is

    union withsource=SourceApp 
    app('Contoso-app1').requests,  
    app('Contoso-app2').requests, 
    app('Contoso-app3').requests, 
    app('Contoso-app4').requests, 
    app('Contoso-app5').requests 
    | parse SourceApp with * "('" applicationName "')" *