azureloggingcommandkqlappinsights

Why does not .show queries work in Azure App Insights logs query?


Why does not .show queries work in Azure App Insights logs query?

I am running a query from this documentation. The query is the following:

.show queries 
| project Text, Duration
| take 10

I am getting the error:

Query could not be parsed at '.' on line [1,0]

Token: .
Line: 1
Position: 0
If the issue persists, please open a support ticket. Request id: myid

Why does it work according to the documentation and does not work in real life? How could I make it work?

enter image description here

I tried to find a way to import the show command, but it seems that everywhere it is assumed that the command will be present by default and there is no way to import it.

I stumbled across the .show queries command during reading the comments section here and just wanted to try and see what it can do for the queries profiling. But it seems it does not work at all.


Solution

  • In Azure Application Insights logs query, the .show command is not supported. It is used to display the metadata about the Kql database tables, columns and functions kind of information.

    If you are trying to retrieve the query profiling results related to Application insights, you can use like "requests, traces, exceptions" which works in the similar way .show query.

    I tried the sample query in Application insights logs as shown below:

    requests
    | project duration //project the fields information as per your requirement
    | order by duration desc
    | take 10
    

    enter image description here