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

# EventMetricType

`data class EventMetricType : CommonMetricData` (source)

This implements the developer facing API for recording events.

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

The Events API only exposes the record method, which takes care of validating the input data and making sure that limits are enforced.

### Constructors

<init> | `EventMetricType(applicationProperty: Boolean, disabled: Boolean, group: String, name: String, sendInPings: List<String>, userProperty: Boolean, allowedExtraKeys: List<String>? = null)` This implements the developer facing API for recording events.

### Properties

allowedExtraKeys | `val allowedExtraKeys: List<String>?`
applicationProperty | `val applicationProperty: Boolean`
disabled | `val disabled: Boolean`
group | `val group: String`
name | `val name: String`
sendInPings | `val sendInPings: List<String>`
userProperty | `val userProperty: Boolean`

### Functions

record | `fun record(objectId: String, value: String? = null, extra: Map<String, String>? = null): Unit` Record an event by using the information provided by the instance of this class.