RUM Setup for Flutter :: Kloudfuse Docs

RUM Setup for Flutter

The Kloudfuse RUM SDK is available as a plugin for Flutter; include the Kloudfuse RUM SDK dependency in your application.

The Kloudfuse Flutter SDK is available as a Flutter plugin.

Install

  1. Add the following code your pubspec.yaml file:
   dependencies:
        kf_sdk:
  1. Fetch the SDK:
   $ flutter pub get
  1. Initialize the SDK:
   import 'package:kf_sdk/kf_sdk.dart';

void main() async {
        final configuration = KfConfiguration(
          applicationId: '<APPLICATION_ID>',
          clientToken: '<CLIENT_TOKEN>',
          customEndpoint: '<KFUSE_RUM_ENDPOINT>',
          env: '<ENV>',
          sessionSamplingRate: 100,
          service: '<APPLICATION_NAME>',
          env: 'production',
          version: '1.0.0',
        );

await KfSdk.runApp(configuration, KfTrackingContent.granted, () async {
          runApp(MyApp());
        });
   }

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.