RUM Setup for React Native

The Kloudfuse RUM SDK is available as a package for React Native; include the Kloudfuse RUM SDK dependency in your application.

The Kloudfuse React Native SDK is available as an NPM package.

Install

  1. Use a package manager to install the Kloudfuse React Native SDK.

    $ npm install kf-react-native-sdk
  2. Install the pod.

    $ cd ios && pod install
  3. 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: <APPLICATION_ID>,
        clientToken: <CLIENT_TOKEN>,
        env: <ENV>,
        proxy: <KFUSE_RUM_ENDPOINT>,
        sessionSamplingRate: 100,
        serviceName: <SERVICE_NAME>,
        version: 1.0.0,
    };
    
    export default function App() {
        return (
            <KfProvider config={config}>
                <Navigation />
            </KfProvider>
        );
    }
    javascript

The possible configuration options are:

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, Azure Blob, or Google GCS.

proxy

The Kloudfuse ingest endpoint for RUM events; its value would be https://<kfuse-public-endpoint>/ddrumproxy

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.