Automated naming of mobile user-actions & grouping of web requests

Wolfgang Beer
Wolfgang Beer Product news March 21, 2017

Keeping up with new mobile-app features has traditionally been a real challenge when relying on manual instrumentation. Automatic instrumentation has proven to be extremely efficient at quickly instrumenting mobile apps—without requiring manual configuration of source code. With auto-instrumentation, you’re guaranteed of instrumenting all of your mobile-app’s new features as they come online. One downside of automatic instrumentation is that, in some cases, automatic detection and naming of user actions and grouping of web requests has been less than optimal. This issue is addressed in the latest release of Dynatrace. Extraction rules that automatically group and aggregate web-request metrics can also now be defined using regular expressions.

Set up user-action naming rules

The mobile application page below shows a typical user action captured by Dynatrace OneAgent. The highlighted AppStart user action represents the startup of the app. The name of the app (easyTravel) is included in parentheses.

user actions

To create naming rules for mobile user actions

  1. Select Applications from the navigation menu.
  2. Select your mobile application.
  3. Click the Browse (…) button.
  4. Click Edit.
  5. Select User actions.
  6. Click the Add naming rule button.

Three types of naming rules are available to clean or extract specific information from your auto-detected mobile user actions and web requests:
Cleanup rules, naming rules, and extraction rules.

user actions

User-action naming example

In this first example, we’ll use a naming rule to rename the auto-generated AppStart (easyTravel) user action to Startup.

The naming rule shown below states that all user action names beginning with the string AppStart are to be renamed and grouped under the name Startup. By clicking the Preview button, the actual incoming stream of user actions is retrieved and the effects of the new rule are displayed for you in a preview further down the page.

user actions

Extraction rule example

Another useful approach to automated user-action naming involves setting up extraction rules via regular expressions. Extraction rules are used to replace variable web-request URL elements (for example, session data, product IDs, or GUIDs) with fixed strings. With variable elements replaced with fixed strings, the resulting web requests can be grouped correctly. In the process, all web request response-time and error-rate metrics can also be aggregated correctly.

To group web requests that have variable elements, and therefore to correctly aggregate all their response time and error rate metrics, it’s necessary to define specific extraction rules, as below. An extraction rule can be defined using a regular expression that selects and replaces the variable part of a URL with a fixed string. In the example below, the variable GUID values following the /feed/ subpath will be replaced with the fixed path /feed/*/. The asterisk symbol (*) is a wildcard that represents all available GUIDs.

As a result of this rule, all calls to the API endpoint /feeds/ will be grouped into a single group.

Variable API endpoints:

/feeds/42424224343423423432/

/feeds/33453345345353453453/

/feeds/32342423424234234243/

Resulting fixed API endpoint:

/feeds/*/

You can see the results in the Preview this rule section in the example below.

Share blog post

Stay Updated

Dynatrace API mobile app monitoring user actions web requests
Wolfgang Beer
Wolfgang Beer

The Author

Wolfgang is a Product Manager at Dynatrace. He has a long record of research in software analytics and mobile computing. At Dynatrace, he's responsible for the Davis AI engine, baseline calculation, and event correlation in performance analytics.

Looking for answers?


Start a new discussion or ask for help in our Q&A forum.

Go to forum
Disclaimer: The views expressed on this blog are my own and do not reflect the views of Dynatrace LLC or its affiliates.
You may also like

Extract metrics from business events to increase the value of Business Analytics

February 2, 2023
Daniel Marschnig
Dynatrace | Microsoft

Set up AI-powered observability for your Microsoft Azure cloud resources in just one click

February 2, 2023
Christoph Hoyer
Dynatrace SaaS Release Notes thumbnail

Dynatrace SaaS release notes version 1.259

January 31, 2023
Piotr Szwarc
X
Learn without boundaries at Dynatrace Perform 2023
Push your cloud past its limits with 40+ breakouts, 30+ customer speakers, and 20+ training sessions.
Register here >