cx_flutter_plugin 0.9.1 copy "cx_flutter_plugin: ^0.9.1" to clipboard
cx_flutter_plugin: ^0.9.1 copied to clipboard

The Coralogix SDK for Flutter is designed to support various Flutter targets by leveraging the numerous platforms supported by Coralogix's native SDKs.

Changelog #

0.9.1 #

Release Date: June 21, 2026

  • Bug fix: Android build failed for consumers on Kotlin 2.x (K2 compiler). An internal helper used an expression body containing early return null short-circuits, which the K2 compiler (Kotlin 2.2+) rejects as a hard error (Returns are not allowed for functions with expression body), breaking :cx_flutter_plugin:compileDebugKotlin. Converted to a block body — logic is unchanged.
  • Build fix: removed mavenLocal() and a local-repo block from android/build.gradle. These were accidentally shipped; dependency resolution now relies on google() / mavenCentral() as intended.

0.9.0 #

Release Date: June 18, 2026

  • New: automatic view tracking via CxNavigatorObserver. Add CxNavigatorObserver to your app's navigatorObservers and screen changes are reported to the SDK automatically — no manual setView per page. Only PageRoutes are tracked (dialogs, bottom sheets and popups are not treated as a screen change); the view name comes from RouteSettings.name, and unnamed routes are skipped. Pass a nameExtractor to derive the name differently, or to skip a route by returning null. A throwing nameExtractor is caught and reported via FlutterError.reportError, so it can never break navigation. This drives the native product-analytics fields (view_number, isNavigationEvent) exactly as a manual setView does.

0.8.0 #

Release Date: June 18, 2026

  • beforeSend now realigns OTel span attributes (Flutter parity with the native fix). When a beforeSend callback edits a network or custom-span event, the change is mirrored onto the event's instrumentation_data.otelSpan.attributes so the OTel span carried in the same payload matches the modified text.cx_rum. Previously this realignment ran only on the synchronous native path; Flutter's asynchronous beforeSend skipped it, so OTel attributes kept their pre-edit values. The realign re-derives the cx_rum.* attribute keys (labels, environment, version metadata, user / event / error / network-request context) from the post-callback event; keys the callback removes are dropped from the span.
  • Bug fix: custom-span events were dropped during beforeSend. CoralogixEventType was missing the custom-span value, so custom-span events failed to decode in the beforeSend round-trip and were silently skipped. Added the enum value and its mapping.

0.7.0 #

Release Date: June 18, 2026

  • Session Replay: Flutter-native masking. Masking is performed Dart-side against the real render tree and composited into a pre-masked bitmap, replacing the previous pull-based region/OCR path. CXSessionReplayOptions is the single source of truth for what gets masked — maskAllTexts, textsToMask (regex), maskAllImages, plus the MaskedWidget wrapper. Fixes over-masking of text on routes hidden behind the current screen and mask/scroll misalignment during fast scrolling.
  • Session Replay: iOS scroll-lag fix. The capture cycle produced full-device-resolution bitmaps and could stack overlapping captures during fast scrolling, causing jank. Frames are now captured at the resolution the native SDK keeps (≈ logical size × captureScale), with an in-flight guard, a per-capture timeout that self-heals if the engine never commits a frame, and scroll-skip. Masks are drawn with isAntiAlias = false on integer-snapped rects to avoid sub-pixel edge leaks.
  • Deprecated registerMaskRegion / unregisterMaskRegion. Masking is applied automatically now; the native handlers were removed in the bitmap-provider rework, so these are no-ops (they log) and will be removed in a future release.
  • Native iOS SDK upgraded to 2.9.1 (Coralogix, CoralogixInternal, SessionReplay).
  • Native Android SDK upgraded to 2.16.1.

0.6.0 #

Release Date: June 4, 2026

  • Bug fix: reportError now honours its public contract on both platforms. Previously, calling CxFlutterPlugin.reportError(message, data, stackTrace) with a non-empty stack trace silently dropped the data map — the parsed frames went to native but the custom attributes did not. The iOS and Android bridges now thread data through into the new customAttributes parameter on the native error decorators, so a single RUM error event carries both the parsed frames and the data attributes.
  • Native iOS SDK upgraded to 2.7.0 (Coralogix, CoralogixInternal, SessionReplay) — required for reportError(... customAttributes:) overloads.
  • Native Android SDK upgraded to 2.13.0 — required for the customAttributes field on CoralogixErrorDecorator.

