Join GitHub today
New telemetry ping for Pocket + FireTV events #1606
To add a new ping type we need to implement a new
An example is the
And implemented in the telemetry this is here in
Following this pattern you'll need to implement some kind of
Add new ones as you need them.
Note that the base class (
Your schema seems to deliberately not send the client id. That's a special case we didn't have before, so you'll need to workaround that.
In Fire TV you'll find code that adds the ping builders to the telemetry library and schedules pings. That's something you'd need to add after the release. However make sure your ping builder exposes access to measurements where the app needs to set values (unlike "os" where the measurement can figure out the value on its own). For example the core ping builder exposes some measurements here that the app will set itself: https://github.com/mozilla-mobile/android-components/blob/master/components/service/telemetry/src/main/java/org/mozilla/telemetry/ping/TelemetryCorePingBuilder.java#L60-L78
Most measurement implementations fall in one of those three categories:
The telemetry library was written in Java before we started to use Kotlin. However feel free to use Kotlin for new code. I'd suggest not migrating any existing code at this time though (because of risk and since the library will go away eventually anyways) - unless really needed.
Ping me if you need any help!