middleware_flutter_opentelemetry 1.2.0
middleware_flutter_opentelemetry: ^1.2.0 copied to clipboard
A Flutter package for OpenTelemetry based on middleware_dart_opentelemetry
Changelog #
1.2.0 #
FlutterOTel.startSessionRecording()/stopSessionRecording()now work on the native v3 path (Android/iOS), where they were previously no-ops — they only drove the Dart recorder used for web and the v3 opt-out.- Added
FlutterOTel.isSessionRecording(). - Recording control is sticky: it survives session rotation and sampler
re-evaluation, and
startSessionRecording()overrides bothenableSessionRecording: falseand the sampler, so a session can be recorded on demand for a single flow. - The
recording/recordingV3resource attributes now follow the live recording state instead of being frozen at init. - Fixed
UIMeterProvider.resourcebeing a no-op setter, which stranded metrics on the init-timesession.idand recording attributes across session rotations. - Removed the unused public
FlutterOTel.isRecordingfield (it was alwaysfalseand never updated); useisSessionRecording(). - Bumped native SDKs to
MiddlewareRum ~> 2.2andio.github.middleware-labs:android-sdk:3.1.0, which add the underlying start/stop recording APIs.
1.1.1 #
- Converted the package from a pure-Dart package to a Flutter plugin with
native Android (
io.github.middleware-labs:android-sdk) and iOS (MiddlewareRum) bridges. - Session recording v3: rrweb-based native recording (
recordingV3resource attribute) replaces the Dart screenshot recorder on Android/iOS; the Dart recorder is still used on web or whendisableSessionRecordingV3is set. - Native session linking: the Dart-owned session id (and rotations) now drive native crash reports, ANR detection, and session replay; screen names from the navigator observer flow into native telemetry and the replay timeline.
- Session policy: inactivity timeout is now 15 minutes (was 5); maximum session duration remains 4 hours — aligned across all Middleware RUM SDKs.
- New
FlutterOTel.initializeoptions:deploymentEnvironment,enableSessionRecording,disableSessionRecordingV3,sessionSamplingRatio,autoCaptureErrors, and nativeRecordingOptions(frequency, quality,maskAllTextInputs,maskAllImages). - Fixed session rotation not updating the OTLP resource: spans, logs, and
metrics emitted after a rotation now carry the new
session.id. - Fixed the navigator observer reporting a stale route after GoRouter
go()navigations (the removed route overwrote the pushed one), and navigation events now report the correctfromRoute. - Fixed logs export on mobile by switching from the gRPC exporter (which dialed the wrong port for https endpoints) to OTLP-HTTP.
- Resource attribute parity with the native SDKs:
recordingV3,osreported asAndroid/iOS, plus native-provided app version, OS version, and device model.
1.0.16 #
- Previous pub.dev release (pure-Dart package).