0.5.1 #

Release Date: May 19, 2026

  • Bug fix (follow-up): obfuscated virt addresses were wrong on iOS. The 0.4.2 fix computed virt = offset + (isolate_instructions − isolate_dso_base). On Android this coincidentally equals the ELF VMA of _kDartIsolateSnapshotInstructions (libapp.so is loaded with matching layout), but on iOS the Dart snapshots are linked into the Runner Mach-O at a different VMA — the result was off by ~1.3 MB and resolved to the wrong symbols. The parser now emits virt in the canonical dart symbolize form <symbol>+0x<offset> (e.g. _kDartIsolateSnapshotInstructions+0x2d01ef); the server reads the symbol's ELF VMA from the uploaded debug-info file and adds the offset. Server-side update required to accept the new format alongside legacy numeric virt during rollout.
  • Bug fix: parser dropped every frame on Android. Android's Dart runtime emits an extra virt ADDR token between abs ADDR and the symbol suffix (iOS does not). The frame regex now allows this optional middle token.
  • Behavioural change: engine / framework frames are now skipped at parse time. Frames without a _kDartIsolateSnapshotInstructions / _kDartVmSnapshotInstructions suffix (Flutter engine, OS frameworks) live in different DSOs and cannot be resolved against the app's symbols file — emitting virt values for them was producing addresses pointing at DATA sections. The parsed stack trace now carries dropped_frame_count so consumers can distinguish "all frames filtered" from "parser found nothing" when frames is empty (omitted from the map when zero).

0.5.0 #

Release Date: May 13, 2026

  • New: excludeFromSampling on CXExporterOptions. Lets the SDK keep emitting selected instrumentation categories even when the session is sampled out via sdkSampler. Supported categories: errors, logs, network, userInteractions, mobileVitals, customSpan, customMeasurement. Defaults to an empty list — the sampler gates everything as before. Mirrors the iOS and Android native APIs added in their 3.8.0 / 2.12.0 releases.
  • New: Time Measurement API. CxFlutterPlugin.startTimeMeasure(name, {labels}) and CxFlutterPlugin.endTimeMeasure(name) bracket arbitrary spans of work; the native SDK reports the duration as a custom-measurement span (milliseconds). Pure bridge pass-through — no Dart-side state, native owns the in-flight registry. Empty / whitespace-only names and duplicate start for an in-flight name are ignored (first wins). Callers are responsible for pairing every start with exactly one end.
  • Native iOS SDK upgraded to 2.6.4 (Coralogix, CoralogixInternal, SessionReplay).

0.4.2 #

Release Date: May 11, 2026

  • Bug fix (iOS Session Replay scroll lag): Resolved by native iOS SDK upgrade. Long scroll sessions with Session Replay enabled no longer jank, particularly on screens with mixed-script (RTL / CJK) text content.
  • Bug fix (obfuscated stack trace virt addresses): Some production traces emitted an abs field that did not equal isolate_instructions + offset, so the previous abs − isolate_dso_base formula produced incorrect virtual addresses and the server-side symbolicator returned the wrong source mappings. The parser now computes virt = offset + (isolate_instructions − isolate_dso_base) from the per-frame _kDartIsolateSnapshotInstructions+0xNNN suffix — the authoritative source — and falls back to abs − isolate_dso_base only when the offset suffix or isolate_instructions header is missing.
  • Native iOS SDK upgraded to 2.6.3 (Coralogix, CoralogixInternal, SessionReplay).
  • Native Android SDK upgraded to 2.12.0.

0.4.1 #

Release Date: May 6, 2026

  • New (Android): maskAllTexts and textsToMask now work in Flutter. Flutter renders entirely inside FlutterSurfaceView, so the native Android SDK's View-hierarchy traversal finds no TextViews. The Flutter layer now walks the live render tree on every frame capture and returns bounding rects for all visible RenderParagraph / RenderEditable nodes directly to the native flutterMaskRegionsProvider. Icon glyphs (Unicode Private Use Area), content scrolled behind the AppBar or outside any scroll viewport, and content on covered Navigator routes are all excluded automatically. iOS is unaffected — the native iOS SDK handles text masking itself.
  • textsToMask accepts regex patterns. Each entry is compiled as a RegExp; plain strings like 'password' match any text containing that word. Invalid patterns are silently skipped rather than crashing SDK initialisation.
  • Text fields (RenderEditable) are always masked when textsToMask is active. Reading live text field content to filter against patterns would mean inspecting potentially sensitive data (passwords, PINs) to decide whether to mask it — so all editable inputs are masked unconditionally whenever any textsToMask pattern is configured.
  • Bug fix: sentinel registration race. SessionReplayMasking.initialize() is now async and awaits the sentinel registerMaskRegion call before returning, eliminating a race where the very first captured frame could be unmasked.
  • Sentinel registration failure now logged. Previously swallowed silently; a debugPrint warning is now emitted if the sentinel fails to register.

