Search code examples
azure-application-insightsazure-log-analytics

How many Log Analytics workspaces to use for multiple Application Insights instances?


We have multiple different apps, each deployed in multiple environments, each monitored by a separate Application Insight instance. For example 2 web applications, each deployed in dev, test, prod environments, that means 6 different Application Insight instances.

Microsoft wants to migrate Application Insights to workspace based Application Insights, so I need to create Log Analytic workspace(s). What is the best approach and why:

  • Create single workspace and put all Application Insights into this one workspace?
  • Create separate workspace for each Application Insight instance?
  • Something other? (Workspace per application, workspace per environment...)

Solution

  • [I'm a part of Application Insights team]

    Overall the recommendation is to keep the number of workspaces to a minimum unless you need clear separation:

    1. Different auth for various workspaces [note, Application Insights scenarios leverage so called resource-based auth, i.e. you still will be controlling auth through Application Insights resources]
    2. Different billing quotas
    3. Different retention period
    4. Different regions
    5. Different environments

    This allows you to manage less number of resources (workspaces).

    So, you should make a decision based on #2 - #5 (as mentioned above - auth is not relevant because it will still be controlled by Application Insights).

    If you're not using advanced features (different retention), then most likely the main driver is different environment. I.e. in your case it is probably 3 workspaces (dev, test, prod).