otel_connectivity_plus 0.1.0-beta.1 copy "otel_connectivity_plus: ^0.1.0-beta.1" to clipboard
otel_connectivity_plus: ^0.1.0-beta.1 copied to clipboard

OpenTelemetry instrumentation for `package:connectivity_plus`. Bridges connectivity changes into OTel as events on the active span.

otel_connectivity_plus #

OpenTelemetry instrumentation for package:connectivity_plus.

import 'package:connectivity_plus/connectivity_plus.dart';
import 'package:otel_connectivity_plus/otel_connectivity_plus.dart';

// One-shot check (returns a CLIENT span)
final results = await tracedCheckConnectivity();

// Long-lived listener (adds an event to the active span on each change)
final sub = listenConnectivityTraced();

recordConnectivityResults(results) is the low-level helper — adds a network.connectivity_change event with network.connection.type (e.g. wifi,mobile) to whatever span is currently active.

Connectivity changes are intentionally events on the active span, not standalone spans — a long-lived connectivity span isn't meaningful, but a "user lost wifi in the middle of checkout" event in the checkout trace is gold.

Suppression: runWithoutConnectivityInstrumentation.

License #

Apache 2.0

0
likes
0
points
81
downloads

Publisher

verified publisherdartastic.io

Weekly Downloads

OpenTelemetry instrumentation for `package:connectivity_plus`. Bridges connectivity changes into OTel as events on the active span.

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

connectivity_plus, dartastic_opentelemetry, dartastic_opentelemetry_api, flutter

More

Packages that depend on otel_connectivity_plus