Instrument mobile and web applications for Splunk RUM

Instrument your mobile or web application to send front-end application data to Splunk Observability Cloud real user monitoring / RUM.

Instrument your mobile and web applications to send data to Splunk Real User Monitoring (RUM). Splunk RUM provides visibility into the user behaviors in mobile and web applications. To learn more about Splunk RUM, see Introduction to Splunk RUM.

Splunk RUM instrumentation sends traces from web and mobile applications to Splunk Observability Cloud.

Splunk RUM instrumentation encompasses web applications, mobile applications, and React Native applications. RUM instrumentation sends traces from these applications to Splunk RUM. Splunk APM and Splunk RUM send server-timing data between each other.

Available front-end instrumentations

You can instrument the following types of application:

Install the splunk-rum CLI

The splunk-rum CLI is a tool for enabling automatic source mapping of your browser, iOS, and Android applications at instrumentation time. Although you can upload source mapping information "on demand" manually through the UI, the best practice is to integrate the use of this CLI into the CI pipeline of your application. By integrating splunk-rum commands into your CI pipeline, you automate the steps you need to take to enable Splunk RUM to convert stack traces from your browser and mobile applications into human-readable form, and you ensure that this source mapping information always matches your production binaries.

Prerequisites

  • Install Node v18+ on your build machine.

  • Get an organization access token with an authorization scope of API token (not RUM token) and with the power role. You will save this token in an environment variable named SPLUNK_ACCESS_TOKEN.

Installation

  1. Download splunk-rum from the splunk-rum-cli repo. This CLI is published to npm as package name @splunk/rum-cli.

  2. Install splunk-rum in your Linux-based build environment either as:

    • A dependency of your build process, and add splunk-rum to your PATH:
      npm install @splunk/rum-cli --global
    • A dependency to your existing package.json file.

      Note: A dependency to your existing package.json file. Note: This option is for browser applications only, not mobile applications.
      npm install @splunk/rum-cli --save-dev
  3. Set these environment variables:

    export SPLUNK_ACCESS_TOKEN=your-splunk-observability-token
    export SPLUNK_REALM=your-splunk-observability-realm

Next steps

To use splunk-rum to upload your application's mapping files to Splunk RUM, follow the steps corresponding to your application's platform: