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
- Add the following code to your
pubspec.yamlfile:
dependencies:
kf_sdk:
- Fetch the SDK:
$ flutter pub get
- 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:
| Option | Description |
|---|---|
| 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 documentation for AWS S3, Azure Blob, or Google GCS. |
| customEndpoint | The Kloudfuse ingest endpoint for RUM events. |
https://<kfuse-public-endpoint>/ddrumproxy |
|
| service | A "friendly" name, unique to the instrumented frontend application. |
| 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. |