[fenix] Fix errors in top_sites_count metric

We discovered in the Fenix metrics errors query [1] that
top_sites_count had a spike in the number of errors. It
seems to be recording a count of 0, which is an invalid value.

[1] https://sql.telemetry.mozilla.org/queries/67107/source#169983
pull/600/head
Michael Droettboom 5 years ago committed by Emily Kager
parent f534fdb690
commit 461853e252

@ -553,8 +553,11 @@ class GleanMetricsService(private val context: Context) : MetricsService {
adjustAdGroup.set(context.settings().adjustAdGroup)
adjustCreative.set(context.settings().adjustCreative)
adjustNetwork.set(context.settings().adjustNetwork)
hasTopSites.set(context.settings().topSitesSize > 0)
topSitesCount.add(context.settings().topSitesSize)
val topSitesSize = context.settings().topSitesSize
hasTopSites.set(topSitesSize > 0)
if (topSitesSize > 0) {
topSitesCount.add(topSitesSize)
}
toolbarPosition.set(
if (context.settings().shouldUseBottomToolbar) {

Loading…
Cancel
Save