dartastic_opentelemetry
0.12.0, released 6 weeks ago by dartastic.io
OpenTelemetry SDK for Dart and Flutter for distributed tracing, metrics, and context propagation.
What it does
Provides an OpenTelemetry SDK for Dart and Flutter applications. It enables distributed tracing, metrics collection, OTLP exporters (gRPC/HTTP), and context propagation for observability backends.
AI-written summary of version 0.12.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need standard OpenTelemetry distributed tracing and metrics in Dart or Flutter.
- You want to send telemetry data to an OTLP-compatible backend.
Skip it when
- You do not need observability or distributed tracing in your application.
Strengths
- Standards-compliant with the OpenTelemetry specification.
- Supports all Dart and Flutter targets including mobile, desktop, web, and wasm.
- Provides context propagation across async gaps and Isolates.
Weaknesses
- Requires manual code instrumentation or additional integration packages for automatic monitoring.
- Windows targets need validation.
Setup
- Kind
- Pure Dart
- Effort
- Medium
- Code generation
- No
- Direct dependencies
- 8
Requires initializing the OTel class via code or environment variables.
import 'package:dartastic_opentelemetry/dartastic_opentelemetry.dart';
Future<void> main() async {
await OTel.initialize(serviceName: 'my-service');
final tracer = OTel.tracer();
final span = tracer.startSpan('my-operation');
try {
await tracer.withSpanAsync(span, doWork);
} catch (e, stackTrace) {
span.recordException(e, stackTrace: stackTrace);
span.setStatus(SpanStatusCode.Error, e.toString());
rethrow;
} finally {
span.end();
}
await OTel.shutdown();
}
Future<void> doWork() async {}
Alternatives
Packages that do the same job and could replace dartastic_opentelemetry.
- appsflyer_sdk
Flutter plugin for the AppsFlyer mobile attribution and analytics SDK.
88Compare - singular_flutter_sdk
A Flutter plugin for the Singular SDK to track events, revenue, and deep links.
66Compare - repro_flutter
A plugin for using the Repro Android/iOS SDK in Flutter applications.
65Compare - pendo_sdk
Flutter plugin wrapping Pendo's native SDK for in-app surveys and analytics.
76Compare
Works with
Packages commonly used together with dartastic_opentelemetry: ones it builds on, ones built on it, and its own family.
- webdartastic_opentelemetry depends on itLightweight bindings for browser APIs via JS interop
- fixnumdartastic_opentelemetry depends on itProvides 32‑ and 64‑bit signed fixed‑width integer types for Dart.
- synchronizeddartastic_opentelemetry depends on itLock mechanism to prevent concurrent access to asynchronous code.
- protobufdartastic_opentelemetry depends on itProvides runtime support for Dart protocol buffer messages generated by protoc_plugin.
- grpcdartastic_opentelemetry depends on itDart implementation of gRPC, a high performance universal RPC framework.
- dartastic_opentelemetry_apidartastic_opentelemetry depends on itA Dart OpenTelemetry API that provides a no‑op implementation and strict spec compliance.
- faroBuilt on dartastic_opentelemetryGrafana Faro SDK for Flutter applications to collect telemetry and monitor performance.