android-components / mozilla.components.browser.engine.gecko.glean / GeckoAdapter

GeckoAdapter

class GeckoAdapter : Delegate (source)

This implements a RuntimeTelemetry.Delegate that dispatches Gecko runtime telemetry to the Glean SDK.

Metrics defined in the metrics.yaml file in Gecko’s mozilla-central repository will be automatically dispatched to the Glean SDK and sent through the requested pings.

This can be used, in products collecting data through the Glean SDK, by providing an instance to GeckoRuntimeSettings.Builder().telemetryDelegate.

Constructors

Name Summary
<init> GeckoAdapter()
This implements a RuntimeTelemetry.Delegate that dispatches Gecko runtime telemetry to the Glean SDK.

Functions

Name Summary
onBooleanScalar fun onBooleanScalar(metric: Metric<Boolean>): Unit
onHistogram fun onHistogram(metric: Histogram): Unit
onLongScalar fun onLongScalar(metric: Metric<Long>): Unit
onStringScalar fun onStringScalar(metric: Metric<String>): Unit

Extension Functions

Name Summary
loadResourceAsString fun Any.loadResourceAsString(path: String): String
Loads a file from the resources folder and returns its content as a string object.