TelemetryService class
TelemetryService — Batches and sends analytics events to MobileAI Cloud.
Features:
- Event batching (flush every N seconds or N events)
- Offline queue with retry on reconnect
- PII scrubbing for sensitive data
- Session tracking
- Screen flow tracking
Constructors
- TelemetryService({required TelemetryConfig config, String? sessionId, PiiScrubber? piiScrubber, String? baseUrl})
Properties
- config → TelemetryConfig
-
final
- flags → FeatureFlagService
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isAgentActing → bool
-
True while the AI agent is executing a tool
no setter
- piiScrubber → PiiScrubber
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- screen → String
-
Get current screen name
no setter
- sessionId → String
-
final
Methods
-
dispose(
) → void -
flush(
) → Future< void> - Flush queued events to server
-
getScreenFlow(
) → List< String> - Get screen flow history
-
isEnabled(
) → bool - Check if telemetry is enabled
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setAgentActing(
bool active) → void - Set agent acting state (called by AgentRuntime)
-
start(
) → Future< void> - Start the telemetry service
-
stop(
) → void - Stop the telemetry service
-
toString(
) → String -
A string representation of this object.
inherited
-
track(
String name, {Map< String, dynamic> data = const {}, String? screen}) → void - Track an event
-
trackWireframe(
{required String screen, required int deviceWidth, required int deviceHeight, required List< Map< components, String? screenshot}) → voidString, dynamic> > - Track wireframe snapshot with deduplication
-
updateScreen(
String screenName) → void - Update current screen (tracked in events)
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited