AutographConfig

Configuration for the Autograph builder.

Properties

Link copied to clipboard
var dispatcher: CoroutineDispatcher

The dispatcher on which events are stamped and persisted when the transport does not stamp in its own pipeline (e.g. the iOS Segment bridge, or a custom transport). It must be single-threaded / serial so sequence numbers keep their call order; the default is a single-slot view over Dispatchers.Default that owns no thread of its own. Override to integrate with your own threading, or set Dispatchers.Unconfined in tests to stamp synchronously.

Link copied to clipboard

Strategy for per-event ids. Defaults to time-ordered, monotonic UUIDv7.

Link copied to clipboard

Sink for the library's own diagnostics — a failed delivery, or an event dropped for failing validator. Defaults to printing to the console (the historical behavior); set your own to route them into your app's logging framework (Logcat, os_log, Timber) or to silence them. See AutographLogger. This routes only the diagnostics of a constructed tracker; a pre-provider warning (compose's MissingTracker) or a storage-fallback notice logged before a tracker exists still goes to the console, since there is no configured logger yet at that point.

Link copied to clipboard

How often sequence counters are persisted.

Link copied to clipboard

Your own event-schema/tracking-plan version, stamped onto every envelope as schema_version — distinct from the library's own Envelope.sdk version. Null (the default) omits the field. Evolve it only for changes that alter how downstream consumers must interpret an event (e.g. a renamed or repurposed property); purely additive changes don't need a bump, since existing readers already ignore unknown fields.

Link copied to clipboard

Which sequence numbers to stamp. Defaults to a per-session counter.

Link copied to clipboard

Session timeout semantics.

Link copied to clipboard

Key-value storage for counters and session state. Defaults to the platform store.

Link copied to clipboard

What happens to a track/screen event validator rejects. false (the default, meant for release builds) drops the event and logs the reason — a tracking-plan violation should never crash the app. true (meant for debug builds) throws immediately instead, so mistakes are caught during development rather than silently dropped in production.

Link copied to clipboard

Checks every track/screen event against an app-defined tracking-plan contract before it reaches the transport. Null (the default) skips validation entirely. See strictValidation for what happens to an event EventValidator rejects.

Functions

Link copied to clipboard
fun transport(transport: Transport)

Sets the transport that delivers events, e.g. SegmentTransport from autograph-segment.