skywalking_flutter 0.1.3 copy "skywalking_flutter: ^0.1.3" to clipboard
skywalking_flutter: ^0.1.3 copied to clipboard

OpenTelemetry OTLP/HTTP agent for Dart and Flutter apps (SkyWalking OAP compatible).

example/lib/main.dart

import 'package:skywalking_flutter/skywalking_flutter.dart';

/// Minimal CLI demo: one span + counter, then flush to OAP (default 127.0.0.1:12800).
Future<void> main() async {
  final agent = OtlpAgent.init(
    const OtlpExporterConfig(
      serviceName: 'skywalking-flutter-example',
      otlpEndpoint: 'http://127.0.0.1:12800',
      deploymentEnvironment: 'dev',
      flushInterval: Duration(seconds: 1),
    ),
  );

  await agent.tracer.withSpan('example.run', (_) async {
    agent.meter.addCounter('example.runs');
  });
  await agent.flush();
  await agent.shutdown();

  // ignore: avoid_print
  print('OK — check OAP Zipkin for service skywalking-flutter-example');
}
1
likes
160
points
134
downloads

Documentation

Documentation
API reference

Publisher

unverified uploader

Weekly Downloads

OpenTelemetry OTLP/HTTP agent for Dart and Flutter apps (SkyWalking OAP compatible).

Repository (GitHub)
View/report issues

Topics

#opentelemetry #otlp #skywalking #tracing #flutter

License

Apache-2.0 (license)

Dependencies

http

More

Packages that depend on skywalking_flutter