Bug 1836164 - New growth telemetry for credential management

fenix/116.0
Harrison Oglesby 11 months ago committed by mergify[bot]
parent d9c8de31ba
commit 24c795ce5c

@ -6090,6 +6090,75 @@ logins:
metadata:
tags:
- Logins
saved:
type: counter
description: |
Counter of number of passwords that have been saved by user (including deleted).
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1836164
data_reviews:
- https://github.com/mozilla-mobile/firefox-android/pull/2555
data_sensitivity:
- interaction
notification_emails:
- android-probes@mozilla.com
- cgordon@mozilla.com
expires: never
metadata:
tags:
- Logins
saved_all:
type: quantity
description: |
Counter of number of passwords currently saved by user.
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1836164
data_reviews:
- https://github.com/mozilla-mobile/firefox-android/pull/2555
data_sensitivity:
- interaction
notification_emails:
- android-probes@mozilla.com
- cgordon@mozilla.com
expires: never
unit: integer
metadata:
tags:
- Logins
deleted:
type: counter
description: |
Counter of number of passwords that have been deleted by user.
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1836164
data_reviews:
- https://github.com/mozilla-mobile/firefox-android/pull/2555
data_sensitivity:
- interaction
notification_emails:
- android-probes@mozilla.com
- cgordon@mozilla.com
expires: never
metadata:
tags:
- Logins
modified:
type: counter
description: |
Counter of number of passwords that have been modified by user.
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1836164
data_reviews:
- https://github.com/mozilla-mobile/firefox-android/pull/2555
data_sensitivity:
- interaction
notification_emails:
- android-probes@mozilla.com
- cgordon@mozilla.com
expires: never
metadata:
tags:
- Logins
voice_search:
tapped:
@ -9019,6 +9088,24 @@ credit_cards:
metadata:
tags:
- Autofill
saved_all:
type: quantity
description: |
Counter of number of credit cards that are currently stored by user.
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1836164
data_reviews:
- https://github.com/mozilla-mobile/firefox-android/pull/2555
data_sensitivity:
- interaction
notification_emails:
- android-probes@mozilla.com
- cgordon@mozilla.com
expires: never
unit: integer
metadata:
tags:
- Autofill
deleted:
type: counter
description: |
@ -9269,6 +9356,24 @@ addresses:
metadata:
tags:
- Autofill
saved_all:
type: quantity
description: |
A counter of the number of all addresses that are currently saved by user.
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1836164
data_reviews:
- https://github.com/mozilla-mobile/firefox-android/pull/2555
data_sensitivity:
- interaction
notification_emails:
- android-probes@mozilla.com
- cgordon@mozilla.com
expires: never
unit: integer
metadata:
tags:
- Autofill
updated:
type: counter
description: |

@ -21,6 +21,7 @@ import androidx.work.Configuration.Provider
import kotlinx.coroutines.Deferred
import kotlinx.coroutines.DelicateCoroutinesApi
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.Dispatchers.IO
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.async
import kotlinx.coroutines.launch
@ -65,10 +66,13 @@ import mozilla.components.support.utils.BrowsersCache
import mozilla.components.support.utils.logElapsedTime
import mozilla.components.support.webextensions.WebExtensionSupport
import org.mozilla.fenix.GleanMetrics.Addons
import org.mozilla.fenix.GleanMetrics.Addresses
import org.mozilla.fenix.GleanMetrics.AndroidAutofill
import org.mozilla.fenix.GleanMetrics.CreditCards
import org.mozilla.fenix.GleanMetrics.CustomizeHome
import org.mozilla.fenix.GleanMetrics.Events.marketingNotificationAllowed
import org.mozilla.fenix.GleanMetrics.GleanBuildInfo
import org.mozilla.fenix.GleanMetrics.Logins
import org.mozilla.fenix.GleanMetrics.Metrics
import org.mozilla.fenix.GleanMetrics.PerfStartup
import org.mozilla.fenix.GleanMetrics.Preferences
@ -80,6 +84,7 @@ import org.mozilla.fenix.components.appstate.AppAction
import org.mozilla.fenix.components.metrics.MetricServiceType
import org.mozilla.fenix.components.metrics.MozillaProductDetector
import org.mozilla.fenix.experiments.maybeFetchExperiments
import org.mozilla.fenix.ext.components
import org.mozilla.fenix.ext.containsQueryParameters
import org.mozilla.fenix.ext.getCustomGleanServerUrlIfAvailable
import org.mozilla.fenix.ext.isCustomEngine
@ -809,6 +814,16 @@ open class FenixApplication : LocaleAwareApplication(), Provider {
migrateTopicSpecificSearchEngines()
}
}
@OptIn(DelicateCoroutinesApi::class)
GlobalScope.launch(IO) {
val autoFillStorage = applicationContext.components.core.autofillStorage
Addresses.savedAll.set(autoFillStorage.getAllAddresses().size.toLong())
CreditCards.savedAll.set(autoFillStorage.getAllCreditCards().size.toLong())
val lazyPasswordStorage = applicationContext.components.core.lazyPasswordsStorage
Logins.savedAll.set(lazyPasswordStorage.value.list().size.toLong())
}
}
@Suppress("ComplexMethod")

@ -24,6 +24,7 @@ import androidx.navigation.fragment.findNavController
import mozilla.components.lib.state.ext.consumeFrom
import mozilla.components.support.ktx.android.view.hideKeyboard
import mozilla.components.support.ktx.android.view.showKeyboard
import org.mozilla.fenix.GleanMetrics.Logins
import org.mozilla.fenix.R
import org.mozilla.fenix.components.StoreProvider
import org.mozilla.fenix.databinding.FragmentAddLoginBinding
@ -374,6 +375,7 @@ class AddLoginFragment : Fragment(R.layout.fragment_add_login), MenuProvider {
binding.usernameText.text.toString(),
binding.passwordText.text.toString(),
)
Logins.saved.add()
true
}
else -> false

@ -330,6 +330,7 @@ class EditLoginFragment : Fragment(R.layout.fragment_edit_login), MenuProvider {
binding.passwordText.text.toString(),
)
Logins.saveEditedLogin.record(NoExtras())
Logins.modified.add()
true
}
else -> false

@ -217,6 +217,7 @@ class LoginDetailFragment : SecureFragment(R.layout.fragment_login_detail), Menu
}
setPositiveButton(R.string.dialog_delete_positive) { dialog: DialogInterface, _ ->
Logins.deleteSavedLogin.record(NoExtras())
Logins.deleted.add()
interactor.onDeleteLogin(args.savedLoginId)
dialog.dismiss()
}

Loading…
Cancel
Save