Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Single or multiple instances of Application insights resource? [closed]

We have a microservice project with multiple applications consisting of frontend (angular, angular.js), backend apps (ASP.NET Core, PHP), gateways etc.

I was wondering whether it's a correct approach to have an Application Insights resource per project or maybe there should be just one per environment for all the applications ? It seems if I create multiple application insight resources and assign them all to separate projects Azure can somehow figure out they are all linked (routes visible on application map). I'm not sure what's the correct approach.

like image 517
cah1r Avatar asked Aug 09 '19 08:08

cah1r


2 Answers

There are a few things to take into account here, like the amount of events you're tracking and if that 'fits' into one instance of Application Insights. Or if you're OK with using Sampling.

As per the FAQ: use one instance:

Should I use single or multiple Application Insights resources?
Use a single resource for all the components or roles in a single business system. Use separate resources for development, test, and release versions, and for independent applications.

  • See the discussion here

Should I use single or multiple Application Insights resources?

like image 132
rickvdbosch Avatar answered Sep 30 '22 20:09

rickvdbosch


I would have one app insight per service. The reason is that app insights don’t cost until you hit the threshold. So if you use one app insight to log everything, it’s likely that you will hit the threshold pretty quickly.

Also, it is good practice to separate out the logs for each service as the data they hold can differ with regards to personal information.

You can however track the request across all services by application map or writing a query that combines the logs across multiple app insights.

like image 32
Junaid Avatar answered Sep 30 '22 18:09

Junaid