When recording websites or web applications with Silk Performer you might end up with big, messy scripts, containing a lot of web requests you did not intend to record. Silk Performer 17 now provides a couple of traffic filters that allow you to exclude such unwanted requests. The graphic below summarizes the three traffic filters we will be discussing in this blog article: (1) the general filter, (2) the domain filter, and (3) the path and query filter. The filters display on the Capture File page. To learn more about capture files, read the blog article about Offline Scripting.
How the traffic filters work
Before we use the traffic filters in a real-world example, let's first take a look at what they do and how they work. The general filter consists of two check boxes, or two settings: Exclude Proprietary TCP/IP Traffic and Exclude Browser-Specific Domains. When you enable Exclude Proprietary TCP/IP Traffic, Silk Performer will exclude all non-standard TCP/IP protocols. These can also be called proprietary protocols. All standard protocols like HTTP, FTP, LDAP, and so on, will be kept. When you enable Exclude Browser-Specific Domains, Silk Performer will exclude domains like urs.microsoft.com or translate.googleapis.com. Browsers usually use such domains for statistical or tracking purposes. When you record a web application you typically do not want to include such traffic.
Next, there's the domain filter. You can use it to include or exclude requests to specific domains. If you want to learn more, read the blog article about Domain Filtering. It provides a comprehensive introduction to this topic. And then, there's the path and query filter. You can use it to exclude web requests that contain a specific string. Requests you cannot exclude with the domain filter (because you want to keep the respective domain in your script), can easily be addressed using the path and query filter.
Creating a new project
Now, let's try out the filters in a sample project. To do so, we first need to create a new Web business transaction project and record any website. We'll be recording yahoo.com for this example, because this website triggers quite a lot of events in the background. Make sure that you use Internet Explorer or Chrome for recording. These browsers typically make heavy use of the already mentioned proprietary protocols and browser-specific domains. For this example we need this otherwise unwanted traffic to learn what the filters can do for us.
Recording a website
Performing some clicks on yahoo.com should be enough to generate a big amount of events. Take a look at the number of events in the Recorder window. In our case, 516 events have been recorded. So let's close the browser, stop the recording, and save the script. The script displays in Silk Performer. As expected, it is a huge and messy script, full of web requests we actually do not want to have in there. Let's double-click the .spcap file in the tree to open the capture file. On the Capture File page, the three traffic filters display.
The general filter
We can see that the general filter settings are enabled by default (1), which makes perfect sense. You usually do not want to include any of the propriety TCP/IP requests or the requests caused by browser-specific domains. When you hover your mouse over the Exclude browser-specific domains check box, a tooltip appears (2). It shows which browser-specific domains have been detected. In our case it is the domain urs.microsoft.com. Let's disable the two general filter settings for a moment, just to find out how they affect the script. Click Generate and compare the new script with the initial script. The new one should be a little longer and it should contain a couple of web requests to urs.microsoft.com.
The domain filter
Go back to the Capture File page and play around with the domain filter. In our example, we enable the filter (1) and include (2) just two domains: www.yahoo.com and login.yahoo.com (3). Now, when we generate a new script, it is considerably shorter and much more useful. All requests to the domains we didn't want to record in the first place are gone.
The path and query filter
To try out filter number three, search for a string in your script you might want to exclude. In our example, we're going for the string px.gif (1). All requests that contain this string should be excluded from the script. So, again jump back to the Capture File page and enter px.gif in the field below the path and query filter (2). When you press enter, you can immediatly see the matches (3). Generate a new script and verify that the respective requests are removed.
The traffic filters help you to tidy up your scripts and remove requests that were unintentionally recorded. Use the traffic filters in your Silk Performer projects and see what they can do for you.
Watch the Generating Clean Scripts video
The following video shows how to make use of the three traffic filters based on the same example we've discussed in this article:
To learn more about all new features and enhancements Silk Performer 17.0 provides, take a look at the following blog posts:
- Released: Silk Performer 17.0
- HTTP Live Streaming
- Performance Explorer Enhancements
- Improved CloudBurst Workflow
- Evaluating Agent Capacities
The Silk Performer Help is another comprehensive source of information:
If this article was useful for you, leave us a comment or like it. We appreciate any of your feedback.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.