Detecting a Service from URL

An alternative to the controller-based approach is determining the service directly from the information encoded in the URL. URL-based service detection can be based on different URL tokens.

Detecting the service from URL is best explained via the an example. Lets have a following incoming transaction from which Plumbr is about to extract the service this transaction is consuming:

From the transactions consuming this particular URL the service happens to be defined by the first three tokens in the context path: /shop/cart/add/. The last token identifying the product added to the shopping cart (iphone6) is actually a parameter of the service and needs to be excluded by the service detection rules. Using this approach makes it possible to group transactions accessing the same /shop/cart/add service together.

Considering the fact that URL patterns vary from application to application, you might need to configure the rules to achieve the desired grouping. Whether the service needs to be detected from URLs based on URL segments, such as /shop/cart/add/ in the example above or from a specific request parameter, your service detection rules need to take this into account.

By default, Plumbr uses the following rules to group together transactions consuming the same service with different parameters encoded into URL tokens (but not in parameters):

  • The first token in the URL is always preserved.
  • Other URL tokens are matched to detect and replace the following patterns with placeholders:
    • Numbers
    • Dates
    • Email addresses
    • Alphanumericals (strings containing at least one number and any combination of letters and symbols , :, =, _, %, ., &, –.

Applying the default rules makes it possible to group together transactions such as the following two


together under the same /pay/invoice service.