RUM Setup for React Native :: Kloudfuse Docs
RUM Setup for React Native
The Kloudfuse RUM SDK for React Native enables you to collect real user monitoring data from your React Native applications. By instrumenting your app with this SDK, you can track user interactions, performance metrics, and errors to understand how your application behaves in production environments. This guide walks you through installing the SDK as an NPM package and configuring it for your React Native application.
The Kloudfuse RUM SDK is available as a package for React Native; include the Kloudfuse RUM SDK dependency in your application.
Install
- Use a package manager to install the Kloudfuse React Native SDK.
$ npm install kf-react-native-sdk
Copied!
Install the pod.
$ cd ios && pod installCopied!
Initialize the SDK in the App.
import { KfProvider } from 'kf-react-native-sdk';
//Wrap the content of your App component in a KfProvider component, passing it your configuration:
const config = {
applicationId:
export default function App() {
return (
javascriptCopied!
The possible configuration options are:
| | |
| --- | --- |
| | After adding new application to RUM, copy the **Integration Code**, and use it to specify the `appId`, `clientToken`, and `service`. See [RUM Add New Application](https://docs.kloudfuse.com/platform/latest/signals/rum/add-application/). |
**applicationId**
A UUID that uniquely identifies a specific frontend application. All RUM telemetry will be associated with it.
**clientToken**
A token that identifies valid producers of RUM telemetry. You may supply the value `dummy` if authenticated ingestion is not enabled during Kloudfuse install. When authenticated ingestion is enabled, this value must match one of the configured authentication tokens for RUM. See our _Enable Authenticated Ingestion_ documentation for [AWS S3](https://docs.kloudfuse.com/platform/latest/signals/rum/enable-aws-s3/#step5), [Azure Blob](https://docs.kloudfuse.com/platform/latest/signals/rum/enable-azure-blob/#step5), or [Google GCS](https://docs.kloudfuse.com/platform/latest/signals/rum/enable-google-gcs/#step5).
**proxy**
The Kloudfuse ingest endpoint for RUM events; its value would be `https://<kfuse-public-endpoint>/ddrumproxy`.
| | |
| --- | --- |
| | Your frontend application **_must not_** restrict `POST` requests to this endpoint. Specifically, when using a `Content-Security-Policy`, your frontend application **_must allow_** requests to this endpoint. |
**service**
A "friendly" name, unique to the instrumented frontend application.
**env**
The name that identifies a logical source of RUM events. For example, the test environment or production environment.
**version**
The string that represents the unique frontend application build, such as 1.0.0.
**sessionSamplingRate**
The Percentage of user sessions that generate RUM telemetry; valid range is 0 to 100.