Azure Application Insights - How to group URLs that have different IDs?

Marcos Horno 21 Reputation points
2022-10-05T12:35:54.037+00:00

I want to obtain a list of the endpoints that take the longest to retrieve and have highest usage.

I'm using the following AppInsight Logs for this:

// Operations performance
// Calculate request count and duration by operations.
// To create an alert for this query, click '+ New alert rule'
requests
| summarize RequestsCount=sum(itemCount), MaxDuration=max(duration), AverageDuration=avg(duration), percentiles(duration, 50, 95, 99) by operation_Name // you can replace >'operation_Name' with another value to segment by a different property
| order by AverageDuration desc // order from highest to lower (descending)

It does the job but endpoints such as

/api/v4/devices/2039843-f09dfs0-345435
/api/v4/devices/7354098-3456-3045963045

Are displayed differently. I want the query to group them up.

I'm guessing some regex in the summarize line would do the job but I'm unfamiliar with the syntax. Any help would be greatly appreciated. Ideally I'd also love to sort by both desc RequestsCount and AverageDuration instead of just AverageDuration

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
2,821 questions
0 comments No comments
{count} votes

0 additional answers

Sort by: Most helpful