Upgrade the Splunk RUM browser agent
Upgrade your applications and build environment to use a newer version of the Splunk RUM browser agent.
Your browser applications are using a pre-1.0.0 version of the Splunk RUM browser agent. Version 1.0.0 marks the first stable release of the Splunk OpenTelemetry JavaScript Web SDK. This release graduates the SDK out of beta, removes deprecated APIs, introduces stable replacements, and improves session management and recording.
This guide walks you through breaking changes and provides code examples for upgrading from older versions.
Breaking changes in version 1.0.0
Version 1.0.0 of the Splunk RUM for browser agent contains the following updates:
- Removed deprecated agent configuration options and APIs
-
Deprecated agent configuration options:
Option Replacement appapplicationNamebeaconUrlbeaconEndpointenvironmentdeploymentEnvironmentrumAuthrumAccessToken_experimental_allSpansExtendSessionNone _experimental_longtaskNoStartSessionNone Deprecated agent APIs, including
_experimental_*APIs:API (method) Replacement SplunkRum.error()SplunkRum.reportError()SplunkRum._experimental_addEventListener()SplunkRum.addEventListener()SplunkRum._experimental_getGlobalAttributes()SplunkRum.getGlobalAttributes()SplunkRum._experimental_getSessionId()SplunkRum.getSessionId()SplunkRum._experimental_removeEventListener()SplunkRum.removeEventListener() - Changes to supported browsers
-
- Removed support for Internet Explorer and other legacy browsers
- Removed the legacy build
- Changes to the session lifecycle module
-
- Sessions now extend only on
click,scroll,touch, andkeydownevents - Removed configuration options
_experimental_allSpansExtendSessionand_experimental_longtaskNoStartSession
- Sessions now extend only on
- Changes to the session recorder module
-
- The agent now uses the new built-in session recorder module and has removed the
rrwebmodule and its dependency. See Record browser sessions. - Removed the module configuration option
recorderType - Failed replay data is now stored in local storage (limit: 2MB) and re-sent after reload
- The agent now uses the new built-in session recorder module and has removed the
Breaking changes in version 2.0.0
If you haven't already done so, upgrade your applications for the breaking changes introduced in version 1.0.0. Version 2.0.0 doesn't introduce breaking changes in the traditional sense, but it does activate anonymous user ID tracking, which might be a breaking change for you, since the data is stored in a cookie. To deactivate this, update your configuration options:
SplunkRum.init({
realm: 'your-splunk-realm',
rumAccessToken: 'your-splunk-rum-access-token',
user: {
trackingMode: 'noTracking', // Opt out of anonymous tracking
},
})
Breaking changes in version 3.0.0
-
Domain migration from
signalfx.comtoobservability.splunkcloud.com -
All endpoints have moved to new domains:
Old domain Replacement cdn.signalfx.comcdn.observability.splunkcloud.comrum-ingest.{realm}.signalfx.comrum-ingest.{realm}.observability.splunkcloud.comapi.{realm}.signalfx.comapi.{realm}.observability.splunkcloud.comrum-ingest.{realm}.signalfx.comrum-ingest.{realm}.observability.splunkcloud.com - Content Security Policy (CSP)
-
If your application uses a content security policy (CSP), update these directives before upgrading:
The old
Directive What to update script-srcAdd cdn.observability.splunkcloud.comto load the agent and session replay using CDNconnect-srcAdd rum-ingest.{realm}.observability.splunkcloud.comsignalfx.comdomains can be removed from your policy after all agents are upgraded. -
Discontinuing
latestCDN tag -
The
latesttag will not receive any future updates. Migrate to a versioned URL on the new CDN domain to use the most updated version:Available version locks:CODE<script src="https://cdn.observability.splunkcloud.com/o11y-gdi-rum/v3/splunk-otel-web.js"></script>v3— major version lock (recommended), receives all minor and patch updatesv3.0— minor version lock, receives patch updates onlyv3.0.0— exact version pin
- OTLP exporter enabled by default
-
- OTLP is now the default export format when
beaconEndpointis not specified. Setexporter.otlp: falseto opt out of this default. - A deprecation warning displays when
beaconEndpointis provided withoutexporter.otlp: true spaMetricsnow defaults to true. SPA route metrics are collected by default.
- OTLP is now the default export format when
- Experimental flags enabled by default
-
- LCP, CLS, and INP spans are anchored to the
documentLoadspan timestamp by defaultOption Replacement _experimental_adjustSessionStartToTimeOriginadjustSessionStartToTimeOrigin_experimental_discardDataAfterInactivitydiscardDataAfterInactivityexperimental_alignWebVitalsSpansWithDocumentLoadinstrumentations.webvitals.alignWebVitalsSpansWithDocumentLoad
- LCP, CLS, and INP spans are anchored to the
Upgrade steps
signalfx, and the new endpoints have the domain observability.splunkcloud. Thus, you can use the legacy ingest endpoint ingest.realm.signalfx.com or the new ingest endpoint ingest.realm.observability.splunkcloud.com. See Splunk Observability Cloud domain change for more information.