Dynatrace SaaS version 1.330+
With the URL pattern matching feature, Service Detection v2 (SDv2) can generate better endpoint names by extracting URL path patterns from raw URL paths.
Dynatrace can extract stable, low‑volatility URL patterns from raw URL paths and write them to the url.path.pattern span attribute. The url.path.pattern attribute is derived beforehand and then used by SDv2 endpoint detection to name and group endpoints appropriately.
The URL pattern matching feature is designed for situations where frameworks or servers don't provide route templates (for example, reverse proxies or libraries without http.route), so endpoint names remain meaningful and consistent, preserving correct granularity for critical performance metrics.
This page describes URL path pattern matching for SDv2 and how to create URL path pattern matching rules, specifically how to define URL path patterns correctly.
span.kind == server and span.kind == consumer span types.url.path.pattern and takes precedence over the HTTP request method and route rule in determining endpoint names. This way, your extracted URL pattern takes precedence when both url.path.pattern and http.route are available./order/12345) is generalized into a stable template (for example, /order/{id}). It's leveraged to produce low‑volatility values for the url.path.pattern span attribute.Only spans with span.kind == server and span.kind == consumer are processed.
One URL path pattern matching rule may contain one or more URL path patterns.
URL path pattern matching rules are evaluated in order from top to bottom. Only the first matching rule is applied. The first rule with a URL pattern that matches is applied to a span.
URL path patterns within a matching rule are also evaluated in order from top to bottom. Only the first matching URL pattern is applied.
The first matching URL path pattern defines the resulting value for the url.path.pattern attribute of a span. When the URL pattern matches, the url.path.pattern span attribute is based on this matching URL pattern.
URL patterns operate on path segments; path segments are URL parts between a slash /.
Leading slashes in URL paths are normalized before matching.
Before URL patterns are evaluated, any number of leading slashes in the path is reduced to a single / to ensure consistent and reliable matching.
Matching is case sensitive.
Use the information below to construct meaningful URL path patterns for your URL path pattern matching rules.
The following characters or values are possible in the URL path patterns. Use them to replace high‑cardinality parts of your URLs (IDs, version numbers, and deep internal URL paths) with placeholders or asterisks while keeping the overall structure of the endpoint recognizable.
{placeholder-name}_*URL pattern
URL path
Resulting endpoint
/api/orders
/api/orders
/api/orders
{placeholder-name}{id} or {date}.URL pattern
URL path
Resulting endpoint
/api/orders/{id}
/api/orders/1234
/api/orders/abcd
/api/orders/{id}
/api/orders/{id}
__.URL pattern
URL path
Resulting endpoint
/api/_/orders
/api/v1/orders
/api/v2/orders
/api/v1/orders
/api/v2/orders
**.*.URL pattern
URL path
Resulting endpoint
/internal/*
/internal/service
/internal/service/operation/extra
/internal/*
/internal/*
The sections below describe how to create and manage URL pattern matching rules.
To create a URL path pattern matching rule
When the Settings Classic option is not available for you, use the Settings API to create URL pattern matching rules.
Select Add rule.
Fill in the following optional and required fields.
Rule name: Required
A user-defined name for the rule.
Description: Optional
A human-readable descriptor of the rule.
Matching condition: Required
A DQL matcher. If the matching condition applies, the rule is evaluated.
Select Add item and specify a URL path pattern according to the pattern syntax reference. Repeat if more path patterns should to be added.
If required, use to re-order the added URL path patterns, considering that the first matching pattern is used to determine the
url.path.pattern attribute value.
Select Save changes.
You can edit, disable, or delete your URL pattern matching rules.
When the Settings Classic option is not available for you, use the Settings API to create URL pattern matching rules.
The URL pattern matching feature is particularly useful for the following use cases:
Use case
URL pattern
URL path
Resulting endpoint
Nginx reverse proxy routing
/api/_/_/{id}
/api/v1/users/john
/api/v2/users/jack
/api/v1/users/{id}
/api/v2/users/{id}
API versioning patterns
/api/_/_/{id}
/api/v1/orders/123456789
/api/v2/orders/987654321
/api/v1/orders/{id}
/api/v2/orders/{id}
Mixed depth paths
/blog/_/_/*
/blog/2024/11/my-post.md
/blog/2024/12/my-holiday.md
/blog/2026/01/15/my-thoughts.md
/blog/2026/02/05/my-memories.md
/blog/2024/11/*
/blog/2024/12/*
/blog/2026/01/*
/blog/2026/02/*