0.4.0 #

Release Date: May 3, 2026

  • New: Custom Spans public API. CxFlutterPlugin.getCustomTracer({ignoredInstruments}) returns a CoralogixCustomTracer when traceParentInHeader.enable is true. From there, tracer.startGlobalSpan(name, {labels}) creates a root CoralogixGlobalSpan exposing spanId/traceId; globalSpan.startCustomSpan(name, {labels}) creates child CoralogixCustomSpans; globalSpan.withContext(block) runs Dart work in a Zone whose async chain inherits the active span's id; and endSpan() closes spans on the native SDK. Mirrors the browser SDK contract — only one tracer per SDK lifecycle is allowed; subsequent getCustomTracer calls return the cached instance.
  • New: CoralogixIgnoredInstrument enum (networkRequests, userInteractions, errors) — pass to getCustomTracer to opt specific Dart-side instrumentation out of inheriting the active custom span.
  • HTTP/Dio inherit the active custom span automatically. CxHttpClient and CxDioInterceptor now read the active global span via Utils.resolveTraceId(), inject traceparent carrying the inherited traceId, and attach customTraceId/customSpanId to every network event. Bare http.get() / raw Dio still bypass — wrap in CxHttpClient / CxDioInterceptor to keep the trace linked.
  • New: CXExporterOptions.tracesExporter callback. When provided, the native SDK streams completed OTLP-style trace batches over a new cx_flutter_plugin/onTracesExporter EventChannel. Caller is responsible for forwarding to a Coralogix OTLP endpoint. Additive — does not replace the normal RUM log pipeline.
  • Bug fix (iOS scroll freeze with session recording): Resolved by native iOS SDK upgrade.
  • Bug fix (Android custom span lifecycle parity): shutdown() now ends tracked spans on Android (was iOS-only); avoids dangling spans after Dart-side CxFlutterPlugin.shutdown().
  • Bug fix (Android child span ids): startCustomSpan now returns the real OTel spanId/traceId from the underlying span instead of a fabricated hex — cross-system trace correlation now works on Android the same as iOS.
  • Bug fix (endSpan idempotence): Both platforms now succeed silently when a spanId is already untracked (e.g. ended by the 30s idle timer, by removeAll() on shutdown, or by a duplicate Dart-side call). Previously iOS threw unknown_span.
  • Docs (Custom Spans): Added a full README usage guide for getCustomTracerstartGlobalSpanwithContext + CxHttpClientstartCustomSpanendSpan, including ignoredInstruments behavior and traceParentInHeader prerequisite.
  • Docs (Traces Exporter): Added README guidance for configuring CXExporterOptions.tracesExporter and consuming OTLP-style batch payloads from the EventChannel bridge.
  • Dartdoc coverage (public API): Expanded docs for CoralogixCustomTracer, CoralogixGlobalSpan, CoralogixCustomSpan, and CoralogixIgnoredInstrument so custom-spans API behavior and intent are explicit in generated docs.
  • Native iOS SDK upgraded to 2.6.2 (Coralogix, CoralogixInternal, SessionReplay).
  • Native Android SDK upgraded to 2.11.1.

0.3.3 #

Release Date: April 5, 2026

  • Bug fix (release mode errors sent as log): In release builds, caught exceptions produced empty stack trace frames, causing the iOS bridge to fall through to reportError(message:data:) which the native SDK recorded as a log event instead of an error. The bridge now always routes through the error path when a parsed stack trace is present.
  • Bug fix (release mode stack frames empty): The symbolicated frame regex required a column number, but Dart AOT (release) stack traces omit it. The parser now treats column numbers as optional so frames are populated correctly in release builds.
  • version bump script: Added scripts/bump_version.sh to keep pubspec.yaml, lib/plugin_version.dart, and ios/cx_flutter_plugin.podspec in sync.
  • Xcode ObfuscatedRelease configuration: Added ObfuscatedRelease build configuration to the example app for easy switching between symbolicated and obfuscated builds.

0.3.2 #

Release Date: March 31, 2026

  • Bug fix (obfuscated stack traces): Frame addresses were always empty when reporting obfuscated Dart errors. The stack trace parser now correctly matches the Dart VM's abs-only frame format (introduced in Dart 3.x) and computes virtual addresses (abs − isolate_dso_base) expected by both the iOS and Android native SDKs.
  • Bug fix (publish workflow): Release CI failed with a missing .env asset error when validating the example app. A stub .env file is now created before the validation step.

0.3.1 #

Release Date: March 26, 2026

  • Bug fix: fragments field in network events was always empty. Both CxDioInterceptor and CxHttpClient now correctly report the URL path (e.g. /some/path) instead of the URI fragment.

0.3.0 #

Release Date: March 26, 2026

  • Obfuscated error stack traces: Obfuscated stack traces now propagate and are exported correctly via the iOS bridge key centralisation.
  • Performance (iOS): Fixed scroll lag caused by interaction tracking. The swipe-context widget tree walk is now performed once at pointer-down and cached, instead of running on every pointer-up/cancel. This eliminates main-thread jank during fast list scrolling when userActions is enabled.

0.2.0 #

Release Date: March 23, 2026

  • CxDioInterceptor: New interceptor for Dio HTTP client. Add CxDioInterceptor() to your Dio instance to automatically capture network requests, generate RUM spans, and inject W3C traceparent headers — no migration from your existing networking layer required.
  • NetworkCaptureRule: New networkCaptureConfig option on CXExporterOptions. Supply a list of CxNetworkCaptureRule objects to control which headers and payloads are captured per URL. Rules are matched in order (first match wins); when no rules are configured, no headers or payloads are captured. Bodies over 1024 characters are dropped entirely.
  • Expanded network context: Both CxHttpClient and CxDioInterceptor now report status_text, request_headers, response_headers, request_payload, response_payload, and error_message. traceId/spanId are forwarded to the native Android SDK.
  • beforeSend is now optional: When omitted, events are sent directly without a Dart-side round-trip, reducing platform channel overhead. Migration: if you relied on the implicit pass-through, set beforeSend: (event) => event explicitly.
  • iOS setUserInteraction dispatched to main thread: Fixes Main Thread Checker warning caused by UIKit access on the background method-channel queue.
  • iOS networkExtraConfig parsing: networkCaptureConfig rules are now parsed and forwarded to the native iOS SDK during initSdk.
  • Performance (Android): CoralogixRum.initialize, Session Replay init, and captureScreenshot run on the main looper. reportError and sendCxSpanData run on a dedicated background executor.
  • Performance (iOS): Method channel uses a background task queue when available. CoralogixRum initialization is dispatched to the main queue from background handlers.
  • Native iOS SDK upgraded to 2.3.3
  • Native Android SDK upgraded to 2.9.3

0.1.1 #

  • Hybrid user interaction: When user enables userActions in options, Dart tracks click/scroll/swipe; iOS always receives userActions: false to avoid duplicate events.
  • setUserInteraction: iOS forwards interaction payload to native SDK (2.2.0). Android forwards via reportUserInteraction (native SDK 2.9.0); returns error when event_name is missing or when SDK is not initialized (iOS).
  • Context types aligned with native: EventContext source; DeviceContext operating_system/os_version, network_connection_type/network_connection_subtype, user_agent; ErrorContext exception_type; NetworkRequestContext request_headers/response_headers/request_payload/response_payload; InteractionContext target_element, element_classes, target_element_inner_text, scroll_direction with toJson() omitting nulls for beforeSend round-trip.
  • Native iOS SDK 2.2.0; native Android SDK 2.9.0.
  • Android: compileSdk 36 (plugin and example).

0.1.0 #

Added Android support for allowedTracingUrls in TraceParentInHeader configurations Native Android SDK upgraded to 2.7.2 Native iOS SDK upgraded to 2.1.0

0.0.21 #

Added support for session replay

0.0.20 #

Added the AP3 domain as an option for initializing the SDK with

0.0.19 #

