Upgrade to Splunk RUM browser agent version 1.0.0

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 the breaking changes and provides code examples for upgrading from previous versions.

Your browser applications are using a pre-1.0.0 version of the Splunk RUM browser agent.

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:

OptionReplacement
appapplicationName
beaconUrlbeaconEndpoint
environmentdeploymentEnvironment
rumAuthrumAccessToken
_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, and keydown events
  • Removed configuration options _experimental_allSpansExtendSession and _experimental_longtaskNoStartSession
Changes to the session recorder module
  • The agent now uses the new built-in session recorder module and has removed the rrweb module 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
  1. Download the new agent from the SignalFX or NPM repository.
  2. Update your configuration options as in the example below.

    Before:

    SplunkRum.init({
      app: 'my-app',
      beaconUrl: 'https://...',
      environment: 'production',
      rumAuth: 'token',
    })
    

    After:

    SplunkRum.init({
      applicationName: 'my-app',
      beaconEndpoint: 'https://...',
      deploymentEnvironment: 'production',
      rumAccessToken: 'token',
    })
  3. Update your API calls as in the example below.

    Before:

    SplunkRum._experimental_getGlobalAttributes()
    SplunkRum.error('Something went wrong')
    

    After:

    SplunkRum.getGlobalAttributes()
    SplunkRum.reportError('Something went wrong')