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 your
pubspec.yaml
file:dependencies: kf_sdk:
yaml -
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()); }); }
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.
- customEndpoint
-
The Kloudfuse ingest endpoint for RUM events.
- 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.