android-components / mozilla.components.service.glean / UuidMetricType

UuidMetricType

data class UuidMetricType : CommonMetricData (source)

This implements the developer facing API for recording uuids.

Instances of this class type are automatically generated by the parsers at build time, allowing developers to record values that were previously registered in the metrics.yaml file.

The uuid API exposes the generateAndSet and set methods.

Constructors

<init>

UuidMetricType(disabled: Boolean, category: String, lifetime: Lifetime, name: String, sendInPings: List<String>)

This implements the developer facing API for recording uuids.

Properties

category

val category: String

defaultStorageDestinations

val defaultStorageDestinations: List<String>

Defines the names of the storages the metric defaults to when "default" is used as the destination storage. Note that every metric type will need to override this.

disabled

val disabled: Boolean

lifetime

val lifetime: Lifetime

name

val name: String

sendInPings

val sendInPings: List<String>

Functions

generateAndSet

fun generateAndSet(): UUID

Generate a new UUID value and set it in the metric store.

set

fun set(value: UUID): Unit

Explicitly set an existing UUID value

Inherited Functions

getStorageNames

open fun getStorageNames(): List<String>

Get the list of storage names the metric will record to. This automatically expands DEFAULT_STORAGE_NAME to the list of default storages for the metric.

shouldRecord

open fun shouldRecord(logger: Logger): Boolean