cx_flutter_plugin 0.9.1
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 nullshort-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 fromandroid/build.gradle. These were accidentally shipped; dependency resolution now relies ongoogle()/mavenCentral()as intended.
0.9.0 #
Release Date: June 18, 2026
- New: automatic view tracking via
CxNavigatorObserver. AddCxNavigatorObserverto your app'snavigatorObserversand screen changes are reported to the SDK automatically — no manualsetViewper page. OnlyPageRoutes are tracked (dialogs, bottom sheets and popups are not treated as a screen change); the view name comes fromRouteSettings.name, and unnamed routes are skipped. Pass anameExtractorto derive the name differently, or to skip a route by returningnull. A throwingnameExtractoris caught and reported viaFlutterError.reportError, so it can never break navigation. This drives the native product-analytics fields (view_number,isNavigationEvent) exactly as a manualsetViewdoes.
0.8.0 #
Release Date: June 18, 2026
- beforeSend now realigns OTel span attributes (Flutter parity with the native fix). When a
beforeSendcallback edits a network or custom-span event, the change is mirrored onto the event'sinstrumentation_data.otelSpan.attributesso the OTel span carried in the same payload matches the modifiedtext.cx_rum. Previously this realignment ran only on the synchronous native path; Flutter's asynchronousbeforeSendskipped it, so OTel attributes kept their pre-edit values. The realign re-derives thecx_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.CoralogixEventTypewas missing thecustom-spanvalue, so custom-span events failed to decode in thebeforeSendround-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.
CXSessionReplayOptionsis the single source of truth for what gets masked —maskAllTexts,textsToMask(regex),maskAllImages, plus theMaskedWidgetwrapper. 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 withisAntiAlias = falseon 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:
reportErrornow honours its public contract on both platforms. Previously, callingCxFlutterPlugin.reportError(message, data, stackTrace)with a non-empty stack trace silently dropped thedatamap — the parsed frames went to native but the custom attributes did not. The iOS and Android bridges now threaddatathrough into the newcustomAttributesparameter 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
customAttributesfield onCoralogixErrorDecorator.
0.5.1 #
Release Date: May 19, 2026
- Bug fix (follow-up): obfuscated
virtaddresses were wrong on iOS. The 0.4.2 fix computedvirt = offset + (isolate_instructions − isolate_dso_base). On Android this coincidentally equals the ELF VMA of_kDartIsolateSnapshotInstructions(libapp.sois 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 emitsvirtin the canonicaldart symbolizeform<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 numericvirtduring rollout. - Bug fix: parser dropped every frame on Android. Android's Dart runtime emits an extra
virt ADDRtoken betweenabs ADDRand 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/_kDartVmSnapshotInstructionssuffix (Flutter engine, OS frameworks) live in different DSOs and cannot be resolved against the app's symbols file — emittingvirtvalues for them was producing addresses pointing at DATA sections. The parsed stack trace now carriesdropped_frame_countso consumers can distinguish "all frames filtered" from "parser found nothing" whenframesis empty (omitted from the map when zero).
0.5.0 #
Release Date: May 13, 2026
- New:
excludeFromSamplingonCXExporterOptions. Lets the SDK keep emitting selected instrumentation categories even when the session is sampled out viasdkSampler. 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})andCxFlutterPlugin.endTimeMeasure(name)bracket arbitrary spans of work; the native SDK reports the duration as acustom-measurementspan (milliseconds). Pure bridge pass-through — no Dart-side state, native owns the in-flight registry. Empty / whitespace-only names and duplicatestartfor an in-flight name are ignored (first wins). Callers are responsible for pairing everystartwith exactly oneend. - 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
virtaddresses): Some production traces emitted anabsfield that did not equalisolate_instructions + offset, so the previousabs − isolate_dso_baseformula produced incorrect virtual addresses and the server-side symbolicator returned the wrong source mappings. The parser now computesvirt = offset + (isolate_instructions − isolate_dso_base)from the per-frame_kDartIsolateSnapshotInstructions+0xNNNsuffix — the authoritative source — and falls back toabs − isolate_dso_baseonly when the offset suffix orisolate_instructionsheader 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):
maskAllTextsandtextsToMasknow work in Flutter. Flutter renders entirely insideFlutterSurfaceView, 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 visibleRenderParagraph/RenderEditablenodes directly to the nativeflutterMaskRegionsProvider. 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. textsToMaskaccepts regex patterns. Each entry is compiled as aRegExp; 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 whentextsToMaskis 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 anytextsToMaskpattern is configured. - Bug fix: sentinel registration race.
SessionReplayMasking.initialize()is nowasyncandawaits the sentinelregisterMaskRegioncall before returning, eliminating a race where the very first captured frame could be unmasked. - Sentinel registration failure now logged. Previously swallowed silently; a
debugPrintwarning 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 aCoralogixCustomTracerwhentraceParentInHeader.enableistrue. From there,tracer.startGlobalSpan(name, {labels})creates a rootCoralogixGlobalSpanexposingspanId/traceId;globalSpan.startCustomSpan(name, {labels})creates childCoralogixCustomSpans;globalSpan.withContext(block)runs Dart work in a Zone whose async chain inherits the active span's id; andendSpan()closes spans on the native SDK. Mirrors the browser SDK contract — only one tracer per SDK lifecycle is allowed; subsequentgetCustomTracercalls return the cached instance. - New:
CoralogixIgnoredInstrumentenum (networkRequests,userInteractions,errors) — pass togetCustomTracerto opt specific Dart-side instrumentation out of inheriting the active custom span. - HTTP/Dio inherit the active custom span automatically.
CxHttpClientandCxDioInterceptornow read the active global span viaUtils.resolveTraceId(), injecttraceparentcarrying the inherited traceId, and attachcustomTraceId/customSpanIdto every network event. Barehttp.get()/ raw Dio still bypass — wrap inCxHttpClient/CxDioInterceptorto keep the trace linked. - New:
CXExporterOptions.tracesExportercallback. When provided, the native SDK streams completed OTLP-style trace batches over a newcx_flutter_plugin/onTracesExporterEventChannel. 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-sideCxFlutterPlugin.shutdown(). - Bug fix (Android child span ids):
startCustomSpannow returns the real OTelspanId/traceIdfrom the underlying span instead of a fabricated hex — cross-system trace correlation now works on Android the same as iOS. - Bug fix (
endSpanidempotence): Both platforms now succeed silently when a spanId is already untracked (e.g. ended by the 30s idle timer, byremoveAll()on shutdown, or by a duplicate Dart-side call). Previously iOS threwunknown_span. - Docs (Custom Spans): Added a full README usage guide for
getCustomTracer→startGlobalSpan→withContext+CxHttpClient→startCustomSpan→endSpan, includingignoredInstrumentsbehavior andtraceParentInHeaderprerequisite. - Docs (Traces Exporter): Added README guidance for configuring
CXExporterOptions.tracesExporterand consuming OTLP-style batch payloads from the EventChannel bridge. - Dartdoc coverage (public API): Expanded docs for
CoralogixCustomTracer,CoralogixGlobalSpan,CoralogixCustomSpan, andCoralogixIgnoredInstrumentso 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.shto keeppubspec.yaml,lib/plugin_version.dart, andios/cx_flutter_plugin.podspecin sync. - Xcode ObfuscatedRelease configuration: Added
ObfuscatedReleasebuild 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
.envasset error when validating the example app. A stub.envfile is now created before the validation step.
0.3.1 #
Release Date: March 26, 2026
- Bug fix:
fragmentsfield in network events was always empty. BothCxDioInterceptorandCxHttpClientnow 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
userActionsis enabled.
0.2.0 #
Release Date: March 23, 2026
- CxDioInterceptor: New interceptor for Dio HTTP client. Add
CxDioInterceptor()to yourDioinstance to automatically capture network requests, generate RUM spans, and inject W3Ctraceparentheaders — no migration from your existing networking layer required. - NetworkCaptureRule: New
networkCaptureConfigoption onCXExporterOptions. Supply a list ofCxNetworkCaptureRuleobjects 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
CxHttpClientandCxDioInterceptornow reportstatus_text,request_headers,response_headers,request_payload,response_payload, anderror_message.traceId/spanIdare forwarded to the native Android SDK. beforeSendis 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, setbeforeSend: (event) => eventexplicitly.- iOS
setUserInteractiondispatched to main thread: FixesMain Thread Checkerwarning caused by UIKit access on the background method-channel queue. - iOS
networkExtraConfigparsing:networkCaptureConfigrules are now parsed and forwarded to the native iOS SDK duringinitSdk. - Performance (Android):
CoralogixRum.initialize, Session Replay init, andcaptureScreenshotrun on the main looper.reportErrorandsendCxSpanDatarun on a dedicated background executor. - Performance (iOS): Method channel uses a background task queue when available.
CoralogixRuminitialization 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
userActionsin options, Dart tracks click/scroll/swipe; iOS always receivesuserActions: falseto 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 whenevent_nameis missing or when SDK is not initialized (iOS). - Context types aligned with native: EventContext
source; DeviceContextoperating_system/os_version,network_connection_type/network_connection_subtype,user_agent; ErrorContextexception_type; NetworkRequestContextrequest_headers/response_headers/request_payload/response_payload; InteractionContexttarget_element,element_classes,target_element_inner_text,scroll_directionwithtoJson()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.yamlenvironment:flutter: '>=3.27.0') - This requirement is necessary to support the modern
Color.withValues(alpha: ...)API, which replaced the deprecatedColor.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
beforeSendoperation - 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