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.
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
(notRUM token
) and with thepower
role. You will save this token in an environment variable namedSPLUNK_ACCESS_TOKEN
.
Installation
-
Download
splunk-rum
from the splunk-rum-cli repo. This CLI is published to npm as package name@splunk/rum-cli
. -
Install
splunk-rum
in your Linux-based build environment either as:-
A dependency of your build process, and add
splunk-rum
to yourPATH
:npm install @splunk/rum-cli --global
-
A dependency to your existing
package.json
file.Note: A dependency to your existingpackage.json
file. Note: This option is for browser applications only, not mobile applications.npm install @splunk/rum-cli --save-dev
-
-
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:
-
For browser applications, see Set up JavaScript source mapping.
-
For iOS applications, see Add dSYMs.
-
For Android applications, see Add a mapping file.