on
07 Aug 2025
09:33 AM
- edited on
29 Aug 2025
02:02 PM
by
Michal_Gebacki
Dynatrace RUM correlates user actions with their corresponding distributed traces to provide seamless end-to-end visibility. This correlation enables features like:
RUM correlation issues occur when the trace captured for a web request is not linked to its corresponding user action. This guide helps you systematically analyze such issues. We recommend working through the steps in sequence for best results.
The guide includes screenshots from Telerik Fiddler, but you can also use your browser’s developer tools to follow along.
To diagnose any RUM correlation issue, you first need to identify both the user action and the distributed trace that you expect to be correlated. Use the Distributed Traces screen to locate the trace you expect to be correlated—narrow the timeframe and apply filtering options to refine your search.
Doing so helps you distinguish RUM correlation problems from other types of issues, such as the following:
A missing drilldown to a distributed trace for a specific request in the waterfall analysis of a user action is not, by itself, sufficient evidence of a correlation issue. It’s possible that no distributed trace was captured in the first place.
Common root causes for missing traces include:
Conversely, the presence of a distributed trace that isn’t correlated to a user action is not, by itself, sufficient evidence of a RUM correlation issue. It’s possible that no user action was captured in the first place.
Sometimes, the Calls from unmonitored hosts, pages or devices shown in a service’s backtrace are misinterpreted as signs of RUM correlation problems. A web request appears here if it isn’t linked to a RUM user action—so while correlation issues can contribute, so can cases where no user action was captured at all. For this reason, the backtrace is not a reliable tool for diagnosing correlation problems.
There are many possible reasons why a user action might not be captured, including:
Out-of-the-box RUM correlation is not supported in all scenarios—and in some cases, it’s not supported at all. The key factors to consider are:
These factors can vary across different requests within the same application. Therefore, if you encounter RUM correlation issues, it’s important to examine individual requests. Use the decision tree below to determine what applies to the specific web request you're analyzing. For definitions of "same-origin" and "same-site", refer to Understanding "same-site" and "same-origin".
In scenarios where the decision tree calls for the use of the x-dtc
header or for CORS requests with credentials, additional configuration is required. See Link cross-origin XHR user actions and their distributed traces for setup instructions.
For the following technologies, you need to enable specific OneAgent features:
You can enable OneAgent features via Settings → Preferences → OneAgent features or Your process group → Settings → OneAgent features. See OneAgent features for details.
For other supported technologies, the required OneAgent features for RUM correlation are enabled by default. These include:
For Java, note that the process must be restarted after enabling a feature for the changes to take effect.
There are two ways to integrate OpenTelemetry with Dynatrace:
If the trace is enriched using the OneAgent span sensor, you can apply the decision tree above as-is.
If OpenTelemetry trace ingest is used and no part of the trace is captured using OneAgent, RUM correlation is not possible. If part of the trace is captured using OpenTelemetry and another part by OneAgent, identify the segment captured by OneAgent and apply the decision tree to that segment.
The OneAgent code module for Envoy does not support RUM. To achieve RUM correlation in scenarios where a RUM-capable OneAgent is deployed behind Envoy, you must disable OneAgent’s Envoy monitoring. Starting with Envoy version 1.29, a replacement integration is available that leverages OpenTelemetry and does not interfere with RUM correlation. For setup instructions, see Configure Envoy for Dynatrace.
In cross-origin scenarios, the decision tree requires the use of the x-dtc
header or CORS requests with credentials to propagate the information necessary for RUM correlation. The following sections guide you through verifying that your setup meets these requirements.
To allow the RUM JavaScript to add the x-dtc
header to requests, you need to define a regular expression that matches the target URL in the application configuration. For details, see Link cross-origin XHR user actions and their distributed traces.
Adding the header triggers a browser preflight request—an OPTIONS request—which must be properly handled by your endpoints. If not, a CORS error will appear in the browser console.
Specifically, the preflight response must include the Access-Control-Allow-Headers: x-dtc
header to permit the use of the x-dtc
header. It must also include an Access-Control-Allow-Origin
header that allows the requesting origin. Additionally, depending on the HTTP method used, the response may need to include an Access-Control-Allow-Methods
header.
If the preflight request succeeds, the browser includes the x-dtc
header in the actual request:
Note that only the actual request can be correlated—not the preflight request.
A CORS request with credentials is triggered when the monitored application:
withCredentials
property with XMLHttpRequestinclude
with the Fetch APIcrossorigin="use-credentials"
attribute to HTML elementsThe server must respond with an Access-Control-Allow-Credentials: true
header and a specific Access-Control-Allow-Origin
header (that is, not a wildcard). Failure to include these headers will result in a CORS error in the browser console.
You can confirm this setup by checking whether the browser sends RUM cookies, such as the dtCookie
, on the request.
RUM cookies are only sent if they are applicable. Typically, you don’t need to explicitly configure the cookie domain, as both the RUM JavaScript and OneAgent automatically select the broadest possible domain. However, if cookies are missing from the request, verify that the cookie domain configuration does not restrict them to a subdomain that excludes the request in question.
If RUM correlation is supported according to the decision tree and, where necessary, CORS handling is set up correctly, but the user action and its corresponding trace still aren't linked, review the following common issues.
To ensure that the OneAgent functionality required for RUM correlation is active, follow these steps:
For Java, note that the process must be restarted after enabling the feature for the changes to take effect.
In case you disabled the process group setting Enable Real User Monitoring to prevent automatic injection and opted to insert the RUM JavaScript manually, use a custom injection rule instead, as described in Use manual insertion for pages of an auto-injected application .
For RUM correlation to work reliably, it’s essential that the firewall constraints for RUM are respected and that RUM-related headers and cookies are properly propagated between the RUM JavaScript and all involved RUM-capable OneAgents.
One key cookie used for RUM correlation is the dtCookie
, which OneAgent can create and update. If the dtCookie
is stripped from the Cookie
request header before reaching the OneAgent, the OneAgent will generate a new one and return it in the Set-Cookie
response header.
This newly generated dtCookie
will have a different session ID and often a different server ID than the original as shown in the screenshot below. These mismatched identifiers prevent successful RUM correlation.
The HttpOnly
attribute is not supported for RUM cookies, as it prevents the RUM JavaScript from accessing them. If your infrastructure adds it to RUM cookies, this will lead to RUM correlation issues—among other problems. To resolve this, the attribute must be removed.
To determine whether your infrastructure is adding the HttpOnly
attribute, open the Application tab in Chrome DevTools and check whether the dtCookie
is marked as HttpOnly
.
In the Network tab, inspect the document request and examine the Set-Cookie
response header that sets the dtCookie
. If the header includes the HttpOnly
attribute, it confirms the issue.
If the domain assigned to the dtCookie
does not match the domain of the request—as shown in the screenshot below—RUM correlation will fail.
This mismatch can occur for two reasons:
For more details, refer to Configure the RUM cookie domain for web applications.
Check the response time of the uncorrelated trace by clicking on its root node—the topmost node in the trace hierarchy—and opening the Timing tab. If the response time exceeds 3 minutes, reliable RUM correlation is no longer possible.
Yes. The ability to correlate traces with user actions does not depend on how the RUM JavaScript is added to the HTML—whether it’s automatically injected or manually inserted—nor on the application type (auto-injected or manually inserted). Therefore, this guide is fully applicable in manual insertion scenarios.
In some cases, the View trace button is not shown when hovering over a resource in the waterfall analysis, even though the trace is available via the drilldown above the chart.
In such cases, the trace was successfully correlated with the user action, but the matching resource timing could not be identified. This typically occurs when the URL was rewritten and the required Server-Timing
response header—used to identify the resource timing—is missing.
This can happen in the following scenarios:
Server-Timing
header is not supported.
If, after completing the troubleshooting steps above, the trace is still not correlated with its user action, please contact Dynatrace via the in-product chat or by creating a support ticket.
To help our support team investigate efficiently, include the following information:
Providing this information upfront will help accelerate the resolution process.
This is gold. I had to figure out a lot of the information in the past. Now I see this finally publicly documented.