Application Insights is a tool to monitor your application running in Azure cloud.
Custom queries to Application Insights logs are written in Kusto. You can run these queries in Azure Portal, but for this Stack Overflow question I wrote a solution how to execute these locally.
You need the Application Insights extension to az:
Then you can run queries like this:
I wrote a script to run kusto scripts from a file and get the result as a Powershell object:
For example if we use the demo instance data we could count the 3 hour request counts for each URI:
For the Emacs users out there, I also wrote a kusto-mode for syntax highlighting.