Skip to content

Commit 1e97622

Browse files
committed
Address comments in PR
1 parent aa3a69b commit 1e97622

File tree

3 files changed

+34
-30
lines changed

3 files changed

+34
-30
lines changed

components/service/glean/metrics.yaml

+30-27
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
$schema: moz://mozilla.org/schemas/glean/metrics/1-0-0
66

77
baseline:
8+
## TODO: Some metrics are commented out below until we implement them as part
9+
## of 1497894 and its dependent bugs
10+
811
# sessions:
912
# type: counter
1013
# description: |
@@ -33,35 +36,35 @@ baseline:
3336
notification_emails:
3437
3538

36-
os_version:
37-
type: string
38-
lifetime: application
39-
description: |
40-
The version of the operating system.
41-
bugs:
42-
- 1497894
43-
notification_emails:
44-
39+
# os_version:
40+
# type: string
41+
# lifetime: application
42+
# description: |
43+
# The version of the operating system.
44+
# bugs:
45+
# - 1497894
46+
# notification_emails:
47+
4548

46-
device:
47-
type: string
48-
lifetime: application
49-
description: |
50-
The manufacturer and model of the device.
51-
bugs:
52-
- 1497894
53-
notification_emails:
54-
49+
# device:
50+
# type: string
51+
# lifetime: application
52+
# description: |
53+
# The manufacturer and model of the device.
54+
# bugs:
55+
# - 1497894
56+
# notification_emails:
57+
5558

56-
architecture:
57-
type: string
58-
lifetime: application
59-
description: |
60-
The architecture of the device, (e.g. "arm", "x86").
61-
bugs:
62-
- 1497894
63-
notification_emails:
64-
59+
# architecture:
60+
# type: string
61+
# lifetime: application
62+
# description: |
63+
# The architecture of the device, (e.g. "arm", "x86").
64+
# bugs:
65+
# - 1497894
66+
# notification_emails:
67+
6568

6669
# timezone:
6770
# type: number

components/service/glean/scripts/sdk_generator.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,6 @@ ext.gleanGenerateMetricsAPI = {
125125

126126
if (android.hasProperty('applicationVariants')) {
127127
android.applicationVariants.all(ext.gleanGenerateMetricsAPI('GleanMetrics'))
128-
} else {
128+
} else if (project.name == 'service-glean') {
129129
android.libraryVariants.all(ext.gleanGenerateMetricsAPI('mozilla.components.service.glean.metrics'))
130130
}

components/service/glean/src/main/java/mozilla/components/service/glean/Glean.kt

+3-2
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,6 @@ object Glean {
8282

8383
initializeCoreMetrics(applicationContext)
8484

85-
Baseline.os.set("Android")
86-
8785
ProcessLifecycleOwner.get().lifecycle.addObserver(gleanLifecycleObserver)
8886
}
8987

@@ -184,6 +182,9 @@ object Glean {
184182
if (firstRunDetector.isFirstRun()) {
185183
GleanInternalMetrics.clientId.generateAndSet()
186184
}
185+
186+
// Set the OS type
187+
Baseline.os.set("Android")
187188
}
188189

189190
/**

0 commit comments

Comments
 (0)