android-components / mozilla.components.service.glean / EventMetricType / record

record

fun record(objectId: String, value: String? = null, extra: Map<String, String>? = null): Unit (source)

Record an event by using the information provided by the instance of this class.

Parameters

objectId - the object the event occurred on, e.g. 'reload_button'. The maximum length of this string is defined by MAX_LENGTH_OBJECT_ID

value - optional. This is a user defined value, providing context for the event. The maximum length of this string is defined by MAX_LENGTH_VALUE

extra - optional. This is map, both keys and values need to be strings, keys are identifiers. This is used for events where additional richer context is needed. The maximum length for values is defined by MAX_LENGTH_EXTRA_KEY_VALUE