Pure.Krome
Pure.Krome

Reputation: 86957

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

Upvotes: 4

Views: 3381

Answers (1)

ZakiMa
ZakiMa

Reputation: 6241

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).

Upvotes: 5

Related Questions