Browser Monitoring Auto-Instrumentation (Server-Side)
Overview
RUM Auto-Instrumentation works by injecting the RUM Browser SDK into the HTML responses being served through a web server or proxy.
Getting started
Remotely manage your RUM application configurations directly from Datadog, after having them auto-instrumented with the RUM SDK.
If you want to manage RUM configs in your web server files instead, see Non-remote managed applications.
The following configurations can be remotely managed:
- Session sampling rate
- Session Replay sampling rate
- Session Replay privacy setting
- Action name privacy setting
- Environment (attribute)
- Service name (attribute)
To remotely configure your RUM application:
- Make sure you have Remote Configuration enabled in Datadog.
- In Datadog, navigate to the Digital Experience > Add an Application Page and select the JavaScript (JS) application type.
- Select Auto-Instrumentation.
- Configure all desired settings.
- Click Save Changes.
- Click the tab for your web server.
- Copy and run the command shown.
- Restart your web server.
Non-remote managed applications
If you don’t want to configure your RUM applications remotely, follow the documentation for your web server type to configure your RUM application locally:
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 cannot be injected. To ensure proper instrumentation:
- Disable content compression on the upstream server.
- Enable TLS origination on the web server.
Further reading
Additional helpful documentation, links, and articles: