glean / mozilla.telemetry.glean.private / PingType

PingType

class PingType<ReasonCodesEnum : Enum<ReasonCodesEnum>> : PingTypeBase

This implements the developer facing API for custom pings.

Instances of this class type are automatically generated by the parsers at build time.

The Ping API only exposes the send method, which schedules a ping for sending.

Constructors

<init>

PingType(name: String, includeClientId: Boolean, sendIfEmpty: Boolean, reasonCodes: List<String>)

This implements the developer facing API for custom pings.

Properties

reasonCodes

val reasonCodes: List<String>

The list of acceptable reason codes for this ping.

Functions

send

fun send(): Unit

Collect and submit the ping for eventual upload.

submit

fun submit(reason: ReasonCodesEnum? = null): Unit

Collect and submit the ping for eventual upload.

testBeforeNextSubmit

fun testBeforeNextSubmit(cb: (ReasonCodesEnum?) -> Unit): Unit

Test-only API