URL Grouping

URLs identify pages, APIs, and resources in Request Metrics. But URLs often contain identifiers like UUID or SEO slugs that are not meaningful to differentiate the code running on your website. Request Metrics automatically detects these ID and SEO segments and groups them together for Pages, APIs, and JavaScript.

Automatic URL Grouping

When processing URLs for Pages, APIs, and JavaScript, Request Metrics analyzes the URL and looks for segments that are likely to be IDs or SEO slugs. For example:

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

These URLs represent a “product overview” page that you likely want to see represented as a single thing. We automatically group these URLs together as https://example.com/product/${product}/overview. If you see ${something} in a URL, it’s probably a group of similar URLs.

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.


Manual URL Grouping

It’s impossible for us to automatically group every possible URL in a way that meaningfully reflects the site. 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:

https://${east}.example.com/api/${v1}/products/${id}/${seo}

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!

Did you like this?
Found a mistake? Let us know!