RUM Remote Configuration

This product is not supported for your selected Datadog site. ().

Overview

As your application evolves, you may need to adjust the data that the RUM SDK collects and its collection frequency. RUM remote configuration lets you update supported Browser, iOS, and Android SDK settings from Datadog without deploying a new version of your application.

The SDK configuration page listing available Browser RUM settings for remote configuration.

Prerequisites

Remote configuration must be enabled in your organization and requires the following RUM SDK versions:

  • Browser SDK version 7.13.0+
  • iOS SDK version 3.17.0+
  • Android SDK version 3.14.1+
If your network or proxy uses an allowlist, add *.browser-intake-<DC_REGION>-datadoghq.com for your application. This entry covers both RUM data intake and the SDK's remote configuration requests, which use the sdk-configuration. subdomain. For Browser applications, also add this domain to your Content Security Policy.

If this domain is blocked, the SDK can't retrieve remote settings and continues using its local configuration instead, without any visible error.

How it works

Each RUM application has a remote configuration ID that the SDK uses to retrieve its remote settings.

When the SDK initializes, it applies cached remote settings. If no cached settings are available, it uses the settings defined in your application. The SDK checks for updates in the background and stores changes for the next initialization. If the check fails, the SDK retains its existing cache or continues to use its local settings. The check does not delay SDK initialization or interrupt RUM event collection.

Published remote settings override the corresponding settings in your application. Settings that you do not enable remotely continue to use their local values. Enable only the settings that you want to manage from Datadog.

A remote configuration applies to all users and sessions initialized with its ID. You cannot target individual users or sessions. If you change the ID, the SDK treats it as a new configuration and does not use settings cached under the previous ID.

The SDK retrieves remote configuration settings from a public content delivery network (CDN) endpoint. Do not include secrets or personal information in configuration values.

Permissions

Remote configuration uses the same permissions as RUM applications. To enable, edit, or publish a configuration, you need the RUM Apps Write permission. For more information, see Real User Monitoring permissions.

Setup

To configure remote settings for an application:

  1. Install a supported RUM SDK in a new application, or update the SDK in an existing application.

  2. Navigate to RUM > Manage Applications, select an application, and click SDK Configuration.

  3. Enable remote configuration to generate a remote configuration ID. Note: Datadog saves the configuration as a draft, so its values do not override your existing SDK settings before you publish it.

  4. Add the remote configuration ID to your SDK initialization.

    Add a remoteConfiguration object to your existing datadogRum.init() call:

    remoteConfiguration: {
        id: '<REMOTE_CONFIGURATION_ID>',
    },
    

    Add remoteConfiguration to your Datadog.Configuration:

    remoteConfiguration: .init(id: "<REMOTE_CONFIGURATION_ID>")
    

    Call setRemoteConfigurationId() on your Configuration.Builder:

    .setRemoteConfigurationId("<REMOTE_CONFIGURATION_ID>")
    
  5. Update the settings as described in the Change SDK settings with remote configuration section.

  6. Publish the configuration to apply its enabled settings.

Change SDK settings with remote configuration

Remote configuration does not override any SDK settings by default. To manage a setting remotely, explicitly enable its override in Datadog, then configure its value. Settings without an enabled override continue to use the values configured in the SDK.

  1. Enable the override for a setting that you want to manage remotely. Choose from the settings listed in the Configurable settings section for your platform.

    Certain settings require corresponding module imports in the iOS and Android SDKs. If your application does not import these modules, remote configuration does not work for Session Replay, distributed tracing, or profiling.
  2. Configure the setting by selecting a state, changing its sampling rate, or adding data.

  3. Save your changes.

View changes in Audit Trail

Changes to RUM remote configurations appear in Datadog Audit Trail, where you can review who made each change and when.

Configurable settings

Sampling rates

UI labelParameter name
Session Replay sample raterum.sessionReplaySampleRate
Trace sample raterum.traceSampleRate
Profiling sample rateprofiling.sampleRate

Privacy

UI labelParameter name
Default privacy levelrum.defaultPrivacyLevel
Privacy for action namesrum.enablePrivacyForActionName

Event tracking

UI labelParameter name
Track anonymous usersrum.trackAnonymousUser
Track user interactionsrum.trackUserInteractions
Track resourcesrum.trackResources
Track long tasksrum.trackLongTasks
Track sessions across subdomainsrum.trackSessionAcrossSubdomains

App attributes

UI labelParameter name
Action name attributerum.actionNameAttribute
Trace context injectionrum.traceContextInjection
Allowed tracing URLsrum.allowedTracingUrls
Allowed tracking originsrum.allowedTrackingOrigins

Sampling rates

UI labelParameter name
Session Replay sample ratesessionReplay.sampleRate
Continuous profiling sample rateprofiling.continuousSampleRate
App launch profiling sample rateprofiling.applicationLaunchSampleRate
Trace sample ratetrace.sampleRate

Privacy

UI labelParameter name
Text and input privacysessionReplay.textAndInputPrivacy
Image privacysessionReplay.imagePrivacy
Touch privacysessionReplay.touchPrivacy

Event tracking

UI labelParameter name
Track anonymous usersrum.trackAnonymousUser
Track user interactionsrum.trackUserInteractions
Track resourcesrum.trackResources
Track background eventsrum.trackBackgroundEvents
Track frustration signalsrum.trackFrustrations
Track long tasksrum.longTask.enabled
Long task thresholdrum.longTask.threshold
Vitals update frequencyrum.vitalsUpdateFrequency
Track slow framesrum.trackSlowFrames
Track app hangsrum.appHang.enabled
App hang thresholdrum.appHang.threshold
Track watchdog terminationsrum.trackWatchdogTerminations
Track memory warningsrum.trackMemoryWarnings

App attributes

UI labelParameter name
Trace context injectiontrace.traceContextInjection
Allowed tracing URLstrace.tracedHosts

Sampling rates

UI labelParameter name
Profiling sample raterum.profilingSampleRate
Session Replay sample ratesessionReplay.sampleRate
Continuous profiling sample rateprofiling.continuousSampleRate
App launch profiling sample rateprofiling.applicationLaunchSampleRate
Trace sample ratetrace.sampleRate

Privacy

UI labelParameter name
Text and input privacysessionReplay.textAndInputPrivacy
Image privacysessionReplay.imagePrivacy
Touch privacysessionReplay.touchPrivacy

Event tracking

UI labelParameter name
Track anonymous usersrum.trackAnonymousUser
Track user interactionsrum.trackUserInteractions
Track background eventsrum.trackBackgroundEvents
Track frustration signalsrum.trackFrustrations
Track long tasksrum.longTask.enabled
Long task thresholdrum.longTask.threshold
Vitals update frequencyrum.vitalsUpdateFrequency
Track slow framesrum.trackSlowFrames
Crash reportingrum.crashReportsEnabled
Track non-fatal ANRsrum.trackNonFatalAnrs

App attributes

UI labelParameter name
Trace context injectiontrace.traceContextInjection
Allowed tracing URLstrace.tracedHosts

Further reading

Additional helpful documentation, links, and articles: