If you experience unexpected behavior with Datadog Browser RUM, use this guide to resolve issues quickly. If you continue to have trouble, contact Datadog Support for further assistance. Regularly update to the latest version of the RUM Browser SDK, as each release contains improvements and fixes.

Missing data

If you can’t see any RUM data or if data is missing for some users:

Common causesRecommended fix
Ad blockers prevent the RUM Browser SDK from being downloaded or sending data to Datadog.Some ad blockers extend their restrictions to performance and marketing tracking tools. See the Install the RUM Browser SDK with npm and forward the collected data through a proxy docs.
Network rules, VPNs, or antivirus software can prevent the RUM Browser SDK from being downloaded or sending data to Datadog.Grant access to the endpoints required to download the RUM Browser SDK or to send data. The list of endpoints is available in the Content Security Policy documentation.
Scripts, packages, and clients initialized before the RUM Browser SDK can lead to missed logs, resources, and user actions. For example, initializing ApolloClient before the RUM Browser SDK may result in graphql requests not being logged as XHR resources in the RUM Explorer.Check where the RUM Browser SDK is initialized and consider moving this step earlier in the execution of your application code.
If you’ve set trackViewsManually: true and notice that no sessions are present, the application may have suddenly stopped sending RUM information even though there are no network errors.Be sure to start an initial view once you’ve initialized RUM to prevent any data loss. See Advanced Configuration for more information.

Read the Content Security Policy guidelines and ensure your website grants access to the RUM Browser SDK CDN and the intake endpoint.

The RUM Browser SDK is initialized

Check if the RUM Browser SDK is initialized by running window.DD_RUM.getInternalContext() in your browser console and verify an application_id, session_id, and view object are returned:

Successful get internal context command

If the RUM Browser SDK is not installed, or if it is not successfully initialized, you may see the ReferenceError: DD_RUM is not defined error like the one below:

Error get internal context command

You can also check your browser developer tools console or network tab if you notice any errors related to the loading of the RUM Browser SDK.

Note: To ensure accurate results, set sessionSampleRate to 100. For more information, see Configure Your Setup For Browser RUM and Browser RUM & Session Replay Sampling.

Data to the Datadog intake

The RUM SDK sends batches of event data to Datadog’s intake every time one of these conditions have been met:

  • Every 30 seconds
  • When 50 events have been reached
  • When the payload is >16 kB
  • On visibility:hidden or beforeUnload

If data is being sent, you should see network requests targeting /v1/input (the URL origin part may differ due to RUM configuration) in the Network section of your browser developer tools:

RUM requests to Datadog intake

RUM cookies

The RUM Browser SDK relies on cookies to store session information and follow a user session across different pages. The cookies are first-party (they are set on your domain) and are not used for cross-site tracking. Here are the cookies set by the RUM Browser SDK:

Cookie nameDetails
_dd_sCookie used to group all events generated from a unique user session across multiple pages. It contains the current session ID, whether the session is excluded due to sampling, and the expiration date of the session. The cookie is extended for an extra 15 minutes every time the user interacts with the website, up to the maximum user session duration (4 hours).
dd_site_test_*Temporary cookie used to test for cookie support. Expires instantly.
dd_cookie_test_*Temporary cookie used to test for cookie support. Expires instantly.

Note: The _dd_l, _dd_r, and _dd cookies have been replaced with _dd_s in recent versions of the RUM Browser SDK.

Session IDs, cookies and RUM applications

There is a one-to-one relation between a RUM session and the RUM application it belongs to. Therefore, the domain set for the _dd_s cookie is fully dedicated to the RUM application it is monitoring and cannot monitor any additional applications.

Technical limitations

Each event sent by the RUM Browser SDK is built with the following:

  • RUM global context
  • Event context (if any)
  • Attributes specific to the event

Example:

window.DD_RUM && window.DD_RUM.setGlobalContextProperty('global', {'foo': 'bar'})
window.DD_RUM && window.DD_RUM.addAction('hello', {'action': 'qux'})

The example code creates the following action event:

{
  "type": "action",
  "context": {
    "global": {
      "foo": "bar"
    },
    "action": "qux"
  },
  "action": {
    "id": "xxx",
    "target": {
      "name": "hello"
    },
    "type": "custom"
  },
  ...
}

If an event or a request goes beyond any of the following limitations, it is rejected by the Datadog intake.

PropertyLimitation
Maximum number of attributes per event256
Maximum attribute depth per event20
Maximum event size256 KB
Maximum intake payload size5 MB

The RUM browser SDK allows you to set global context, user information and feature flags which are then included with the collected events.

To minimize the user bandwidth impact, the RUM browser SDK throttles the data sent to the Datadog intake. However, sending large volumes of data can still impact the performance for users on slow internet connections.

For the best user experience, Datadog recommends keeping the size of the global context, user information, and feature flags below 3KiB. If the data exceeds this limit, a warning is displayed: The data exceeds the recommended 3KiB threshold.

Since v5.3.0, the RUM Browser SDK supports data compression via the compressIntakeRequest initialization parameter. When enabled, this recommended limit is extended from 3KiB to 16KiB.

Cross origin read blocking warning

On Chromium-based browsers, when the RUM Browser SDK sends data to the Datadog intake, a CORB warning is printed in the console: Cross-Origin Read Blocking (CORB) blocked cross-origin response.

The warning is shown because the intake returns a non-empty JSON object. This behavior is a reported Chromium issue. It does not impact the RUM Browser SDK and can safely be ignored.

“Deobfuscation failed” warning

A warning appears when deobfuscation fails for a stack trace. If the stack trace is not obfuscated to begin with, you can ignore this warning. Otherwise, use the RUM Debug Symbols page to view all your uploaded source maps. See Investigate Obfuscated Stack Traces with RUM Debug Symbols.

Further Reading

Additional helpful documentation, links, and articles:

PREVIEWING: esther/docs-9478-fix-split-after-example