As explained in Find the suitable instrumentation approach, automatic injection is available if at least one application tier can be instrumented with OneAgent, and automatic RUM injection is supported for that technology. For details, see Technology support - Real User Monitoring - Web servers and applications. This guide explains how to create a frontend in the New RUM Experience and configure frontend detection rules to ensure captured data is routed to the correct frontend.
Deploy OneAgent
Learn how frontend detection rules are applied
Account for uninstrumented components
Create a frontend and define frontend detection rules
Set the order of frontend detection rules
Configure the RUM JavaScript snippet format
After deploying OneAgent in full-stack monitoring mode on your application tiers, the RUM JavaScript is automatically injected into HTML pages. For Java applications, restart the process after OneAgent deployment for the injection to become active. For installation details, see Dynatrace OneAgent.
If OneAgent doesn't inject the RUM JavaScript, refer to Configure automatic injection for guidance.
By default, all captured RUM data is associated with the catch-all frontend My web application. We recommend keeping this name to make it easier to distinguish from other frontends.
If you can’t find My web application, it may have been renamed.
To locate the renamed My web application
Experience Vitals.Frontend detection rules are evaluated on the server side of your application by the OneAgent on the first instrumented tier—the one closest to the browser.
All frontend detection rules are URL-based and consist of a pattern and a matcher. There are two ways to define them:
scheme://host:port/path?query, where the query string is optional and default ports (80 for HTTP and 443 for HTTPS) are omitted. The URL does not include a fragment identifier (as in scheme://host:port/path?query#fragment), because fragments are only used by the browser and never sent to the server.example.com matches both example.com and shop.example.com.There may be a component—such as a reverse proxy or load balancer—between the browser and the tier responsible for frontend detection that is either uninstrumented or uses a technology without RUM support. If this component rewrites the URL, the URL used for frontend detection differs from the one originally requested by the browser. In such cases, special considerations are required to ensure that your frontend detection rules take effect as expected.
https scheme in the pattern of a frontend detection rule.With the foundational knowledge from the previous steps, you are now ready to create a frontend and define its detection rules.
To create an auto-injected frontend
Experience Vitals.You’ll now see the detection rule for the frontend you just created. To add additional rules, select Add.
You can create up to 1,000 frontend detection rules per environment.
Frontend detection rules have a defined order, and OneAgent applies them sequentially. Rules at the top of the list take precedence over those further down. To ensure accurate detection, place more specific rules—for example, those that include both a domain and a path—higher in the list than generic rules—such as those that include only the domain.
The rules you created in the previous step are added to the bottom of the list, so you may need to move them up for them to take effect. To adjust the order, go to
Settings > Real User Monitoring > Application detection. Select and hold next to the rule name, then drag the rule up or down to change its priority.
When you update your frontend detection rules, the changes are usually communicated to OneAgent within a minute. However, there are scenarios where the updated rules cannot take effect immediately.
When OneAgent injects the RUM JavaScript, it adds an ID for the detected frontend to the injected snippet. This ID is then included when the RUM JavaScript reports the captured user events, allowing the events to be correctly attributed to the corresponding frontend. In the following situations, OneAgent cannot perform a fresh injection with an updated ID, which delays the effectiveness of rule changes:
Expires response header or the max-age directive of the Cache-Control header, changes to frontend detection rules cannot take effect until the cached document expires.By default, OneAgent injects the OneAgent JavaScript tag snippet format, which is recommended for most scenarios.
The New RUM Experience provides snippet formats tailored to different requirements. For details on different formats and their configuration options, see Select a snippet format in the New RUM Experience.