To try the preview for RUM Auto-Instrumentation, follow the instructions on this page to set up the SDK injector.

Overview

RUM Auto-Instrumentation works by injecting the RUM Browser SDK into the HTML responses being served through a web server or proxy.

Limitations

Keep in mind the following limitations when using this setup:

  • This instrumentation method does not support advanced RUM configurations, except for allowedTracingUrls and excludedActivityUrls.
  • If your web server is acting as a proxy and the upstream server uses end-to-end encryption (TLS) or content compression (gzip, zstd, Brotli), the RUM Browser SDK may not be injected. To ensure proper instrumentation:
    • Disable content compression on the upstream server.
    • Enable TLS origination on the web server.

Prerequisites

The Datadog Agent is installed and configured.

Set up your RUM application

Auto-Instrumentation leverages a Windows module that injects the RUM SDK into the response body for responses served by the IIS instance.

  1. In Datadog, navigate to the Digital Experience > Add an Application Page and select the JavaScript (JS) application type.
  2. Select Auto-Instrumentation and Windows IIS.
  3. Set up the IIS module using either the GUI installer or command line as described below:
  1. Download the Datadog RUM installer.
  2. Follow the installer as an administrator by opening the .msi file.
  3. Follow the prompts and accept the license agreement.
  4. Set your Session and Session Replay sample rates. See guidance on configuring sampling.
  5. Copy and run the config command shown for each IIS site that you wish to inject RUM into.
  1. Run the Powershell command line as an administrator.
  2. Set your Session and Session Replay sample rates. See guidance on configuring sampling.
  3. Copy and run the config command shown for each IIS site that you wish to inject RUM into.

Updating your RUM application

You can adjust your Session Sampling and Session Replay Sampling rates from the Application Management page.

To update your RUM Application:

  1. Go to your RUM application from the Application Management list.
  2. On the Instrument Your Application page, adjust the slider or enter a specific percentage in the input box for Session Sampling or Session Replay Sampling.
  3. Copy and replace the code in the Datadog RUM config file for the IIS site that you instrumented.

Troubleshooting

RUM is not injected

If you notice that RUM is not being injected into HTML pages, consider the following potential causes:

  • Content-Type mismatch: RUM is injected only into HTML pages. If the Content-Type header does not correctly indicate text/html, the injection is skipped.
  • Upstream server has end-to-end encryption or content compression: See Limitations.
PREVIEWING: rtrieu/auto-instrumentation-updates