mozilla-lockwise / lockwise-android

Firefox's Lockwise app for Android
https://mozilla-lockwise.github.io/lockwise-android/
Mozilla Public License 2.0
622 stars 104 forks source link

Disable telemetry for debug builds. #1089

Open jhugman opened 4 years ago

jhugman commented 4 years ago

As a contributor I would like to run the dev version and the release version on the same device so I can use lockwise with a developer account and my own account.

As a Glean data griot, I would like to be able to disregard telemetry coming from dev builds.

This is adding a applicationIdSuffix ".debug" to build.gradle, and defining a buildConfigField for each variant.

Either method would work to stop telemetry from being recorded remotely, but both together can stop telemetry being recorded locally, sent, and recorded remotely.

/ht @Dexterp37

Fenix just defines a buildConfigField depending on the variant (if the default for local developer build is debug, then you can set telemetry false in that case and true for release). The field can then be used to set the default value for your setting using the generated BuldConfig.TELEMETRY.

Dexterp37 commented 4 years ago

Either method would work to stop telemetry from being recorded remotely, but both together can stop telemetry being recorded locally, sent, and recorded remotely.

Note that, from an user point of view, the least surprising behaviour would be to not send telemetry from debug builds. The fact that we can discard that on the pipeline side is more of a convenience for your team, since you don't really want debug data to pollute release dashboards :)