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
},
})