URL Grouping

URL Grouping

Many URLs have Ids embedded in them. Consider:

  • https://example.com/product/12345/overview
  • https://example.com/product/65478/overview

It would be nice if these URLs were grouped together inside of Request Metrics to see the aggregate performance between them. They are almost certainly running the same code. We have a few ways to roll these sort of URLs together.

Automatic URL Segment Grouping

If we encounter a URL path segment that looks like an ID, we will automatically group all urls with that segment together. From our example above, those two URLs would both be grouped as:


We run a number of regular expressions against each URL segment to determine whether we think it’s an ID. Anything with 2 or more numbers, or that looks like any common form of UUID, will automatically be grouped. We use the preceding segment to determine the grouping name. This mostly works for simple URL schemes but of course the real world is more complicated!

Manual URL Grouping Rules

It’s impossible for us to automatically group every possible URL in a way that meaningfully reflects the application. So we’ve built out a suite of tools to create “URL grouping rules”. Consider:

  • https://east1.example.com/api/v1.0/products/1a2b3c/cool-house
  • https://east2.example.com/api/v1.2/products/6f7g8h/cozy-home

In these URLs there are multiple subdomains involved, multiple API versions, custom product IDs, and seo-friendly slugs. We would still like to group the subdomains together, the API versions (they are all 1.x) and the product IDs. With our URL grouping rules you can group these like this:


You can also create conditional groupings. This way the rule will only apply if the subdomain or path segment matches certain criteria (subdomain contains “east” for example).

Today, the URL Grouping Rules is only an admin function, but we’d be happy to take care of it for you! Send an email to hello@requestmetrics.com with what you’d like to do. We will make this capability available to you directly soon!