farol 0.1.2 copy "farol: ^0.1.2" to clipboard
farol: ^0.1.2 copied to clipboard

Grafana-Faro-compatible Real User Monitoring (RUM) client for Dart, with first-class gRPC support.

example/main.dart

// Minimal usage example for `farol`. See ../README.md for the auth model.
import 'package:farol/farol.dart';

Future<void> main() async {
  Faro.initialize(
    FaroConfig(
      collectorUrl: Uri.parse('https://faro-collector.example.com/collect'),
      app: const FaroApp(name: 'example-app', version: '1.0.0'),
      headersProvider: () async => {'x-api-key': 'replace-me'},
    ),
  );

  Faro.instance.pushEvent('app_started');
  Faro.instance.pushMeasurement('startup', {'duration_ms': 420});
  Faro.instance.setUser(id: 'opaque-user-id');

  await Faro.shutdown();
}
1
likes
160
points
254
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Grafana-Faro-compatible Real User Monitoring (RUM) client for Dart, with first-class gRPC support.

Repository (GitHub)
View/report issues

Topics

#observability #rum #faro #telemetry #monitoring

License

Apache-2.0 (license)

Dependencies

http, meta

More

Packages that depend on farol