scout_flutter 0.1.13
scout_flutter: ^0.1.13 copied to clipboard
Zero-config OpenTelemetry RUM for Flutter. Auto-captures taps, navigation, errors, lifecycle, crashes, performance metrics, network requests, and structured logs.
0.1.13 #
Features #
device.localeanddevice.timezoneadded as resource attributes on every span, metric, and log. Locale comes fromPlatform.localeNamenormalized to BCP-47 (e.g.en-US); timezone is the IANA identifier (e.g.Asia/Kolkata) sourced from a newgetTimezoneplatform-channel method backed byTimeZone.current.identifier(iOS) andTimeZone.getDefault().id(Android). No permission prompt, no new packages, ships on every signal includingnative_crashand error spansdevice.type(mobile/tablet, derived from logical screen shortest-side) added as a resource attribute on every signaldevice.namepopulated from the real hardware identifier — iOSutsname.machine(e.g.iPhone15,2) on physical devices, AndroidBuild.MODEL(e.g.Pixel 8a)os.namenormalized toiOS/Android(replacing the lowercasehost.os.name/os.typedefaults)os.versionnow ships as a clean version string (iOSsystemVersione.g.26.3.1, AndroidBuild.VERSION.RELEASEe.g.14) — previously the iOS value was the raw"Version 26.3.1 (Build 23D8133)"blobos.buildadded — iOSkern.osversionsysctl (e.g.23D8133), AndroidBuild.DISPLAYhost.archnow reports the real CPU architecture (arm64/amd64/arm32/x86) — iOS via compile-time arch check, Android viaBuild.SUPPORTED_ABIS[0]normalized. Fixes a dartastic-otel default that was settinghost.archto the hostname
0.1.12 #
Fixes #
service.versionnow auto-detected fromPackageInfo(pubspecversionfield) whenScoutFlutterConfig.serviceVersionis not set. Previously defaulted to a hardcoded1.0.0, masking the integrator's real app version on every span. Explicitly settingserviceVersionstill wins.ScoutFlutterConfig.serviceVersionis nowString?AutoNameNavigatorObserverno longer surfacesInstance of 'CupertinoPage<dynamic>'as the screen name for go_router (and any other declarative router whosePagesubclass relies on the defaultObject.toString()). The observer now falls through to the subtree walk and reports the user-defined page widget's class name
0.1.11 #
Breaking changes #
- User identity is now emitted under the
user.*namespace instead ofenduser.*.setUser(id: 'u1', attributes: {'email': '...', 'phone': '...'})producesuser.id,user.email,user.phone. The auto-attached anonymous identifier is nowuser.anonymous_id. Dashboards / queries that filter onenduser.*must move touser.* setUserno longer requiresid—setUser(attributes: {'tenant': 'acme'})is valid. Bare attribute keys are auto-prefixed withuser.; keys already starting withuser.pass through unchanged
Breadcrumbs on crash spans #
- iOS
native_crashspans now carry per-reportbreadcrumbsbaked intoKSCrash.userInfoat crash time, so the trail matches the crashed session — including delayed MetricKit reports and multi-crash drains - Android
native_crashspans now also carry breadcrumbs in the backgrounded-then-killed case: whenApplicationExitInfosurfaces a crash with no live in-process marker,_drainCrashReportsconsumes the on-diskbreadcrumbs.jsonleft over from the paused session - Dart-side
addBreadcrumbforwards every breadcrumb to the native side via a newsetBreadcrumbsmethod channel (no-op on Android) CrashDetectorno longer deletesbreadcrumbs.jsonon thepausedshutdown path
Android native_crash — iOS-parity overhaul #
- Existing scout_crash_handler
.sois now actually exercised:simulateCrashroutes through a newnativeSimulateCrashJNI export that derefs NULL so real signal-handler coverage is testable end-to-end - C handler bugs fixed:
crash.timestampis ISO 8601 (was raw Unix);crash.kernel_versionreads viauname()(was failing /proc/version on newer Android); process uptime computed viaCLOCK_BOOTTIME(was failing /proc parse under SELinux) - Android key names aligned to iOS:
crash.abi → crash.cpu_arch,crash.registers → crash.registers_json,crash.kernel → crash.kernel_version. Integercrash.signal_code(rawsi_code) plus stringcrash.signal_code_nameboth emitted - New attributes on Android
native_crash:machine,device_model,os_name,os_version,os_build,app_uuid(per-install UUID),bundle_id,bundle_version,app_version,app_name,process_name,app_executable,executable_path,device_app_hash,idfv,build_type,environment,build_configuration,time_zone,system_boot_time_iso,app_start_time,translated,gid,signal(string),signal_number(raw signum),fault_address,exception_register,thread_count,thread_index,app_active,app_active_time_secs,app_background_time_secs,app_active_time_since_last_crash_secs,app_background_time_since_last_crash_secs,app_launches_since_last_crash,app_sessions_since_launch,app_sessions_since_last_crash,memory_free_bytes,memory_size_bytes,storage_size_bytes,storage_free_bytes,time_since_boot_secs,binary_images_json(structured /proc/self/maps),binary_images_count,report_id(per-crash UUID),report_type,report_version,parent_proc_name,parent_pid - Drain context attached at Dart-side drain time:
crash.drain_app_state,crash.drain_process_start_time,crash.drain_uptime_secs
0.1.10 #
Changes #
- New
ScoutFlutterConfig.maxSessionDurationMinutes(default 60, set 0 to disable) — caps total session lifetime; the next read ofsessionIdafter the cap elapses rotates the session inline
0.1.9 #
Changes #
- iOS native crash reports now capture full device, OS, memory, app-state, and process context (sysctl-derived parent process, IDFV, boot time, foreground state at drain time)
- Crashed-thread registers expose FAR / ESR / exception registers as flat attrs; full per-thread callstack tree and binary images are no longer truncated
- KSCrash monitors expanded to include
userReported,system, andapplicationState - Previous session's breadcrumbs are attached to the
native_crashspan via abreadcrumbsattribute - Crash attribute forwarding switched to a generic
crash_*→crash.*pass-through so new native fields surface without Dart changes - Dropped Dart-side stack-trace truncation and the
error.was_truncatedflag
0.1.8 #
Fixes #
- Warm start measurement no longer depends on the
onInactivelifecycle callback;_measureWarmStart()starts its own stopwatch on resume
0.1.7 #
Docs #
- README rewritten to focus on capabilities; install/usage instructions moved to the integration guide
- Integration guide updated to install from pub.dev (was git URL)
- pub.dev publisher badge wired to base14.io
0.1.6 #
Changes #
sessionSampleRatedefault changed from100.0to1.0(1% of sessions)- New
alwaysCaptureErrorsflag (defaulttrue) — errors and crashes (error,native_crash,app_crash,anr,ui_hang) bypasssessionSampleRateand are always exported - Sampling now enforced at the OpenTelemetry layer via a custom
Sampler, so it also applies to spans from auto-instrumentation and directtracer.startSpancalls - New
debugLoggingflag (defaultfalse) — emits per-event[scout]diagnostics viadebugPrintfor init, session rotation, sampling decisions, export batches, and log entries
0.1.5 #
Features #
- iOS: deep crash reports via KSCrash, MetricKit, and ExitInfo
- UI hang detector for main-thread freezes
- FBC and INV vitals
- WebView bridge for capturing telemetry from embedded web content
0.1.4 #
Changes #
- All spans, metrics, and logs are now emitted under a single InstrumentationScope
base14.scout.flutter(previously varied by signal type)
0.1.3 #
Fixes #
- Crash span now uses the crashed session's ID, not the new session
- Crash timestamp set to last known active time before crash
- Error details (type, message) extracted from breadcrumbs into crash span
error.handledflag distinguishes framework-caught vs uncaught errorslast_active_atpersisted on every lifecycle status change for crash timing
0.1.2 #
Changes #
setUsernow accepts arbitrary attributes viaMap<String, Object>instead of onlyidandemail
0.1.0 #
Crash Detection & SDK Hardening #
- Three-layer crash detection: session marker (OOM/SIGKILL), native exception handlers (JVM/NSException), signal handlers (SIGSEGV, SIGABRT, SIGBUS, SIGFPE, SIGILL, SIGTRAP)
- Native signal handler captures full crash context: stack trace via frame pointer walk, register dump, signal code, pid/tid/uid, memory map, ABI, build fingerprint, kernel version, process uptime
- Breadcrumb persistence to disk — breadcrumbs survive crashes and are included in crash spans
- Early error handler installation catches initialization failures
- SDK crash safety — all telemetry callbacks wrapped in try/catch, telemetry failure never crashes the host app
- Graceful fallback for unsupported CPU architectures in native crash handler
- Android: JVM uncaught exception handler + NDK signal handler via JNI
- iOS: NSException crash reporter
Network, Sessions, Logging & Offline Queue #
- HTTP request auto-tracking via
HttpOverrides— method, URL, status, duration, response size - Distributed tracing with W3C
traceparentheader injection for first-party hosts - Dio interceptor for apps using Dio (
ScoutFlutter.dioInterceptor) - Session management with configurable sample rate and inactivity timeout
- Structured logging with OTLP export (debug, info, warning, error levels)
- Optional
debugPrint()capture as info-level logs - Offline queue for failed exports with configurable storage cap
beforeSendcallback for event filtering and modification- Ignore URL patterns for network tracking
Performance Monitoring #
- Long task (jank) detection with configurable threshold
- Native ANR detection via platform-specific watchdog threads
- Cold start and warm start measurement
- Frame metrics: build time and raster time histograms
- Frozen frame detection (>700ms)
- Native memory and CPU usage gauges via platform channels
- View session tracking — time spent on each screen
- Screen load time measurement
Core #
- Auto tap detection via global pointer route (zero widget changes required)
- Auto lifecycle tracking (pause, resume, exit)
- Auto error tracking (FlutterError + uncaught errors)
- Optional navigation tracking via
ScoutFlutter.navigatorObserver - Device info and battery level collection
- Breadcrumb manager for error context
- Custom event logging via
ScoutFlutter.logEvent() - User identity tracking via
ScoutFlutter.setUser() RumUserActionAnnotationwidget for custom action labels- OpenTelemetry export via
flutterrific_opentelemetry