Our ASP.NET MVC application includes some URI path parameters, like:
In Application Insights, this URI above becomes Operation Name
GET /api/query/14hes1017ceimgS2ESsIec
We don't want millions of unique Operations like this; it's just one code method serving them all (see below). We want to roll them up under an Operation Name like
GET /api/query/{path}
Here is the code method - I think App Insights could detect that the URI contains a query parameter... but it doesn't.
[Route("api/query/{hash}")]
public HttpResponseMessage Get(string hash)
{
...
The reason Application Insights does not detect that the suffix of your Operation Name is a parameter is because the SDK does not look at your code, and for all practical purposes that's a valid URI.
Two options to get what you want:
ITelemetryProcessor
(detailed explanation can be found here), and remove the suffix hash from the Operation Name yourself