LogEvent

data class LogEvent @JvmOverloads constructor(val recorder: FusRecorder, val product: String, val ids: Map<String, String>, val internal: Boolean, val time: Long, val build: String, val session: String?, val group: LogEventGroup, val bucket: Int, val event: LogEventAction, val system_data: Map<String, Any>? = null, val client_data: Map<String, Any>? = null)

Represents a combination of the event related data LogEventAction and the common recorder data parts.

Parameters

product

Product code, e.g. IU, TC, TB. Product code should contain uppercase latin letters only and be at least one symbol long.

ids

Map from names of ids associated with the event to their values, e.g projectId, organisationId. All values from that map will be hashed twice on send and on receive. It should not be empty.

internal

Flag is used to distinguish between internal and external users. E.g we may want to exclude company’s employees from logs, because they know much more about the product.

time

Unix time epoch of the time when the event occurred, in UTC.

build

Product build number. Could include numbers and dots.

session

In web applications, it is usually a web session. In desktop application, this is a UUID that connects all events from opening to closing the app.

bucket

Buckets are used to regulate the percentage of data that will be sent. The bucket number must belong to the interval of 0…255. It is usually calculated as a hash(device_id) % 256.

system_data

System data, recorded with each event and have common structure for all recorders.

client_data

Client data, recorded with each event and specific for certain recorder. For example, is_headless_mode for desktop applications started in headless mode. List of the fields should be discussed with Analytics Platform team first.

Constructors

Link copied to clipboard
constructor(recorder: FusRecorder, product: String, ids: Map<String, String>, internal: Boolean, time: Long, build: String, session: String?, group: LogEventGroup, bucket: Int, event: LogEventAction, system_data: Map<String, Any>? = null, client_data: Map<String, Any>? = null)

Properties

Link copied to clipboard
val bucket: Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val time: Long

Functions

Link copied to clipboard