Skip to main content

monoscope_flutter 0.3.1 copy "monoscope_flutter: ^0.3.1" to clipboard
monoscope_flutter: ^0.3.1 copied to clipboard

Monoscope SDK for Flutter: OpenTelemetry tracing, error and crash reporting, and session replay.

0.3.1 #

  • Default endpoint is now https://otel.monoscopehq.com, a Cloudflare-fronted ingest host: TLS terminates near the device, then traffic rides warm connections to the collector. Set exporterEndpoint to keep the old host.

0.3.0 #

Traces are trees now, instead of a pile of single-span roots.

  • screen spans. A long-lived root span per screen adopts every otherwise parentless span, so one trace covers everything that happened on a screen — the startup, the requests, your own spans, the errors, the navigation away. Previously each of those began its own trace, and the trace list showed a page of one-span traces. This is the counterpart to the browser SDK's pageview span. Navigation rolls the trace; so does backgrounding the app, and a 30 minute cap, since a span only exports once it ends.
  • app.start span covering SDK init to the first rendered frame — the mobile counterpart to the browser SDK's document-load span.
  • frozen_frame and slow_frame spans, the counterpart to long-task spans. Frozen frames (>700 ms) are reported by default; slow frames (>16.7 ms) are opt-in via captureSlowFrames, because a janky scroll produces hundreds.
  • A request is no longer traced twice. MonoscopeClient wraps IOClient, which builds its HttpClient through the global override, so both layers saw every request and each span'd it — two nested spans per call, doubling every latency figure. The client now claims the request and the override stands down.
  • Spans carry screen.id and screen.route.
  • emitTimedSpan records work that is only observable after it finished.

0.2.1 #

Fixes that only showed up when watching a recording of a real app rather than checking event shapes.

  • Navigation no longer freezes playback. A route change emitted a bare rrweb Meta event to place a timeline marker, but in rrweb a meta event announces a new page: the player resets its node mirror and waits for a full snapshot. Every navigation therefore orphaned the image node, and all later frames were dropped with "node not found" — the replay froze on the last screen before the first navigation. A navigation now forces a paired meta + snapshot, which keeps the marker and re-establishes the document. Tested by an invariant over the event stream: every meta is immediately followed by a full snapshot.
  • Covered screens are no longer redacted. Flutter keeps routes below the top of the navigator stack mounted, and a page transition leaves them at opacity 0 rather than marking them offstage. Text fields on those screens were still found and painted as black bars over whatever screen the user was actually looking at. Hidden subtrees are now skipped.
  • Redaction keeps up with scrolling. Rasterizing is asynchronous, so a fling could advance the layout between locating a text field and the pixels being produced, leaving the bar behind the field. Masks are now the union of the positions before and after the capture, so the field is covered wherever it ended up.
  • Redaction rectangles are clipped to the captured area, instead of being clamped during encoding and smeared along the nearest edge.
  • captureFrameNow() returns the in-flight capture instead of returning early when one is already running, so awaiting it means a capture actually finished.
  • tool/extract_frames.py decodes a stored session into image files. Event counts cannot tell you whether a replay shows the app; looking at the frames can.

0.2.0 #

Closes the gaps left by the first release.

  • Native crash capture. Crashes that kill the process before Dart can react are recorded by native handlers and reported on the next launch. Android captures uncaught JVM/Kotlin exceptions; iOS and macOS capture fatal POSIX signals and uncaught NSExceptions. Every handler chains to whatever was installed before it, so the OS still writes its own report and the process still dies. crashNativelyForTesting() verifies the path end to end.
  • Performance metrics. Frame build and raster timings, slow and frozen frame counts, and time to first frame, exported as OTLP/HTTP metrics. This is the mobile counterpart to the browser SDK's Core Web Vitals. Custom histograms and counters can be recorded alongside them.
  • App-wide HTTP tracing. Overriding the dart:io HttpClient factory traces package:http, Dio and raw dart:io with no call-site changes, and chains to any override the app already installed. MonoscopeClient remains for Flutter Web and for tracing a single client. Monoscope's own ingest endpoints are excluded, so an upload cannot trigger the export that uploads it.
  • Exporter diagnostics are surfaced under debug: true. The OpenTelemetry SDK reports failed exports through package:logging, which prints nothing unless something listens — a rejected batch used to be completely silent.
  • MonoscopeReplay counts accepted uploads (uploadedBatches, uploadedEvents), so a working pipeline is distinguishable from one quietly re-queueing every batch.
  • Replay uploads no longer retry across a session rotation, which would have spliced frames from an ended session into a new recording.

0.1.0 #

Initial release.

  • OpenTelemetry tracing over OTLP/HTTP, with head-based ratio sampling and session.id, tab.id, user.* and tenant.* on every span.
  • Error and crash reporting from FlutterError.onError and PlatformDispatcher.onError, with breadcrumbs, plus captureException for errors the app handles itself.
  • Session replay: screenshot frames encoded as rrweb events, so recordings play back in Monoscope's existing player. Text fields are redacted by default.
  • Session identity with 30-minute inactivity rotation, persisted across restarts.
  • MonoscopeNavigatorObserver for route tracking, contributing navigation spans, breadcrumbs and replay timeline markers.
  • MonoscopeClient, an http.Client wrapper that traces requests and propagates W3C trace context to instrumented backends.
0
likes
150
points
69
downloads

Documentation

Documentation
API reference

Publisher

unverified uploader

Weekly Downloads

Monoscope SDK for Flutter: OpenTelemetry tracing, error and crash reporting, and session replay.

Homepage
Repository (GitHub)
View/report issues

Topics

#opentelemetry #observability #monitoring #session-replay #tracing

License

MIT (license)

Dependencies

fixnum, flutter, http, image, logging, meta, opentelemetry, shared_preferences, uuid

More

Packages that depend on monoscope_flutter

Packages that implement monoscope_flutter