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

StringMetricType

data class StringMetricType : CommonMetricData (source)

This implements the developer facing API for recording string metrics.

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 string API only exposes the record method, which takes care of validating the input data and making sure that limits are enforced.

Constructors

<init>

StringMetricType(applicationProperty: Boolean = false, disabled: Boolean = false, category: String, name: String, sendInPings: List<String> = listOf("default"), userProperty: Boolean = false)

This implements the developer facing API for recording string metrics.

Properties

applicationProperty

val applicationProperty: Boolean

category

val category: String

disabled

val disabled: Boolean

name

val name: String

sendInPings

val sendInPings: List<String>

userProperty

val userProperty: Boolean

Functions

set

fun set(value: String): Unit

Set a string value.

Inherited Functions

shouldRecord

open fun shouldRecord(logger: Logger): Boolean