Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Commit

Permalink
Update to new usage of Glean Gradle plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
mdboom authored and daoshengmu committed May 15, 2020
1 parent 9d848c4 commit f603662
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 5 deletions.
2 changes: 2 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: "org.mozilla.telemetry.glean-gradle-plugin"

deps.telemetry.glean_unittests = "org.mozilla.telemetry:glean-forUnitTests:$project.ext.glean_version"

def getGitHash = { ->
def stdout = new ByteArrayOutputStream()
exec {
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ buildscript {
addRepos(repositories)
dependencies {
classpath 'com.android.tools.build:gradle:3.6.1'
classpath "org.mozilla.telemetry:glean-gradle-plugin:$versions.telemetry"
classpath "org.mozilla.components:tooling-glean-gradle:$versions.android_components"
classpath "$deps.kotlin.plugin"

// NOTE: Do not place your application dependencies here; they belong
Expand Down
11 changes: 11 additions & 0 deletions docs/metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,23 @@ This means you might have to go searching through the dependency tree to get a f


## baseline

This is a built-in ping that is assembled out of the box by the Glean SDK.

See the Glean SDK documentation for the [`baseline` ping](https://mozilla.github.io/glean/book/user/pings/baseline.html).

The following metrics are added to the ping:

| Name | Type | Description | Data reviews | Extras | Expiration |
| --- | --- | --- | --- | --- | --- |
| distribution.channel_name |[string](https://mozilla.github.io/glean/book/user/metrics/string.html) |The distribution channel name of this application. We use this field to recognize Firefox Reality is distributed to which channels, such as wavevr, oculusvr, etc. |[1](https://github.com/MozillaReality/FirefoxReality/pull/1854#issuecomment-546214568), [2](https://github.com/MozillaReality/FirefoxReality/pull/3199#issuecomment-617938749)||2020-11-01 |

## events

This is a built-in ping that is assembled out of the box by the Glean SDK.

See the Glean SDK documentation for the [`events` ping](https://mozilla.github.io/glean/book/user/pings/events.html).

The following metrics are added to the ping:

| Name | Type | Description | Data reviews | Extras | Expiration |
Expand All @@ -35,8 +41,11 @@ The following metrics are added to the ping:
| firefox_account.sign_out |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user pressed the sign out button on the sync account page and was successfully signed out of FxA |[1](https://github.com/MozillaReality/FirefoxReality/pull/2327#issuecomment-559103837), [2](https://github.com/MozillaReality/FirefoxReality/pull/3199#issuecomment-617938749)||2020-11-01 |

## metrics

This is a built-in ping that is assembled out of the box by the Glean SDK.

See the Glean SDK documentation for the [`metrics` ping](https://mozilla.github.io/glean/book/user/pings/metrics.html).

The following metrics are added to the ping:

| Name | Type | Description | Data reviews | Extras | Expiration |
Expand All @@ -50,8 +59,10 @@ The following metrics are added to the ping:
| url.query_type |[labeled_counter](https://mozilla.github.io/glean/book/user/metrics/labeled_counters.html) |Counting how many URLs are visited in a day, by input method. |[1](https://github.com/MozillaReality/FirefoxReality/pull/2241#issuecomment-557740258), [2](https://github.com/MozillaReality/FirefoxReality/pull/3199#issuecomment-617938749)|<ul><li>type_link</li><li>type_query</li><li>voice_query</li></ul>|2020-11-01 |

## session-end

This ping is sent at the end of a session (when Firefox Reality switches to the background). We usually send search and UI control metrics at the end of a session.


The following metrics are added to the ping:

| Name | Type | Description | Data reviews | Extras | Expiration |
Expand Down
6 changes: 2 additions & 4 deletions versions.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ ext.deps = [:]
def versions = [:]
// GeckoView versions can be found here:
// https://maven.mozilla.org/?prefix=maven2/org/mozilla/geckoview/
versions.gecko_view = "78.0.20200514094044"
versions.android_components = "28.0.1"
versions.gecko_view = "78.0.20200507085231"
versions.android_components = "37.0.0"
// Note that android-components also depends on application-services,
// and in fact is our main source of appservices-related functionality.
// The version number below tracks the application-services version
Expand All @@ -51,7 +51,6 @@ versions.snakeyaml = "1.24"
versions.gson = "2.8.5"
versions.robolectric = "4.2.1"
versions.work = "2.2.0"
versions.telemetry = "24.1.0"
ext.versions = versions

def deps = [:]
Expand Down Expand Up @@ -148,7 +147,6 @@ kotlin.coroutines_jdk8 = "org.jetbrains.kotlinx:kotlinx-coroutines-jdk8:$version
deps.kotlin = kotlin

def telemetry = [:]
telemetry.glean_unittests = "org.mozilla.telemetry:glean-forUnitTests:$versions.telemetry"
deps.telemetry = telemetry

deps.constraint_layout = "androidx.constraintlayout:constraintlayout:$versions.constraint_layout"
Expand Down

0 comments on commit f603662

Please sign in to comment.