Package-level declarations
Types
Configuration for the Autograph builder.
Marks a declaration that exists only so Autograph's own modules can share it across a module boundary — not a supported API for library users. It may change or disappear in any release, including a patch.
Sink for the library's own diagnostic messages — a delivery that failed, or an event dropped because it did not validate. Set one on AutographConfig.logger to route these into your app's logging framework (Logcat, os_log, Timber, …) or to silence them; the default prints to the console, matching the library's historical behavior.
What closeAndAwait can tell the caller about a shutdown. A final class the library alone produces (ADR 0001 §2a): properties may be added in a minor version, and the set of outcomes is not an enum that could grow under a caller's when.
Wraps delegate, logging every event before delivering it — for eyeballing outgoing events on a real device/build during manual QA, separate from the app's production transport. Not connected to a warehouse or any assertion tooling (see the planned autograph-test module for unit-test assertions instead).
Properties the tracker adds to every track and screen event — a tenant, an install id, an experiment assignment: context that belongs to the app rather than to any screen or call site.
Provides instrumentation envelopes. Implemented by the library core; transports that run their own event pipeline (e.g. Segment) call stamp from inside that pipeline so that sequence numbers match the actual enqueue order — including events the transport generates itself, such as lifecycle events.
Built-in EventIdGenerator strategies.
Generates a unique identifier for each event.
The values EventMetadata.kind takes for events the library emits. String constants rather than an enum, so a new kind is an addition rather than a break (ADR 0001 §2e).
What the library knows about how an event was produced, beyond its name and properties (#287, #243, #242). It is carried in the envelope (Envelope.metadata) and serialized into the same context.instrumentation block, never into properties.
Checks a track/screen event against an app-defined tracking-plan contract — a fixed set of event types, required properties, naming conventions — before it reaches the transport.
A non-persistent SeqStore for tests or ephemeral configurations.
A Transport that stamps in its own pipeline (Transport.stampsInPipeline) and can add an event's EventMetadata to the envelope it stamps there (ADR 0001 §2c: a capability the core probes with is, because Transport's own member set is frozen).
Controls how sequence counters are persisted.
Controls which sequence numbers are stamped into the event envelope.
Session semantics: a session ends when the app has been inactive for longer than backgroundTimeout. Session state is persisted, so a session survives process restarts as long as activity resumes within the timeout.
A snapshot of the session an event belongs to.
One event as intercept's transform sees it. Produced by the library, never constructed by callers (ADR 0001 §2a), so it can gain properties as additions.
The values TransportEvent.type takes. String constants rather than an enum, so a new type is an addition rather than a break (ADR 0001 §2e).
Properties
An empty JsonObject, useful as a default for event properties.
The reserved properties key through which the library's own emit sites hand an event's EventMetadata to the tracker (#287).
Functions
Narrows a properties map to a JsonObject, wrapping only when it is not already one.
This tracker as Kotlin code can safely call: itself when it is written in Kotlin, and otherwise a Kotlin tracker that forwards every call to it with deliverableTo applied.
Closes this tracker like Tracker.close, but suspends instead of blocking, waits until the shutdown has finished and returns its final result. That is the same exposure as Tracker.close, which also returns only when the shutdown is done: the drain is bounded by AutographConfig.closeDrainTimeoutMillis, but the Transport.flush after it is not, so a transport whose flush blocks holds this call for as long as it blocks (#305). The reason it has no timer of its own is not that the shutdown is bounded: a timer equal to the drain bound would race the shutdown (a drain ending just under the bound, plus a flush, would report a completed shutdown as timed out), and the result would not be deterministic. Use closeAndAwait with a timeout when you need to stop waiting.
closeAndAwait with an explicit per-call timeoutMillis for the wait. It bounds this caller's wait only, and a value at or above the drain bound does not guarantee the final result; see AwaitableCloseTracker.closeAndAwait. Long.MAX_VALUE waits for the shutdown to finish, as the no-argument overload does.
Builds an Envelope with caller-chosen field values, bypassing the stamper.
Builds an EventMetadata with caller-chosen field values, for the same reason and with the same lack of guarantees as createEnvelope. Use testEventMetadata(...) from autograph-test instead.
A transport that runs transform on every event before handing it to this one: to redact a property, add one, or drop the event (return null) for sampling (#302).
Returns the platform-default SeqStore: a FileSeqStore under the app's private data directory, or an InMemorySeqStore if no writable directory is available (in which case counters do not survive a restart).
These properties with the library's EventMetadata written on top under RESERVED_METADATA_KEY, for Autograph's own emit sites. Apply it last, after any scope merge, so the emit site's value is the one the tracker reads; whatever was under the key before is replaced.