If you haven’t yet seen it, Raygun Pulse is a modern real user monitoring solution that allows you to drill into your user’s behavior on your site in real time. In previous blog posts we’ve highlighted how easy it is to integrate Pulse into your web site or app. Once you’ve done that, you’ll quickly notice various pages appearing in the Performance tab, which contain crucial performance timing data which give you unprecedented visibility and allow you to optimise you site for the way your users are behaving.
Depending on your site/app’s routing scheme, you may start to notice duplicate pages quite quickly. For example, take a blog site like this one. You may wish to bucket multiple post pages into one, ignoring DateTime segments in the URL, as their content is very similar. Pulse provides a set of options and defaults that allow you to specify how your user’s requests are grouped into page buckets, termed the ‘path segment rules‘. In this blog post I’ll give you an overview of how it works, so you can customize it to your needs.
Many REST URL schemes as encouraged by popular wisdom and server-side frameworks will include integer segments that represent different state, e.g user IDs. An implementation of the routes to view two user’s profiles could look like this:
Out of the box, Pulse will wildcard the second segement as it is an integer only (no alphabet characters). The result of the automatic wildcarding will end up with the following page in Pulse:
Thus, views to anyone’s profile will be bucketed together, and you can compare the performance timing metrics in aggregate and make a decision on whether to optimise. This is useful if the segment is variable and represents different model from one controller action triggering one set of queries, which gets applied to one view.
WordPress timestamp segments
If you click on the link in the title of this post, you’ll see a route containing the following:
As WordPress blogs are so common, Pulse will wildcard these automatically for you. The /2015/ and /10/ segments will be wildcarded, resulting in one page in Pulse for all blog posts:
Blacklisting is the term for applying the above wildcard to any segment of your choosing, even if it is not an integer or WordPress timestamp. You do this by providing a list of paths containing wildcards at the appropriate place. Incoming requests that match those rules will have their segments replaced in the same way as above. For instance, say you have base 16-encoded segments representing a user:
To replace the middle segment with a wildcard, you can add the following to the Blacklist (under Application Settings -> Pulse):
Whitelisting is the opposite of the above two behaviors, naturally. It allows you to prevent wildcarding, either automatic (integer) or via the blacklist. Say you actually want two user profiles to appear as two pages in Pulse, you can add the following to the Whitelist:
Only those two will then be split out. You can add as many as you like. Note that setting changes to any of the path segment rules may take up to 15 minutes to appear in Pulse.
Get started with Pulse now
If you haven’t yet got a Raygun account you can start your free 14-day trial here, no credit card needed. Otherwise log in and check out Pulse and the Application Settings to configure these rules, and start discovering exactly how your site behaves!
** UPDATE **
Real User Monitoring for Mobile Applications is here! See the update here