Iris Classon
Iris Classon - In Love with Code

Querying across mulitple Application Insights apps/resources with Log Analytics

bit

Log Analytics has scope functions that lets us do many interesting things, and one very useful thing is to do queries across Application Insights resources. Each service we have uses its own Application Insights resource/instance, as we want to separate the metrics collected for each service- and it makes sense as they are deployed to isolated environments. However, we still want to be able to do queries across all of them. Our services are not completely decoupled and independent, and we want to look for domino effect failures, and see how and if exceptions correlate.

I’m no Application Insights expert, or Log Analytics, but I’d like to share with you useful things that I’ve learned,- and at the same time help out my colleagues with some videos and posts :)
Hope you find this video helpful!

Let me know what you think, and if you’d like to see more short videos like this!
To query across Application Insights apps/resources- be that in the same resource group or not, you can use the app() function in your query.

Simply feed it the identifier (resource name, qualified name, ID or Azure resource ID), do a union and you are good to go.

 

For example, the query below will go across two services, our Admin and CalcualtionEngine service, and get all the logged exceptions

**union app(‘Konstrukt.SL.Administration’).exceptions,**app(‘Konstrukt.SL.CalculationEngine’).exceptions

 

Watch the video for more :)

Comments

Leave a comment below, or by email.


Last modified on 2017-12-08

comments powered by Disqus