TrackEvent

data class TrackEvent(val id: String, val name: String, val properties: Map<String, Any?>, val userId: String?, val sessionId: String, val clientTimestamp: Long, val clientUptimeMs: Long, val schemaVersion: Int = 1, val destinations: Set<String>? = null, val attemptCount: Int = 0)

A single event flowing through the pipeline.

Since

1.0.0

Constructors

Link copied to clipboard
constructor(id: String, name: String, properties: Map<String, Any?>, userId: String?, sessionId: String, clientTimestamp: Long, clientUptimeMs: Long, schemaVersion: Int = 1, destinations: Set<String>? = null, attemptCount: Int = 0)

Properties

Link copied to clipboard
val attemptCount: Int = 0

Number of delivery attempts so far. Zero on creation.

Link copied to clipboard

Wall-clock time of the track call (UTC ms).

Link copied to clipboard

Monotonic uptime at track-time, used to correct wall-clock skew on the backend.

Link copied to clipboard
val destinations: Set<String>? = null

Whitelist passed by the caller, or null for "all".

Link copied to clipboard
val id: String

Locally unique UUID generated at track-time. Used as the idempotency key on the backend.

Link copied to clipboard

Validated event name.

Link copied to clipboard

Event payload, after sanitization.

Link copied to clipboard

Format version. The current code emits 1.

Link copied to clipboard

Identifier of the session this event belongs to.

Link copied to clipboard

Identifier set by EventTracker.identify, if any.