Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to search for a request in Application Insights but exclude another request

How can I search for a specific request but exclude (from the results) another specific request, from Application Insights Transaction Search?

I wish to see any request for GET /user/* (e.g. /user/1 or /user/2) but not include (aka filter out/ignore) any requests for GET /user/*/pets

Is this possible?

Here's a screenie where I'm trying to do this:

enter image description here

like image 236
Pure.Krome Avatar asked Oct 13 '25 08:10

Pure.Krome


1 Answers

This experience is not designed for advanced query experience. Though it does allow to search for more than one transaction, this is mainly for backward compatibility reasons.

One way to achieve what you're looking for is to use Logs experience and use this KQL query:

requests
| where name startswith "GET /user/*"
| where name !startswith "GET /user/*/pets"

KQL is very powerful query language and it is possible to do various analytics on top of this query (from various summarizations to charting).

like image 61
ZakiMa Avatar answered Oct 16 '25 05:10

ZakiMa