After OneAgent is installed on a host, it monitors all applications running on that host. As a starting point, all monitoring data is encapsulated in a placeholder application called
My web application. We offer this placeholder application to allow for more flexibility—it's you who decides how to organize your apps.
Dynatrace offers the following approaches to defining your application for RUM.
|Suggested approach||Auto-injection||When your web applications can be easily identified based on domains and you want to create an application from already captured RUM monitoring traffic.|
|Application detection rules approach||Auto-injection||When you want to create new applications or when dividing your traffic based on domains isn't sufficient. Use application detection rules to define more complex patterns to group your RUM monitoring traffic into applications.|
|Manual approach (aka "agentless monitoring")||Manual insertion||When you don't have access to the host of your web application, but you have access to the application code.|
|Browser extension approach||Browser extension injection||When you have access neither to the host of your web application nor to the application code.|
My web application placeholder application aggregates the traffic from all detected domains. This application can serve as your starting point for mapping the identified domains to separate applications in your environment.
- In the Dynatrace menu, go to Web.
- Select the My web application placeholder application.
- Scroll down to find the Top 3 included domains panel. This panel shows the domains with the largest number of user actions that OneAgent detected in your environment.
- Select View full details.
- In the Top domains list, select the arrow button in the Transfer domain column to expand a domain entry.
- Follow one of the options below:
- To add a new application, select Create new application. Your application is created and listed on the Applications page. From now on, all user actions that are monitored on this domain are mapped to this newly created application.
- To add the domain to an existing application, select Transfer.
As you may want a more meaningful name for your application, replace the auto-generated name with a custom application name of your choosing.
To rename an application
- In the Dynatrace menu, go to Web.
- Select your newly created application to access the application overview page.
- Select Browse (…) > Edit.
- Type in the name you prefer in the text box at the top of the page. Note that application names must be unique.
Application detection rules approach
If you want to create more applications, change existing application mappings, or if you need to define more complex rules based not only on domains but also on URLs, you can use the Application detection settings page.
To add an application detection rule
- In the Dynatrace menu, go to Settings > Web and mobile monitoring > Application detection. The list of application detection rules is displayed.
For each application defined using the suggested approach, a detection rule is automatically generated and added to the end of the list. Rules are applied sequentially, with rules at the top of the list taking priority over rules listed further down.
- Select Add detection rule.
- Use the options offered on the page to create the appropriate detection rule for your application.
You can apply rules to new or existing applications as well as create rules based on your application URL or domain (host).
- Select Save to create an application detection rule.
The rule is placed at the very end of the application detection rules list.
- optional Use the arrows to the right of the rule to change its priority.
Agentless RUM and browser extension approaches
When you don't have access to your web server and therefore can't install OneAgent on the host, you have two options:
- Agentless RUM. If you have access to your application code, for example, when using Heroku Platform or Google App Engine, set up agentless RUM.
- RUM browser extension. If you cannot access your application code, for example, for third-party SaaS-hosted applications, install the RUM browser extension.
Best practices and recommendations
Define your applications based on team ownership so that you can easily make use of management zones for access restrictions.
It may make sense to define applications based on their technology stack so that the right settings are applied and the management of specific settings is easier. For example, activating support for specific XHR frameworks is typically required only for specific parts of a large application and for specific user action naming rules. It may help separate such large applications into smaller ones based on the technologies in use or team ownership.
Avoid renaming the
My web applicationplaceholder application as it includes all user actions on all domains that are not included in an application rule. If you rename
My web application, it may be difficult to distinguish it from your other applications.
Separating applications based on domains works best as Dynatrace cannot correlate user actions across domains with specific user sessions. This correlation is done via a cookie and therefore only works if the cookie can be set on the same domain. For example, user actions for
blog.dynatrace.comcan be captured in a single application as the cookie can be set to
dynatrace.com. However, the traffic for
www.internal-dynatrace.comcannot be captured in a single user session. You can still separate user actions based on the domain, but user sessions cannot include user actions from multiple domains. See User sessions for more details.
Group low-traffic applications. If you create an application based on a domain that has less than 10 actions per minute, Dynatrace won't automatically detect anomalies for this newly created application. Dynatrace depends on steady application traffic to correctly learn multidimensional baselines and automatically report application problems. You can change your application anomaly detection settings on the Anomaly detection page within your app settings. Although this recommendation contradicts the one mentioned above, it may make sense to combine low-traffic applications.
The application rules are processed in sequence for each request. More rules means more processing time, and as the rules are processed within OneAgents, you should try to have the rules for the applications with the most traffic at the top of the list. As soon as one rule matches, no further requests are processed.
The more specific application detection rules should be defined first, while the more generic rules should be at the bottom of the application detection rules list.
Let's assume that you want to create an application called
Aonto which the following two domains will be mapped:
and another application
Bfor the following domain:
If you create a generic grouping rule based on the
shopvalue, all three domains will be grouped into the same web application for monitoring. Therefore, you should first define a more specific rule, for example, "If the URL ends with
shop.html" so that only the third URL is mapped to application
B. Then you can safely define a generic rule based on the
shopvalue, as the third URL will have already been mapped to the previous application and therefore won't be included in application
Depending on your requirements, you can adjust the monitoring consumption and configure Real User Monitoring accordingly.
To monitor traffic on a single application, you can opt to use user actions and session properties. To monitor separate applications and get complete insights into consumption per application, you can configure separate applications, use tagging to split the metrics, and define management zones.