Breaking Change: Flutter SDK Requirement

  • The package now requires Flutter >=3.27.0 (as specified in pubspec.yaml environment: flutter: '>=3.27.0')
  • This requirement is necessary to support the modern Color.withValues(alpha: ...) API, which replaced the deprecated Color.withOpacity() method
  • The example app has been updated to use Color.withValues() for future compatibility
  • Native iOS SDK upgraded to 1.5.3
  • Bug fix: https://github.com/coralogix/cx-flutter-plugin/issues/37#issue-3715310863 Release Date: Jan 21, 2026

0.0.18 #

Release Date: Dec 10, 2025

Fix bug Native android SDK upgraded to 2.6.3

0.0.17 #

Release Date: Nov 13, 2025

Fix bug Native iOS SDK upgraded to 1.4.0

0.0.16 #

Release Date: Sep 28, 2025

Add sendCustomMeasurement Native iOS SDK upgraded to 1.2.6

0.0.15 #

Release Date: Sep 21, 2025

Native iOS SDK upgraded to 1.2.5

0.0.14 #

Release Date: Aug 10, 2025

Native iOS SDK upgraded to 1.1.2

0.0.13 #

Release Date: July 24, 2025

  • fix: Android plugin now respect setting the userActions interaction to false and thus actually turning it off Native Android SDK upgraded to 2.4.44

0.0.12 #

Release Date: unknown

  • New Feature add support for proxyUrl
  • New Feature traceParentInHeader (iOS Only) Native iOS SDK upgraded to 1.0.26

0.0.11 #

Release Date: June 22, 2025

  • Bug fixes Native iOS SDK upgraded to 1.0.24

0.0.10 #

Release Date: June 17, 2025

  • Bug fixes - beforeSend not sending instrumentation in android and iOS
  • Crash fix on Android

Native Android SDK upgraded to 2.4.41 Native iOS SDK upgraded to 1.0.23

0.0.9 #

Release Date: May 28, 2025

  • Added Android support for the beforeSend operation
  • Bug fixes and improvements

Native Android SDK upgraded to 2.4.4

0.0.8 #

Release Date: May 27, 2025

Added Android support for newly added methods:

  • getLabels()
  • getSessionId()
  • isInitialized()
  • setApplicationContext()
  • Disable swizzling for iOS (NetworkOnly)

Added Android support for the beforeSend callback Breaking changes:

  • The 'CxExporterOptions' class 'beforeSend' callback is now asynchronous.

Native iOS SDK upgraded to 1.0.22 Native Android SDK upgraded to 2.4.3

0.0.7 #

Release Date: May 8, 2025

Implemented the following:

  • Before Send
  • getLabels()
  • getSessionId()
  • isInitialized()
  • setApplicationContext()

Native SDK upgraded to 1.0.21

0.0.6 #

Release Date: April 24, 2025

Fix Crash related to URLSessionInstrumentation. Navigation instrument was removed from CoralogixOptions Native SDK upgraded to 1.0.20

0.0.5 #

Release Date: April 8, 2025

Fix issue related to CustomDomainUrl was removed. Native SDK upgraded to 1.0.18

0.0.4 #

Release Date: February 10, 2025

Fixed bug preventing data to be sent if no custom url was set on Android.

0.0.3 #

Release Date: December 15, 2024

Android implementation added

0.0.2 #

Release Date: November 25, 2024

Enhancements SDK Initialization Sampling: Introduced sdkSampler, allowing configuration of the SDK's initialization rate as a percentage (0-100%).

FPS Sampling Rate Configuration: Added mobileVitalsFPSSamplingRate to set the frequency of FPS sampling per hour, with a default of once every minute.

Instrumentation Control: Implemented instrumentations, enabling selective activation or deactivation of specific instruments during runtime. By default, all instrumentations are active.

IP Data Collection Toggle: Added collectIPData to control the collection of user IP addresses and geolocation data, defaulting to true.

0.0.1 #

Added Android support for allowedTracingUrls in TraceParentInHeader configurations Native Android SDK upgraded to 2.7.2 Native iOS SDK upgraded to 2.1.0

1
likes
140
points
8.36k
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

The Coralogix SDK for Flutter is designed to support various Flutter targets by leveraging the numerous platforms supported by Coralogix's native SDKs.

Homepage

License

Apache-2.0 (license)

Dependencies

dio, flutter, http, json_annotation, plugin_platform_interface

More

Packages that depend on cx_flutter_plugin

Packages that implement cx_flutter_plugin