CxorbiConfig class

Constructors

CxorbiConfig({required String apiKey, String? ingestKey, String apiUrl = 'https://api.cxorbi.com/api', String? dashboardUrl, String? sessionId, String? userId, MaskingMode? maskingMode, CxorbiMaskingConfig maskingConfig = const CxorbiMaskingConfig(), bool captureFrames = true, bool? captureGestures, bool? enableInteractionsAutocapture, bool captureErrors = true, bool capturePerformance = true, bool captureNetworkErrors = true, bool captureNativeNetworkErrors = true, bool captureFrameVitals = true, bool captureNativeDiagnostics = true, bool captureImageAssets = false, bool captureRenderBoundaryAssets = false, bool captureCustomPaintAssets = false, bool captureT2NativeReadback = false, bool captureSurveysInReplay = false, bool sessionReplayAutoStart = true, List<String> urlMaskingPatterns = const <String>[], bool offlineQueueEnabled = true, int offlineQueueMaxEntries = 200, int offlineQueueMaxBytes = 30 * 1024 * 1024, int maxReplayAssetBytes = 512 * 1024, bool debug = false, LogLevel? logLevel, CxorbiEnvironment environment = CxorbiEnvironment.production, bool? debugMode, int captureCadenceMs = 300, int navCaptureDebounceMs = 300, int backgroundSessionTimeoutMs = kDefaultBackgroundSessionTimeoutMs, bool useServerSessionPolicy = true, int sessionHeartbeatIntervalMs = kDefaultSessionHeartbeatIntervalMs, bool replayTailDrainEnabled = true, int replayTailDrainIntervalMs = kDefaultReplayTailDrainIntervalMs, bool backgroundReplayFlushEnabled = false, int backgroundReplayFlushTimeoutMs = kDefaultBackgroundReplayFlushTimeoutMs, bool gzipRequests = false, int gzipMinBytes = 1024, bool transportV2 = true, bool rollbackDurableSpool = false, bool backpressureEnabled = false, CxorbiQualityConfig qualityConfig = const CxorbiQualityConfig(), bool enablePerfMetrics = false, bool eventDrivenCapture = false, int eventDrivenCheckpointMs = 1000, bool surveysEnabled = false, bool autoShowSurveys = true, bool nudgesEnabled = false, bool autoShowNudges = true, bool captureNudgesInReplay = false, List<String> nudgeCustomActionKeys = const <String>[], List<String> nudgeAllowedAppLinkProtocols = const <String>[], bool scrubFreeTextPii = true, List<String> allowedApiHosts = const <String>[], String? appVersion, String? releaseEnv, String? journeyId, List<String> userCohorts = const <String>[], List<String> tenantAttributes = const <String>[]})

Properties

allowedApiHosts List<String>
Optional egress allowlist: if non-empty, the survey transport asserts the resolved apiUrl host is in this list before any fetch/submit (fail-closed data-residency control for regulated clients).
final
apiKey String
final
apiUrl String
final
appVersion String?
App/build version reported on session start so a project targeting rule can match appVersions. Null → not sent (no targeting on this attribute).
final
autoShowNudges bool
Automatically evaluate app-open, page-view and tracked-event triggers.
final
autoShowSurveys bool
When true (default), the SDK auto-checks for an eligible survey on init and app-foreground. Only effective when surveysEnabled is true.
final
backgroundReplayFlushEnabled bool
Best-effort replay-tail drain while the host app enters background.
final
backgroundReplayFlushTimeoutMs int
final
backgroundSessionTimeoutMs int
Foreground resume after this many background milliseconds rotates to a fresh replay session. The 30-minute value is the fail-safe fallback when versioned server policy is unavailable. Set 0 to keep app-switch resumes in the same SDK session until the app process is killed or resetIdentity / reset is called.
final
backpressureEnabled bool
Enable adaptive capture throttling under upload pressure. Navigation and keyframe boundaries are retained. Default false.
final
captureCadenceMs int
Base capture-walk cadence in milliseconds. Lower means higher replay/heatmap fidelity at more CPU; higher is cheaper and coarser. Sampling of replay itself is server-owned, not a client knob.
final
captureCustomPaintAssets bool
Auto-screenshot non-structural content (custom-painted widgets like charts, candlesticks, maps) into a pixel imageRef instead of a gray placeholder. Default off (opt-in). Respects maskCustomPaints — only unmasked content is captured. GPU/Texture/PlatformView content cannot be rasterized and stays a placeholder.
final
captureErrors bool
final
captureFrames bool
final
captureFrameVitals bool
final
captureGestures bool
final
captureImageAssets bool
final
captureNativeDiagnostics bool
final
captureNativeNetworkErrors bool
final
captureNetworkErrors bool
final
captureNudgesInReplay bool
Include product-authored Nudge content in replay. Default false keeps a privacy-safe Nudge-specific replay exclusion marker around the content.
final
capturePerformance bool
final
captureRenderBoundaryAssets bool
final
captureSurveysInReplay bool
When true, the SDK's own "Ask" survey overlay is captured INTO session replay instead of being omitted (wraps the overlay without the exclusion marker). Default false = privacy-safe exclusion. The dashboard project policy can also opt future sessions in; third-party surveys should stay masked/excluded.
final
captureT2NativeReadback bool
Experimental native readback hook for platform-rendered surfaces. No native implementation ships in this build, so enabling it is currently a no-op.
final
dashboardUrl String?
final
debug bool
Back-compat alias, true when logLevel is LogLevel.debug or more verbose. The [cxorbi] request/transport logs are gated on this, so setting logLevel: LogLevel.none (or any level below debug) silences them exactly as debug: false always did.
no setter
debugMode bool
True when this build's traffic should be flagged as test/debug. Defaults to Flutter's kDebugMode, so debug builds are auto-flagged; set it explicitly for profile/release staging builds (where kDebugMode is false). Stamped on the session so you can spot and hide test traffic in Live Events. (Excluding it from aggregate production reports is dashboard configuration, not an SDK concern.)
final
enableInteractionsAutocapture bool
final
enablePerfMetrics bool
QA/benchmark flag. When true, the SDK records direct pipeline overhead and logs a JSON snapshot on each backgrounding. Keep false in production.
final
environment CxorbiEnvironment
The build's environment, stamped on every session. Default CxorbiEnvironment.production.
final
eventDrivenCapture bool
Experimental, default false. Drive replay capture from semantic triggers plus a periodic keyframe safety checkpoint instead of walking the tree on every painted frame. Leave false until completeness tests confirm coverage parity for your app.
final
eventDrivenCheckpointMs int
Bounded dynamic-content checkpoint interval (ms) used only when eventDrivenCapture is true. Catches passive content changes that arrive without a navigation or pointer trigger. Set 0 to rely on keyframes only.
final
gzipMinBytes int
Minimum uncompressed body size in bytes before gzipRequests compresses (small bodies don't benefit). Default 1024.
final
gzipRequests bool
When true, request bodies at or above gzipMinBytes are gzip-compressed on the wire (Content-Encoding: gzip). Default false.
final
hashCode int
The hash code for this object.
no setterinherited
ingestKey String?
final
journeyId String?
Journey/flow id reported on session start so a rule can match journeyIds. Null → not sent.
final
logLevel LogLevel
Diagnostic-log verbosity. Defaults to LogLevel.warn. An explicit logLevel always wins; otherwise debug: true (back-compat) maps to LogLevel.debug and debug: false to LogLevel.warn.
final
maskingConfig CxorbiMaskingConfig
final
maskingMode MaskingMode?
Explicit masking mode wins; when null the SDK uses the dashboard setting.
final
maxReplayAssetBytes int
final
Screen-change capture debounce (ms). Default 300: the per-screen capture is deferred and coalesced until navigation is quiet this long, so capture work runs after the transition settles. Set 0 for immediate capture.
final
nudgeAllowedAppLinkProtocols List<String>
Explicit non-network app-link protocols (myapp:). HTTPS is always safe; dangerous/network/local protocols remain denied even if listed here.
final
nudgeCustomActionKeys List<String>
Stable custom action keys this host explicitly knows how to handle. Empty by default, so remote custom actions fail closed.
final
nudgesEnabled bool
Host-side half of the two-factor Nudge gate. Default false keeps the runtime completely inert. /sdk/config must independently enable Nudges.
final
offlineQueueEnabled bool
final
offlineQueueMaxBytes int
final
offlineQueueMaxEntries int
final
qualityConfig CxorbiQualityConfig
Adaptive session-replay quality governor config. It only throttles under sustained jank.
final
releaseEnv String?
Release environment label (e.g. qa, beta, production) reported on session start so a rule can match releaseEnvs. Null → not sent.
final
replayTailDrainEnabled bool
Periodic foreground recovery for durable replay-tail rows. Default 30000 (30 seconds), clamped to 1 second..5 minutes; set replayTailDrainEnabled false or interval 0 to disable. This intentionally runs separately from sessionHeartbeatIntervalMs so heartbeat-disabled apps still recover stranded replay tails while foregrounded.
final
replayTailDrainIntervalMs int
final
rollbackDurableSpool bool
Compatibility switch for the older on-device queue implementation. Default false keeps the current durable queue.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scrubFreeTextPii bool
Scrub free-text survey answers (TEXT, CONSENT name) for PII before egress.
final
sessionHeartbeatIntervalMs int
Lightweight foreground activity-marker cadence in milliseconds. These markers keep the session duration and final-screen dwell accurate even when unchanged replay frames are deduplicated. Default 15000 (15 seconds), clamped to 5 seconds..5 minutes; set 0 to disable.
final
sessionId String?
Optional externally minted session id (e.g. ${userId}_${UTC-date} to join the backend's daily analytics session, as the reference apps do).
final
sessionReplayAutoStart bool
final
surveysEnabled bool
Master kill-switch for the survey layer. Default false — the entire Ask layer is inert (no fetch/present) until the host opts in, so adding it never changes existing 0.2.x behavior.
final
targetingContext Map<String, Object>?
Optional targeting context included with the session bootstrap. Returns null when nothing is configured.
no setter
tenantAttributes List<String>
Tenant attribute labels reported on session start so a rule can match tenantAttributes. Empty → not sent.
final
transportV2 bool
When true, mobile event chunks use the current durable transport. Default true; server policy can still select the compatibility transport.
final
urlMaskingPatterns List<String>
final
userCohorts List<String>
User cohort labels reported on session start so a rule can match userCohorts. Empty → not sent.
final
userId String?
final
useServerSessionPolicy bool
Whether the versioned project policy returned at mobile-session bootstrap may replace backgroundSessionTimeoutMs. Keep true for production. Test fixtures that require deterministic short sessions can set false.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited