Skip to content
This repository has been archived by the owner on Jan 12, 2023. It is now read-only.

Commit

Permalink
Issue #4901: Update metrics for data review on initial metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
jonalmeida committed Aug 9, 2021
1 parent 348432b commit 07fc6bc
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 34 deletions.
38 changes: 10 additions & 28 deletions app/metrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ browser:
bugs:
- https://github.com/mozilla-mobile/focus-android/issues/4545
data_reviews:
- https://github.com/mozilla-mobile/focus-android/issues/4901
- https://github.com/mozilla-mobile/focus-android/pull/5065#issuecomment-894328647
data_sensitivity:
- interaction
notification_emails:
- jalmeida@mozilla.com
expires: "2022-08-01"
- android-probes@mozilla.com
expires: "2022-07-01"
default_search_engine:
type: string
lifetime: application
Expand All @@ -28,12 +28,12 @@ browser:
bugs:
- https://github.com/mozilla-mobile/focus-android/issues/4545
data_reviews:
- https://github.com/mozilla-mobile/focus-android/issues/4901
- https://github.com/mozilla-mobile/focus-android/pull/5065#issuecomment-894328647
data_sensitivity:
- interaction
notification_emails:
- jalmeida@mozilla.com
expires: never
- android-probes@mozilla.com
expires: "2022-07-01"
locale_override:
type: string
lifetime: application
Expand All @@ -43,31 +43,12 @@ browser:
bugs:
- https://github.com/mozilla-mobile/focus-android/issues/4545
data_reviews:
- https://github.com/mozilla-mobile/focus-android/issues/4901
- https://github.com/mozilla-mobile/focus-android/pull/5065#issuecomment-894328647
data_sensitivity:
- technical
notification_emails:
- [email protected]
expires: never

activation:
activation_id:
type: uuid
lifetime: user
description: |
An alternate identifier, not correlated with the client_id, generated once
and only sent with the activation ping.
send_in_pings:
- activation
bugs:
- https://github.com/mozilla-mobile/focus-android/issues/4545
data_reviews:
- https://github.com/mozilla-mobile/focus-android/issues/4901
data_sensitivity:
- highly_sensitive
notification_emails:
- [email protected]
expires: never
- [email protected]
expires: "2022-07-01"

legacy_ids:
client_id:
Expand All @@ -82,6 +63,7 @@ legacy_ids:
- https://github.com/mozilla-mobile/focus-android/issues/4901
notification_emails:
- [email protected]
- [email protected]
expires: never

browser.search:
Expand Down
10 changes: 5 additions & 5 deletions app/src/main/java/org/mozilla/focus/telemetry/ActivationPing.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import mozilla.components.support.base.log.logger.Logger
import org.mozilla.focus.GleanMetrics.Activation
import org.mozilla.focus.GleanMetrics.Pings

/**
* Ensures that only one activation ping is ever sent.
Expand Down Expand Up @@ -58,11 +56,13 @@ class ActivationPing(private val context: Context) {
@VisibleForTesting(otherwise = VisibleForTesting.PRIVATE)
internal fun triggerPing() {
// Generate the activation_id.
Activation.activationId.generateAndSet()
// Activation.activationId.generateAndSet()

CoroutineScope(Dispatchers.IO).launch {
Pings.activation.submit()
markAsTriggered()
// Disabled until data-review r+
// See: https://github.com/mozilla-mobile/focus-android/pull/5065
// Pings.activation.submit()
// markAsTriggered()
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import java.util.UUID
*/
class GleanMetricsService(context: Context) : MetricsService {

@Suppress("UnusedPrivateMember")
private val activationPing = ActivationPing(context)

@OptIn(DelicateCoroutinesApi::class)
Expand Down Expand Up @@ -77,7 +78,8 @@ class GleanMetricsService(context: Context) : MetricsService {
Browser.defaultSearchEngine.set(getDefaultSearchEngineIdentifierForTelemetry(context))
}

activationPing.checkAndSend()
// Disabled until data-review r+
// activationPing.checkAndSend()
}
}
}
Expand Down

0 comments on commit 07fc6bc

Please sign in to comment.