pub trait RemoteSettingsTelemetry: Send + Sync {
// Required method
fn report_uptake(&self, extras: UptakeEventExtras);
}Expand description
Trait implemented by consumers to record Remote Settings metrics with Glean.
Consumers should implement this trait and pass it to crate::RemoteSettingsService::set_telemetry.
Consumers implement the trait like this (Kotlin example):
/* Import the UniFFI-generated bindings */
import mozilla.appservices.remote_settings.RemoteSettingsTelemetry
import mozilla.appservices.remote_settings.UptakeEventExtras
/* Import the Glean-generated bindings */
import org.mozilla.appservices.remote_settings.GleanMetrics.RemoteSettings as RSMetrics
class GleanTelemetry : RemoteSettingsTelemetry {
override fun report_uptake(eventExtras: UptakeEventExtras) {
RSMetrics.uptakeRemotesettings.record(eventExtras)
}
}
service.setTelemetry(GleanTelemetry())Required Methods§
Sourcefn report_uptake(&self, extras: UptakeEventExtras)
fn report_uptake(&self, extras: UptakeEventExtras)
Report uptake event.